commit b5bc621318c8c4b729ed2aecb19f42ab94c62260 Author: steinm Date: Fri Oct 29 13:19:51 2010 +0000 - move all sources into trunk diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 000000000..8df024bc9 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,929 @@ +-------------------------------------------------------------------------------- + Changes in version 2.0.1 +-------------------------------------------------------------------------------- + +ADDED A GRAPHIC LOGO +The user can personalize it changing the image in styles/logo.png +Reviewed the style to accomplish with the logo + +New settings' flag "_expandFolderTree" to start with the navigation tree +hidden, expanded or expanded at the first level + +The tree status (hide/show) will be preserved through folder actions + +The witdh of open/closed tree can be defined using CSS (in "clean" CSS style +"tree-open" and "tree-closed" ) + +DIFFERENT COMMENTS FOR DOCUMENT AND VERSION +Creating a document user can insert a different comment for version and for +entire document. If the version comment is leaved empty the document comment +will be used for both + +Added a warning about the maximum upload file size in the upload pages +(add document and add files). The size is a server setting and does not depend +by letoDMS + +Better allignment in the view document page (Thanks to alekseyn). Better +allignment in the view document version page. +Note: the allignement is simply suggested setting width in table columns, thus +can be modified by very long strings. + +Now checking none between keywords,name and comment in search form means +searching all. That's a more logical way (same as behaviour of status checks) + +Added a settings var for default calendar view (week,month or year) + +Simplified the "Related documents" table: now the public yes/no is visible +only to the user tha can edit it + +Removed a small bug with calendar function inclusion (thanks to c8900219) + +Bugfixed the control of empty document names (thanks to turkeburgr) + +Fixed a compatiblity bug in log management page (removed the unused readlink function) + +Restyled the warnings appearance in clean style + +Fixed a bug with empty vars on user management + +Fixed a small bug when trying to download deleted files from folder view + +Fixed a smal bug with logging on version removing (Thanks to larppaxyz) + +Reviewed print css according to folder tree and logo + +In print view the status was hide by css. Fixed + +EXPERIMENTAL: review the LDAP autentication by Doudoux. The old code is leaved +commented in op.Login.php and in inc.Settings.php. + +the submit review/approval has moved in the reviewer/approvers list + +-------------------------------------------------------------------------------- + Changes in version 2.0.0 +-------------------------------------------------------------------------------- + +ADDED MULTIPLE DOCUMENT INCLUSION +in "Add document" page there's a new switch to add multiple files +for every file a new document will be created in the folder +the size limit depends on server settings +if multiple file are added: +- the file name is used to name the document +- expiration, reviewers, approvers, comment, etc will be the same for every + document + +ADDED HUMAN-READABLE OPTION ON ARCHIVE CREATION: +with a flag in the "archive creation" tool the archive can be created using +DMS paths and original file names. The archive contains only the last version +of every file. Clearly a human readable archive cannot be used to restore a +server backup but they are handyer for external uses. + +ADDED A SIDEBAR WITH TREE VIEW on the folder browsing +the feature is optional an there's a new settings flag + var $_enableFolderTree = true; +The sidebar shows only folders (a complete tree wich includes document would be +very heavy on most installation) + +ADDED A SHARED CALENDAR for DMS users +- there'a new menu item ("calendar") to access the calendar +- the starting view is current week +- calendar has 3 view : year, month and week +- every event has start/end time (only date), user, creation and date, name and comment +- no hour/minute management (is not intent as personal/daily calendar) +- events can be added and viewed by everyone (are public) +- the event can be edit and delete by the user who insert it or by administrators +- the feature is optional (can be deactivated in inc.Settings) + +ADDED A SIMPLE DB DUMP UTILITY in the Admin-Tools/Backup tools +- the feature should complete the backup utilities toolkit +- THE DB DUMP IS EXPERIMENTAL AND MUST BE TESTED WITH YOUR DB +- The created will require an empty existing db to restore data (content only) + +IMPROVED THE DOCUMENT SEARCH FOR DOCUMENT STATUS +now one can search all document rejected, expired, obsolete, ecc. +reordered and restyled search form and result list + +Beautyfied e-mail messages + +The document expiration date (if any) is now showed near the status + +lined up the reviewer approvers table in view document and document details + +fixed a bug with group notify list administration + +reverse alphabetical order (newer first) for log list, backup list, dump list + +minor bugfix in versioning file creation/notification list editing + +added confirmation page for user/group deletion + +improve some log lines in user/group management + +minor bugfix in myDocuments view + +Now when editing a user the password can be leaved unchanged +(if nothing is inserted the password will not be changed) + +Completed (not translated) some languages files + +fixed some bug with user deletion (there were some tables not updated) + +Fixed a bug with the time picker + +improved the folder chooser dialog + +Now the "view on line" works regardless to the case of the extension string +(the extension can be upper, lower or mixed case) + +Same bugfix for the icon used in folder/document view + +Removed the javascript hide/show for reviewers/approvers list (buggy with some browser) + +Resolved a bug with hidden user flag + +Improved the log view page + +Reordered document action casistics (lock/unlock, permissiones, ecc.) + +Removed the js source folder and file (not used) + +Added new features description to the on-line help + +On update operation the mandatory users/reviwers where not used: fixed + +Bugfix again on View online function + +Bugfix in personal keyword list editing + +Removed a lot of php notice (viable only on some servers with php Notice enabled) + +Removed a bug with direcotry creation and safe_mod activated + +Reordered the theme folders + +Fixed a not define accessmode in document chooser + +-------------------------------------------------------------------------------- + Changes in version 1.9 +-------------------------------------------------------------------------------- + +This is a first major release with a lot of changes, then some new features +can contain new bugs. The DB require a small change: update.sql is included +in the folder UPDATE-v1.9 + +ADDED THE MANDATORY REVIEWERS AND APPROVERS LIST (per user): +Administrator can associate to every user one or more users as mandatory +reviewer/approver. Every document inserted by that user will be forced +to be reviewed/approved by the users in that list. Note that if document is +not readable by the mandatory approver/reviewer then the appoval/review +will not be required (for example will not be required for private documents). + +ADDED A LOGGING SYSTEM: +- works with plain files +- administrator tools includes a page to view/download/delete log files +- log files are rotated with a time parameter in settings ($_logFileRotation) +The logging system is an experimental feature and must be carefully tested in +large multiuser environments. There are two new parameters in inc.Settings to enable. + +USERS CAN NOW BE HIDDEN FROM USERS LISTS viewed by all (there's a "hide" checkbox in user manager page) +this function works with the "user view" list shown to all users +clearly if "$_enableUsersView = false" in configuration the option is useless + +Restyled and improve the notify management: +- the new personal administration is included in "myAccount" menu of every user +- ADDED RECURSIVE INCLUSION (folder with all subfolders and/or all documents) + +Viewonline now works (but should be tested again with different platforms) + +Owner of a document is now emailed if someone else rename/move/update the document + +When a document is reviewed/approved the mail is now correclty sent to the +document updater (the user who update the version) not necessarly to the owner. + +ADDED SWITCH BETWEEN ALPHABETICAL OR ORIGINAL ORDER in the folder view +clicking on the "name" column header + +The archive includes an older version of adodb working with MySQL-4 + +The downloadable text file with versioning infos is now updated immediatly before download + +Bugfixed the create_table.sql + +Removed a bug in english language file + +Removed last references to the old name "myDMS" + +Restyled and improved the "backup tools" page + +Bugfixed the datechooser (was limited to 2010) + +ADDED THE EDITABLE "MANAGER" FLAG TO GROUP MEMBER +now one (or more) user can be flagged as "manager" group member +Currently group notification are editable only by group managers +but the flag will be required for future use + +IMPROVED THE GROUP/USER MANAGEMENT PAGES +- operation are ordered in a more clear way +- the "add new" operation uses the hide/show javascript +- now the page refresh immediatly when new data are saved + +Restyled and improve the "edit access permission" pages + +Improved the keyword category editing +- operation are ordered in a more clear way +- the "add new" operation uses the hide/show javascript +- now the page refresh immediatly when new data are saved +- the keyword category operation has been removed from administration + personal account menu (the operation has gone in administration tool's menu + because administrator edits the global keywords categories) + +Improved Keword chooser + +Added quick installation instruction on the README file + +THE USER IMAGES ARE NOW OPTIONAL (the implementation is poor and doesn't work +on every system, then can be disabled) + +------------------------------------------------------------------- + Changes in version 1.8.3 +------------------------------------------------------------------- + +Improved portuguese (thanks to Pedro.broggini), slovak (thanks to deb00t) and +german (thanks to Vault) languages translations. +Resolved some minor bugs (undefined variables) in inc.Class document and inc.ClassUI +Bugfixed UPDATE script - added update instruction in README file +Resolved a bug on ViewOnline feature (thanks to doudoux) + + +------------------------------------------------------------------- + Changes in version 1.8.2 +------------------------------------------------------------------- + +The link in revision/approval request email now is for the ViewDocument + +Fix a bug in big backup file creation + +Review ad reorganized the ViewFolder page: removed Reviewers/Approvers +list and added directory contents (file and subfolder count) and comments + +Added directory dimension and content in out.Statistics +Now thwe initial version number of a new document can be set (you can +start a document with a version > 1) + +Some mail are corrected + +The various input field has been enlarged (using clean style) + +------------------------------------------------------------------- + Changes in version 1.8.1 +------------------------------------------------------------------- + +REDESIGNED THE ORGANIZATION OF DATA FOLDER + +Now the data folder (where files are located) has a more efficient organization: +data_dir / id / version.filetype + +This scheme makes backups much more intuitive (the folder name corresponds +to the id of the document, all versions and attached files +are in the same folder. + +- Removed no longer needed tdbDirPath and tdlPathList +- Removed no longer needed free path lookup functions +- Modified sql create_tables.sql for changes to the DB in accordance with the new organization + +WARNING: This change makes the version incompatible with existing archives/DB +but is required by the all thennew features (read ahead) + +The "UPDATE" folder contais two script for updating existing installations + +To update an existing archive: +- Backup all (including DB) +- Install the new DMS version +- Install the "UPDATE" folder containing two files update.php and update.sql +- Log in as administrator +- Manually invoke the script (http://indirizzo/UPDATE/update.php +- Remove the folder "UPDATE" + +If everything works well the old content has ben renamed "old" and can be removed (eg via ftp) + +ADDITIONAL FILES + +Added the ability to upload additional files associated to a document (as attachments) +these files are not versioned and are designed as accessories to the document +(Eg the PDF version or reductions in the image). The files are associated with +the document, not to version. + +NOTE: To add attachments the user must have write permission on the document +The attachment can be removed by the user who added it or having total permissions + +BACKUP + +Added some useful tools for backing up files and folders (real files, not the DB). +Especially useful for working with entire folders which, being virtual, +can not easily be backupped via ftp. + +There are three operations designed to be eventually applied in sequence. + +Data Backup versioning: +Create for each document in a DMS folder a file containing the main versioning informations +This allows you to make backup copies of which also contain information from the DB. +This is meant to be performed before the creation of an archive, +After creating the file versioning file can be viewed from out.ViewDocument + +Creating Archives: +Creates a tar.gz file containing all files related to a specific +DMS folder. The file is created in settings->_contentDir +The file is constructed so that it can be unpacked again in the settings->_contentDir +to restore removed files. In the page is presented the list of existing backup files +which you can downloaded or delete + +Deleting files: +you can delete from the server all the files related to a specific +DMS folder and all its subfolders. By doing this you can +free space on the server without removing the version information +saved in the database that will be available for regular consultation. +Having a backup deleted files can easily be restored when needed. + +All backups operations can be performed on the entire archive or only on a DMS folder. +All backups operations are accessible only to administrators. + +OTHER FEATURES + +Added the possibility to change a approval/review already done. +The editing is possible at any moment only to the user who made it. +The time is retained (so you can understand subsequent amendments). +The document status is updated automatically following a change. +The editing is only possible on the latest version of the document. +If a document expire date is set editing is only possible within that time + +Added delete_all_contents script. Cleaning DB tool for test use + +Proper content of some e-mail + +Added general information to the statistic page: +- No. of documents +- No. of folders +- No. of files in every document +- Number of total files +- Total size of the archive + +Fixed the view of system notify list + +The comments related to the update opration (versione comment) are now editable + +Adjusted out.DefaultKeywords now equal to out.UserDefaultKeyword + +Added function formatted_size (view size in Bytes / Kb / Mb / Gb) in inc.Utils and applied where necessary + +Fixed a bug on documents cancellation (was not removed the corresponding list of notification) + +The files in data folder can be removed without cause errors in the DMS. +When a file is not effectively present in out.ViewDocument displays a warning "file removed" +and, of course, is no longer given the option to download. +This feature can be used to free up space on the server, removing old files, while leaving available the corresponding +version information. + +Fixed the view in out.AddSubFolder.php (default font size) + +Added icons for openoffice.org mime-type +Added icons for some types of extensions (bz, dot, docx, etc.). + +Added (in inc.settings) option to disable the user administrator as a reviewer / approver (not listed) + +Remove the untranslated instructions "die" (replaced by UI:: exitError) + +Proper control permissions for internal links (related document): +- The guest user can not add links +- Users without write permission can only add links private +- Add link publici the user must have write permission +- To cancel link should be the user that added or have permission to total + +------------------------------------------------------------------- + Changes in version 1.8 +------------------------------------------------------------------- + +The reviewer/approver can edit his review/approval after having submitted it. +Only the user whom effectivly submitted the review/approval can edit it, +even if he was required as group member. The document status will be updated +autmatically according with the modified submission. The edit is possible only +on the last version of a document (there's no reason to edit a old version). +If expiration date is set the edit is possible (obviously) only within that date. + +Account menu has been reviewed. + +Two new pages containing general views of groups and users are integrated in +the account menu. The feature can be disabled in inc.Settings.php. + +The email notification can be completely disabled in inc.Settings.php. Every +users can leave empty his e-mail field to not receive e-mail even if +strictFormCheck is on. + +Fix of two redirection bugs after deleting documents or folders. + +The notification list is now integrated in the myDocument page/menu. + +The general tree view has been enhance. + +Fix of some e-mail composition errors. + +Fix of some italian translation errors. + +The owner is no longer automatically added to the notification list of +a document. The notification lists should not be modified automatically +(if not required the notification are annoying) + +------------------------------------------------------------------- + Changes in version 1.7.3 +------------------------------------------------------------------- + +- removed vulnerability lang/theme at login (TODO: referuri in op.Login.php) +- completed translation calls +- a print css added +- added "warning" and "error" styles +- new css clean e hc (high contrast for visually impaired folks) +- guest login must be default false +- reorderer the first level menu +- reordered personal document navigation +- reorderd personal account navigation +- out.info is now linked to administrator only and access protected +- added permission control on root folder (no inheritance) +- removed "remove" and "move" commands for root folder +- reorganized permission pages +- added disclaimer note (shown on every page) with setting flag and translation +- where possible ALL the operation feedback are removed (where no errors the page return immedatly to the contents) +- added and exitError function in ClassUI and review ALL pages to comply +- syled the out.KeywordChooser page +- deleted inc.OutUtils +- deleted op.NotifyMailer (not used) +- added a "legend" to out.Statistics + +------------------------------------------------------------------- + Changes in version 1.7.2 +------------------------------------------------------------------- + +- Style Sheet modifications to improve IE6 compatibility, contributed by + Juan Lago (thanks Juan!). This fixes some placement issues with elements + that have the position attribute set to "absolute". + +- The div elements that are used to clear floats have been fixed so that they + have zero height in IE6. It is not enough to specify "height: 0"; one must + also set "font-size:0" otherwise IE6 will set the height of the element to + match the standard font size. + +- UI layout improvements. Various changes to the user interface to improve + the page flow and allow for further expansion in the future. The context + menu bar has been separated from the page heading into its own container + underneath the title. It's a more logical place to present the menu, and + will allow for the easy addition of further sub-headings in the future + without compromising the page flow. + +- The last dependency on the original theme system has been eliminated with + the introduction of updated chooser dialogues for selecting files and + folders. These dialogues have the new themes and the code has been revamped, + replacing the old table structures with unordered lists. + +- LDAP update. A minor change to the LDAP authentication code to allow for + the use of URIs to identify the server name (e.g. ldaps://host.com). + Also, the LDAP version is set to 3 in order to support secure connections. + +- New language translations for Czech and Slovak. Contributed by SF user + helix84 (thanks!). + + +------------------------------------------------------------------- + Changes in version 1.7.1 +------------------------------------------------------------------- + +- Re-vamped Notification system allows users to receive an email when a + document or folder is changed. This is a new, event-based mechanism that + notifies the user as soon as the change has been made and replaces the + cron mechanism originally developed. Any user that has read access to a + document or folder can subscribe to be notified of changes. Users that + have been assigned as reviewers or approvers for a document are + automatically added to the notification system for that document. + + A new page has been created for users to assist with the management of + their notification subscriptions. This can be found in the "My Account" + section under "Notification List". + +- The test used to identify HTTPS connections has been improved so that it + correctly identifies IIS servers that have ISAPI enabled but are not + using HTTPS protocol. + + +------------------------------------------------------------------- + Changes in version 1.7.0 +------------------------------------------------------------------- + +- Fixes to CSS display bugs. Minor updates to the display. + +- Improved handling of character escape sequences. + +- Review / Approve dates added to folder views and search results. + +- New file system directory management code to accommodate limitations in the + underlying filesystem which restrict the number of files that MyDMS can + store. MyDMS now uses a nested directory structure to store files, rather + than a flat one. However, note that individual files are still stored one + per directory in order to preserve compatibility with older versions of + MyDMS. + + For details of the problem and the solution implemented, please refer to: + + http://mydms.sf.net/2007/08/15/new-file-system-storage-structure/ + +- Hungarian translation. + +- And as a bonus, there is a Drupal theme compatible with MyDMS. + + +------------------------------------------------------------------- + Changes in version 1.6.1 +------------------------------------------------------------------- + +- Theme and language choice are now saved as user attributes between + sessions. Read update-1.6.1.txt for changes to database schema. + +- Link to document review / approval page from out.ViewDocument.php. + +- French translation. + +- Brazilian Portuguese translation. + +- Traditional Chinese translation. + +- Relaxation of criteria for selecting reviewers / approvers. Users now only + require read access to be eligible reviewers or approvers. + +- Documents are now displayed in the correct sequence in the folder view. + +- Documents can be downloaded directly from the folder view by clicking their + icon. + +- Document icons in the folder view now reflect the document type. + +- Empty passwords are not accepted, even when JS is disabled in the browser. + +- New restricted access mode rejects login from users who are not entered + into the internal database, even if LDAP authentication was successful. + + +------------------------------------------------------------------- + Changes in version 1.6.0 +------------------------------------------------------------------- + +- Introduction of a document workflow system that manages the life-cycle of a + document, including review and approval stages. + + Details: + + Document Class: + Created new methods: + Document::addIndReviewer() + Document::addGrpReviewer() + Document::addIndApprover() + Document::addGrpApprover() + + Changes to: + Document::addContent() + + New Class: Email. + + out.AddDocument.php + op.AddDocument.php + Changes to allow selection of reviewers and approvers. + + Group Class: + Changes to: + Group::getUsers() -- query optimised + New Methods: + Group::getReviewStatus() + Group::getApprovalStatus() + + User Class: + New Methods: + User::getReviewStatus() + User::getApprovalStatus() + + Class Folder: + Changes to: + Folder::addDocument() -- accept reviewers, approvers as parameters. + + New Class: AddContentResultSet. + + Database: + Document version field changed from TINYINT to unsigned SMALLINT throughout + database. + `tblGroupMembers`: + `id` field removed as it is unnecessary. + Created a primary of `groupID`, `userID`. + + DocumentContent Class: + Created new methods: + DocumentContent::getStatus() + DocumentContent::getReviewStatus() + DocumentContent::getApprovalStatus() + DocumentContent::delIndReviewer() + DocumentContent::delGrpReviewer() + DocumentContent::delIndApprover() + DocumentContent::delGrpApprover() + + out.ViewDocument.php + op.ViewDocument.php + Changes to incorporate display of workflow status. + Links to allow user to change status of a document revision. + + out.UpdateDocument.php + op.UpdateDocument.php + Changes to allow selection of reviewers and approvers. + + out.Login.php + op.Login.php + redirect user to originally requested URL upon successful login. + + out.ReviewDocument.php + op.ReviewDocument.php + out.ApproveDocument.php + op.ApproveDocument.php + Created to enable users to review and approve documents. + + out.OverrideContentStatus.php + op.OverrideContentStatus.php + Allows document owner or site administrator to override the status of a + document. + + out.SetReviewersApprovers.php + op.SetReviewersApprovers.php + Allows document owner or site administrator to re-assign reviewers and + approvers to a document revision that is pending review or approval. + + out.ActionSummary.php + Lists all the documents owned by current user that are pending review or + approval. Lists all documents that are awaiting review or approval by the + user. + + Search page now allows user to search for documents pending review or + approval. Search results display overall document status. + +- Admin user cannot be deleted, and admin privilege cannot be removed from + the admin user. Previously, both actions were possible. + +- Users can be assigned administrative privileges in the User Manager. + +- Deleting document revisions or the document itself notifies all affected + users by email, deletes entries from all status logs. + + +------------------------------------------------------------------- + Changes in version 1.5.1 +------------------------------------------------------------------- + +- Fixed a bug in the keyword editing code which was preventing users from + adding default keywords into global keyword categories. + +------------------------------------------------------------------- + Changes in version 1.5.0 +------------------------------------------------------------------- + +- Optimised search. Improved the performance of the search function by + placing more of the work on the database and by applying indexes to some of + the tables. Sub-folder searches are also dramatically improved due to the + incorporation of a folderList field in the tblDocuments table. + +- Optimised display. New compact theme significantly reduces the page load + times. This is the default theme. The original is still available as a + selection. + +- Changed file download headers such that downloading works with IE over SSL. + +- Changed all instances of $HTTP_COOKIES_VARS, which has been deprecated, to + $_COOKIE. + +- Replaced all short open tags (_contentDir +The file is constructed so that it can be unpacked again in the settings->_contentDir +to restore removed files. In the page is presented the list of existing backup files +which you can downloaded or delete + +Deleting files: +you can delete from the server all the files related to a specific +DMS folder and all its subfolders. By doing this you can +free space on the server without removing the version information +saved in the database that will be available for regular consultation. +Having a backup deleted files can easily be restored when needed. + +All backups operations can be performed on the entire archive or only on a DMS folder. +All backups operations are accessible only to administrators. + +OTHER FEATURES ================================================ ========== + +Added the possibility to change a approval/review already done. +The editing is possible at any moment only to the user who made it. +The time is retained (so you can understand subsequent amendments). +The document status is updated automatically following a change. +The editing is only possible on the latest version of the document. +If a document expire date is set editing is only possible within that time + +Added delete_all_contents script. Cleaning DB tool for test use + +Proper content of some e-mail + +Added general information to the statistic page: +- No. of documents +- No. of folders +- No. of files in every document +- Number of total files +- Total size of the archive + +Fixed the view of system notify list + +The comments related to the update opration (versione comment) are now editable + +Adjusted out.DefaultKeywords now equal to out.UserDefaultKeyword + +Added function formatted_size (view size in Bytes / Kb / Mb / Gb) in inc.Utils and applied where necessary + +Fixed a bug on documents cancellation (was not removed the corresponding list of notification) + +The files in data folder can be removed without cause errors in the DMS. +When a file is not effectively present in out.ViewDocument displays a warning "file removed" +and, of course, is no longer given the option to download. +This feature can be used to free up space on the server, removing old files, while leaving available the corresponding +version information. + +Fixed the view in out.AddSubFolder.php (default font size) + +Added icons for openoffice.org mime-type +Added icons for some types of extensions (bz, dot, docx, etc.). + +Added (in inc.settings) option to disable the user administrator as a reviewer / approver (not listed) + +Remove the untranslated instructions "die" (replaced by UI:: exitError) + +Proper control permissions for internal links (related document): +- The guest user can not add links +- Users without write permission can only add links private +- Add link publici the user must have write permission +- To cancel link should be the user that added or have permission to total + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..928511020 --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + 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. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/README b/README new file mode 100644 index 000000000..3c635e800 --- /dev/null +++ b/README @@ -0,0 +1,255 @@ +------------------------------------------------------------------- + LetoDMS Installation Instructions +------------------------------------------------------------------- + +IMPORTANT NOTE ABOUT TRANSLATIONS ============================================== + +as you can see letoDMS provide a lot of languages but we are not professional +translators then we wait for users contributions. + +If your language is not present in the login panel: +- copy the language/english/ folder and rename it appropriately for your + language +- open the file languages/your_lang/lang.inc and translate it +- open the help file languages/your_lang/help.htm and translate it too + +If you see some wrong or not translated messages: +- open the file languages/your_lang/lang.inc +- search the wrong messages and translate them + +if you have some "error getting text": +- search the string in the english file (languages/english/lang.inc) +- copy to your language file (languages/your_lang/lang.inc) +- translate it + +If there is no help in your language: +- Copy the English help (english/help.htm) file to your language folder +- translate it + +If you apply any changes to the language files please send them to the +letoDMS developers (www.letodms.com). + + +0. Quick installation instructions ============================================= + +You need a working web server with MySQL/PHP support. + +* Unpack all the files in a public web server folder. If you're working on a +host machine your provider will tell you where to upload the files. + +* Unless ADODB is not already installed on your system, download + (http://adodb.sourceforge.net/) and unpack it in the letDMS + directory (for PHP4 there are old version of adodb) + +* Create a data folder somewhere in your web server. The data folder created by +the letoDMS archive should work for a test installation and must be set as +writable to the web-server user. + +For security reason the data folder should not be inside the public folders. +The directory must have read/write permission for the web-server user. + +* Create a new database on your web server + e.g. for mysql: + create database letodms; +* Create a new user for the database with all permissions on the new database + e.g. for mysql: + grant all privileges on letodms.* to letodms@localhost identified by 'secret'; +* Execute "create_tables.sql" in the new database + +* Edit the inc/inc.Settings.php to match your preference and settings. +At least $_rootDir, $_httpRoot, $_contentDir, $_ADOdbPath, $_dbHostname, +$_dbDatabase, $_dbUser, $_dbPass must be edited. Note that for the path you +probably need to ask your provider because the absolute path on the server +is not immediatly viewable in a hosted system. + + +NOTE: UPDATING FROM A PREVIOUS VERSION + +- make a backup archive of your installation folder +- make a backup archive of your data folder +- dump your current database +- extract the letoDMS archive to your web server +- edit the inc/inc.Settings.php file to match your previuos settings + (you can even replace the file with your own one eventualy adding by hand + the missing new parameters) +- login as administrator + -execute all the update.php script pointing your browser directly: + http://www.yoursite/path/to/dms/UPDATE-vX.X.X/update.php + +Each update script must be run, starting from the version previous to the +one in the folder name. For example to update from a 1.7.1 to 1.9 you need +to run both UPDATE-v1.8.1/update.php and UPDATE-v1.9/update.php. + + +1. Requirements ================================================================ + + +letoDMS is a web-based application written in PHP. It uses the MySQL RDBMS to +manage the documents that were uploaded into the application. + +Make sure you have PHP 4.0 and MySQL 4 or higher installed. letoDMS +will work with PHP running in CGI-mode as well as running as module under +apache. If you want to give your users the opportunity of uploading passport +photos you have to enable the gd-library (but the rest of letoDMS will +work without gd, too). + +You will also need to download and install the ADODB database +abstraction library from http://adodb.sf.net/ unless it is not installed +on your system already. + + +2. Installation & Configuration ================================================ + +<<<<<<< .mine +Unzip the downloaded file (letodms-.zip) in a directory that is +accessible via your web server. +======= +Unzip the downloaded archive in a directory that is accessible via your web server. +>>>>>>> .r12 + +You will also need to create a directory where the uploaded files +are stored. This directory should not be accessible via your +web-server for security reasons (create it outside of your www-root +directory or put an appropriate .htaccess file in it). + +Download the ADODB package from SourceForge. The URL for the ADODB project +page is: + + http://adodb.sourceforge.net/ + +Extract the distribution into a suitable directory. For example, one can +extract the files into the MyDMS root directory. + +Now, set up your Database. Use the included script create_tables.sql to +create all tables. Since the exact procedure differs on the +different database-systems I cannot give you a detailed instruction +here. Post any questions concering this problem to the letoDMS-Forum. In +general, create the database, make sure that the database has been selected +(e.g. "USE mydms;"), then run the script. As of 1.6.0, you must make sure +that the database user has "create temporary table" privileges. + +N.B. If the create_tables.sql script fails, it may be because the database +has been configured to use InnoDB tables by default instead of MyISAM tables. +If this is the case, it will be necessary to alter the sript such that each +create table command has the text " ENGINE = MyISAM" appended to the end, +immediately prior to the semi-colon. For example: + + Before: + + CREATE TABLE `tblDocumentLocks` ( + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`document`) + ) ; + + After: + + CREATE TABLE `tblDocumentLocks` ( + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`document`) + ) ENGINE = MyISAM ; + +Now edit the configuration file. First, go to the "inc" directory and copy +(or move) "inc.Settings-sample.php" to "inc.Settings.php". Open the file and +set the variables to the correct values (you will find a short description +for each variable in the file itself). + +TIP: You can find out your root-directory by placing the following +line into a php-file: +Open it with your browser and look for "DOCUMENT_ROOT". + +When running into problems with the db-settings, read the readme-file +in the adodb-directory or post questions to the letoDMS-Forum. + +By default PHP allows only files to be uploaded that are up to 2Mb +in size. You can change this limit by editing php.ini: Search for +"upload_max_filesize" and set it to the appropriate value (you +should also change the value for "post_max_size" and make sure that +your web-server does not limit the size either). + + +3. Email Notification ========================================================== + +A new, re-vamped notification system allows users to receive an email when a +document or folder is changed. This is a new, event-based mechanism that +notifies the user as soon as the change has been made and replaces the +cron mechanism originally developed. Any user that has read access to a +document or folder can subscribe to be notified of changes. Users that +have been assigned as reviewers or approvers for a document are +automatically added to the notification system for that document. + +A new page has been created for users to assist with the management of +their notification subscriptions. This can be found in the "My Account" +section under "Notification List". + + +4. Auto-conversion to HTML ===================================================== + +Version 1.3.0 introduces a new feature: Documents can automatically be +converted to HTML when uploading. +You can enable this feature by setting $_enableConverting (in +inc.Settings.php) to true. +You will also need to edit $_convertFileTypes (again in +inc.Settings.php). This array defines which file-types are converted +and how. +Under windows Word-, Excel- and Powerpoint-Files are automatically +converted using js-Scipts and MS-Office. I tested it with Office 2000 +and it worked just fine. +Under Linux mswordview is used to convert Word-Files by default. +Warning: Getting this feature working can be very tricky but if it +works it is a great enhancement I think. +Especially IIS could cause problems with its IIS-Guest-Account not +having enough rights to execute Word or Excel... +You will also have to edit your httpd.conf to be able to view the converted +files online. Load mod_rewrite and add to following lines to your conf: + + RewriteEngine on + RewriteCond %{REQUEST_URI} (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ + RewriteRule (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ $1op.ViewOnline.php?request=$2:$3 [PT] + +IIS Users can download the IIS Rewrite Engine for example: +http://www.qwerksoft.com/products/iisrewrite/ + +Post any questions to the MyDMS forum, please. + + +5. Nearly finished ============================================================= + +Now point your browser to http://your.server.com/mydms/index.php +and login with "admin" both as username and password. +After having logged in you should first choose "My Account" and +change the Administrator's password and email-address. + + +CONFIGURING MULTIPLE INSTANCES ================================================= + +Since version 2.0.x, letoDMS can be set up to run several parallel instances +sharing the same source but each instance has its own configuration. This is +quite useful if you intend to host letodms for several customers. + +1. Do a regular letoDMS installation =========================================== + +Actually there is no need to set up the database at this point but it won't +hurt since you'll need one in the next step anyway. The sources of letodms +can be anywhere you like. The do not have to be in you www-root. + +2. Setup the instance ========================================================== + +Create a directory in your www-root or use www-root for your instance. In the +second case, you will not be able to create a second instance. + +Go into that directory create the following links ( is the +directory of your initial letoDMS intallation). + +inc -> /inc +op -> /op +out -> /out +languages -> /languages +styles -> /styles +index.php -> /index.php + +Create a new directory conf and copy conf.Settings.php from your letoDMS source +into it. Modify it as explained above. + +Point your web browser towards the index.php file in your new instance. diff --git a/TODO b/TODO new file mode 100644 index 000000000..34c17b331 --- /dev/null +++ b/TODO @@ -0,0 +1,26 @@ +installation script: +- user simply unpack the tar.gz in a server folder and access that folder +- on startup if there are installation problems php automatically run the configuration script +- the data folder creation can be automatic (user/password for server) or manual (yet ready folder) +- same for the db and the db user +- db creation (run of create table.sql) shoul control if db is yet filled and control for update to do +- the inc/inc.Setting.php is filled asking user entry +- the script can be used to test installation problem without affecting the current installation + +The document state is currently not updated when a user is deleted from users list. +For example user A is the only pending approver for a document, then the document is in draft state. +When A is deleted the document should pass automatically in release status. +This could be done with a new function controlling the existance of all the pending approver/reviewer +and eventually updating the status of the document. This function will be called by user-remove function. + +Sometimes in the DB are written messages strings in plain language whose +language depends on the current user and will never be translated. +This can be avoided using only coded messages + +The mail language is translated using the current user language but should use +the receiver language (not easy). + +In my Documents->all documents there should be two lists: one (the current) with +the user's document, and another with the user's updated document (that's because +one user could have updated a document not owned by himself) + diff --git a/UPDATE-v1.8.1/update.php b/UPDATE-v1.8.1/update.php new file mode 100644 index 000000000..c1ac6fd2e --- /dev/null +++ b/UPDATE-v1.8.1/update.php @@ -0,0 +1,124 @@ +"; + +if (!$user->isAdmin()) { + print "ERROR: You must be administrator to execute the update"; + die; +} + +function update_content() +{ + + GLOBAL $db,$settings; + + // create temp folder + if (!makedir($settings->_contentDir."/temp")) return false; + + // for all contents + $queryStr = "SELECT * FROM tblDocumentContent"; + $contents = $db->getResultArray($queryStr); + + if (is_bool($contents)&&!$contents) return false; + + for ($i=0;$i_contentDir."/temp/".$contents[$i]["document"])) return false; + + // move every content in temp/documentID/version.fileType + $source = $settings->_contentDir."/".$contents[$i]["dir"]."/data".$contents[$i]["fileType"]; + + $target = $settings->_contentDir."/temp/".$contents[$i]["document"]."/".$contents[$i]["version"].$contents[$i]["fileType"]; + if (!copyFile($source, $target)) return false; + } + + + // change directory + if (!renameDir($settings->_contentDir."/".$settings->_contentOffsetDir,$settings->_contentDir."/old")) return false; + if (!renameDir($settings->_contentDir."/temp",$settings->_contentDir."/".$settings->_contentOffsetDir)) return false; + + return true; +} + +function update_db() +{ + GLOBAL $db,$settings; + + // for all contents + $queryStr = "SELECT * FROM tblDocumentContent"; + $contents = $db->getResultArray($queryStr); + + if (is_bool($contents)&&!$contents) return false; + + for ($i=0;$i_contentOffsetDir."/".$contents[$i]["document"]."/' WHERE document = ".$contents[$i]["document"]; + if (!$db->getResult($queryStr)) return false; + + } + + // run the update-2.0.sql + $fd = fopen ("update.sql", "r"); + + if (is_bool($fd)&&!$fd) return false; + + $queryStr = fread($fd, filesize("update.sql")); + + if (is_bool($queryStr)&&!$queryStr) return false; + + fclose ($fd); + if (!$db->getResult($queryStr)) return false; + + return true; +} + + +print "Updating ...please wait
"; + + +if (!update_content()) { + print "ERROR: An error occurred during the directory reordering"; + die; +} + +if (!update_db()) { + print "ERROR: An error occurred during the DB update"; + print "
Please try to execute the update.sql manually"; + die; +} + +print "Update done
"; + + print ""; + +?> diff --git a/UPDATE-v1.8.1/update.sql b/UPDATE-v1.8.1/update.sql new file mode 100644 index 000000000..ecaf891be --- /dev/null +++ b/UPDATE-v1.8.1/update.sql @@ -0,0 +1,33 @@ +-- mysql -uroot -ppassword mydms < update.sql +-- this script must be executed when updating form a version < 1.8.1 + +-- -------------------------------------------------------- + +-- +-- New table for document-related files +-- + +CREATE TABLE `tblDocumentFiles` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `comment` text, + `name` varchar(150) default NULL, + `date` int(12) default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(70) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Not longer required by new filesystem structure +-- + +DROP TABLE `tblDirPath`; +DROP TABLE `tblPathList`; + + diff --git a/UPDATE-v1.9/update.php b/UPDATE-v1.9/update.php new file mode 100644 index 000000000..ab190d1a1 --- /dev/null +++ b/UPDATE-v1.9/update.php @@ -0,0 +1,73 @@ +"; + +if (!$user->isAdmin()) { + print "ERROR: You must be administrator to execute the update"; + die; +} + +function update_db() +{ + global $db; + + $fd = fopen ("update.sql", "r"); + + if (is_bool($fd)&&!$fd) return false; + + $queryStr = fread($fd, filesize("update.sql")); + + if (is_bool($queryStr)&&!$queryStr) return false; + + fclose ($fd); + if (!$db->getResult($queryStr)) return false; + + return true; +} + +print "Updating ...please wait
"; + +print "
";
+
+if (!update_db()) {
+
+	print "
"; + + print "ERROR: An error occurred during the DB update"; + print "
Please try to execute the update.sql manually"; + die; + +}else print "Update done
"; + + print ""; + +?> diff --git a/UPDATE-v1.9/update.sql b/UPDATE-v1.9/update.sql new file mode 100644 index 000000000..d0aeaee6b --- /dev/null +++ b/UPDATE-v1.9/update.sql @@ -0,0 +1,38 @@ +-- mysql -uyouruser -pyourpassword yourdb < update.sql +-- this script must be executed when updating form a version < 1.9 + +-- -------------------------------------------------------- + +-- +-- New field for hidden users +-- + +ALTER TABLE `tblUsers` ADD `hidden` smallint(1) NOT NULL default '0' ; + +-- +-- New field for group manager permission +-- + +ALTER TABLE `tblGroupMembers` ADD `manager` smallint(1) NOT NULL default '0' ; + +-- +-- Table structure for mandatory reviewers +-- + +CREATE TABLE `tblMandatoryReviewers` ( + `userID` int(11) NOT NULL default '0', + `reviewerUserID` int(11) NOT NULL default '0', + `reviewerGroupID` int(11) NOT NULL default '0', + PRIMARY KEY (`userID`,`reviewerUserID`,`reviewerGroupID`) +) ; + +-- +-- Table structure for mandatory approvers +-- + +CREATE TABLE `tblMandatoryApprovers` ( + `userID` int(11) NOT NULL default '0', + `approverUserID` int(11) NOT NULL default '0', + `approverGroupID` int(11) NOT NULL default '0', + PRIMARY KEY (`userID`,`approverUserID`,`approverGroupID`) +) ; diff --git a/UPDATE-v2.0.1/update.php b/UPDATE-v2.0.1/update.php new file mode 100644 index 000000000..ab190d1a1 --- /dev/null +++ b/UPDATE-v2.0.1/update.php @@ -0,0 +1,73 @@ +"; + +if (!$user->isAdmin()) { + print "ERROR: You must be administrator to execute the update"; + die; +} + +function update_db() +{ + global $db; + + $fd = fopen ("update.sql", "r"); + + if (is_bool($fd)&&!$fd) return false; + + $queryStr = fread($fd, filesize("update.sql")); + + if (is_bool($queryStr)&&!$queryStr) return false; + + fclose ($fd); + if (!$db->getResult($queryStr)) return false; + + return true; +} + +print "Updating ...please wait
"; + +print "
";
+
+if (!update_db()) {
+
+	print "
"; + + print "ERROR: An error occurred during the DB update"; + print "
Please try to execute the update.sql manually"; + die; + +}else print "Update done
"; + + print ""; + +?> diff --git a/UPDATE-v2.0.1/update.sql b/UPDATE-v2.0.1/update.sql new file mode 100644 index 000000000..e034aed46 --- /dev/null +++ b/UPDATE-v2.0.1/update.sql @@ -0,0 +1,19 @@ +-- mysql -uyouruser -pyourpassword yourdb < update.sql +-- this script must be executed when updating form a version < 2.0 + +-- -------------------------------------------------------- + +-- +-- Table structure for events (calendar) +-- + +CREATE TABLE `tblEvents` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(150) default NULL, + `comment` text, + `start` int(12) default NULL, + `stop` int(12) default NULL, + `date` int(12) default NULL, + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; diff --git a/conf/conf.Settings.php.template b/conf/conf.Settings.php.template new file mode 100644 index 000000000..5a9624848 --- /dev/null +++ b/conf/conf.Settings.php.template @@ -0,0 +1,166 @@ +_convertFileTypes = array(".doc" => "cscript \"" . $this->_rootDir."op/convert_word.js\" {SOURCE} {TARGET}", + ".xls" => "cscript \"".$this->_rootDir."op/convert_excel.js\" {SOURCE} {TARGET}", + ".ppt" => "cscript \"".$this->_rootDir."op/convert_pp.js\" {SOURCE} {TARGET}"); + // For linux users + // $this->_convertFileTypes = array(".doc" => "mswordview -o {TARGET} {SOURCE}"); + } +} + +$settings = new Settings(); + +?> diff --git a/create_tables.sql b/create_tables.sql new file mode 100644 index 000000000..b54a85e67 --- /dev/null +++ b/create_tables.sql @@ -0,0 +1,406 @@ +-- +-- Table structure for table `tblACLs` +-- + +CREATE TABLE `tblACLs` ( + `id` int(11) NOT NULL auto_increment, + `target` int(11) NOT NULL default '0', + `targetType` tinyint(4) NOT NULL default '0', + `userID` int(11) NOT NULL default '-1', + `groupID` int(11) NOT NULL default '-1', + `mode` tinyint(4) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentApproveLog` +-- + +CREATE TABLE `tblDocumentApproveLog` ( + `approveLogID` int(11) NOT NULL auto_increment, + `approveID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`approveLogID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentApprovers` +-- + +CREATE TABLE `tblDocumentApprovers` ( + `approveID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `type` tinyint(4) NOT NULL default '0', + `required` int(11) NOT NULL default '0', + PRIMARY KEY (`approveID`), + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentContent` +-- + +CREATE TABLE `tblDocumentContent` ( + `document` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL auto_increment, + `comment` text, + `date` int(12) default NULL, + `createdBy` int(11) default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(70) NOT NULL default '', + PRIMARY KEY (`document`,`version`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentLinks` +-- + +CREATE TABLE `tblDocumentLinks` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) NOT NULL default '0', + `target` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `public` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentFiles` +-- + +CREATE TABLE `tblDocumentFiles` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `comment` text, + `name` varchar(150) default NULL, + `date` int(12) default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(70) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentLocks` +-- + +CREATE TABLE `tblDocumentLocks` ( + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`document`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentReviewLog` +-- + +CREATE TABLE `tblDocumentReviewLog` ( + `reviewLogID` int(11) NOT NULL auto_increment, + `reviewID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`reviewLogID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentReviewers` +-- + +CREATE TABLE `tblDocumentReviewers` ( + `reviewID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `type` tinyint(4) NOT NULL default '0', + `required` int(11) NOT NULL default '0', + PRIMARY KEY (`reviewID`), + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentStatus` +-- + +CREATE TABLE `tblDocumentStatus` ( + `statusID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`statusID`), + UNIQUE KEY `documentID` (`documentID`,`version`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentStatusLog` +-- + +CREATE TABLE `tblDocumentStatusLog` ( + `statusLogID` int(11) NOT NULL auto_increment, + `statusID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`statusLogID`), + KEY `statusID` (`statusID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocuments` +-- + +CREATE TABLE `tblDocuments` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(150) default NULL, + `comment` text, + `date` int(12) default NULL, + `expires` int(12) default NULL, + `owner` int(11) default NULL, + `folder` int(11) default NULL, + `folderList` text NOT NULL, + `inheritAccess` tinyint(1) NOT NULL default '1', + `defaultAccess` tinyint(4) NOT NULL default '0', + `locked` int(11) NOT NULL default '-1', + `keywords` text NOT NULL, + `sequence` double NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblFolders` +-- + +CREATE TABLE `tblFolders` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(70) default NULL, + `parent` int(11) default NULL, + `comment` text, + `owner` int(11) default NULL, + `inheritAccess` tinyint(1) NOT NULL default '1', + `defaultAccess` tinyint(4) NOT NULL default '0', + `sequence` double NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `parent` (`parent`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblGroupMembers` +-- + +CREATE TABLE `tblGroupMembers` ( + `groupID` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `manager` smallint(1) NOT NULL default '0', + PRIMARY KEY (`groupID`,`userID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblGroups` +-- + +CREATE TABLE `tblGroups` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(50) default NULL, + `comment` text NOT NULL, + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblKeywordCategories` +-- + +CREATE TABLE `tblKeywordCategories` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(255) NOT NULL default '', + `owner` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblKeywords` +-- + +CREATE TABLE `tblKeywords` ( + `id` int(11) NOT NULL auto_increment, + `category` int(11) NOT NULL default '0', + `keywords` text NOT NULL, + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblNotify` +-- + +CREATE TABLE `tblNotify` ( + `target` int(11) NOT NULL default '0', + `targetType` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '-1', + `groupID` int(11) NOT NULL default '-1', + PRIMARY KEY (`target`,`targetType`,`userID`,`groupID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblSessions` +-- + +CREATE TABLE `tblSessions` ( + `id` varchar(50) NOT NULL default '', + `userID` int(11) NOT NULL default '0', + `lastAccess` int(11) NOT NULL default '0', + `theme` varchar(30) NOT NULL default '', + `language` varchar(30) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblUserImages` +-- + +CREATE TABLE `tblUserImages` ( + `id` int(11) NOT NULL auto_increment, + `userID` int(11) NOT NULL default '0', + `image` blob NOT NULL, + `mimeType` varchar(10) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblUsers` +-- + +CREATE TABLE `tblUsers` ( + `id` int(11) NOT NULL auto_increment, + `login` varchar(50) default NULL, + `pwd` varchar(50) default NULL, + `fullName` varchar(100) default NULL, + `email` varchar(70) default NULL, + `language` varchar(32) NOT NULL, + `theme` varchar(32) NOT NULL, + `comment` text NOT NULL, + `isAdmin` smallint(1) NOT NULL default '0', + `hidden` smallint(1) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- dirID is the current target content subdirectory. The last file loaded +-- into MyDMS will be physically stored here. Is updated every time a new +-- file is uploaded. +-- +-- dirPath is a essentially a foreign key from tblPathList, referencing the +-- parent directory path for dirID, relative to MyDMS's _contentDir. +-- + +CREATE TABLE `tblDirPath` ( + `dirID` int(11) NOT NULL auto_increment, + `dirPath` varchar(255) NOT NULL, + PRIMARY KEY (`dirPath`,`dirID`) +) ; + +-- -------------------------------------------------------- + +CREATE TABLE `tblPathList` ( + `id` int(11) NOT NULL auto_increment, + `parentPath` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for mandatory reviewers +-- + +CREATE TABLE `tblMandatoryReviewers` ( + `userID` int(11) NOT NULL default '0', + `reviewerUserID` int(11) NOT NULL default '0', + `reviewerGroupID` int(11) NOT NULL default '0', + PRIMARY KEY (`userID`,`reviewerUserID`,`reviewerGroupID`) +) ; + +-- +-- Table structure for mandatory approvers +-- + +CREATE TABLE `tblMandatoryApprovers` ( + `userID` int(11) NOT NULL default '0', + `approverUserID` int(11) NOT NULL default '0', + `approverGroupID` int(11) NOT NULL default '0', + PRIMARY KEY (`userID`,`approverUserID`,`approverGroupID`) +) ; + +-- +-- Table structure for events (calendar) +-- + +CREATE TABLE `tblEvents` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(150) default NULL, + `comment` text, + `start` int(12) default NULL, + `stop` int(12) default NULL, + `date` int(12) default NULL, + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + + +-- +-- Initial content for database +-- + +INSERT INTO tblFolders VALUES (1, 'DMS', 0, 'DMS root', 1, 0, 2, 0); +INSERT INTO tblUsers VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'address@server.com', '', '', '', 1, 0); +INSERT INTO tblUsers VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', 0, 0); diff --git a/delete_all_contents.sql b/delete_all_contents.sql new file mode 100644 index 000000000..a0d38c56f --- /dev/null +++ b/delete_all_contents.sql @@ -0,0 +1,309 @@ +-- this delete all the db content except users +-- mysql -uroot -ppassword mydms < delete_all_contents.sql + + +-- +-- Table structure for table `tblACLs` +-- + +DROP TABLE `tblACLs`; + +CREATE TABLE `tblACLs` ( + `id` int(11) NOT NULL auto_increment, + `target` int(11) NOT NULL default '0', + `targetType` tinyint(4) NOT NULL default '0', + `userID` int(11) NOT NULL default '-1', + `groupID` int(11) NOT NULL default '-1', + `mode` tinyint(4) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentApproveLog` +-- + +DROP TABLE `tblDocumentApproveLog`; + +CREATE TABLE `tblDocumentApproveLog` ( + `approveLogID` int(11) NOT NULL auto_increment, + `approveID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`approveLogID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentApprovers` +-- + +DROP TABLE `tblDocumentApprovers`; + +CREATE TABLE `tblDocumentApprovers` ( + `approveID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `type` tinyint(4) NOT NULL default '0', + `required` int(11) NOT NULL default '0', + PRIMARY KEY (`approveID`), + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentContent` +-- + +DROP TABLE `tblDocumentContent`; + +CREATE TABLE `tblDocumentContent` ( + `document` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL auto_increment, + `comment` text, + `date` int(12) default NULL, + `createdBy` int(11) default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(70) NOT NULL default '', + PRIMARY KEY (`document`,`version`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentLinks` +-- + +DROP TABLE `tblDocumentLinks`; + +CREATE TABLE `tblDocumentLinks` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) NOT NULL default '0', + `target` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `public` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentFiles` +-- + +DROP TABLE `tblDocumentFiles`; + +CREATE TABLE `tblDocumentFiles` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `comment` text, + `name` varchar(150) default NULL, + `date` int(12) default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(70) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentLocks` +-- +DROP TABLE `tblDocumentLocks`; + +CREATE TABLE `tblDocumentLocks` ( + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`document`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentReviewLog` +-- +DROP TABLE `tblDocumentReviewLog`; + +CREATE TABLE `tblDocumentReviewLog` ( + `reviewLogID` int(11) NOT NULL auto_increment, + `reviewID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`reviewLogID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentReviewers` +-- +DROP TABLE `tblDocumentReviewers`; + +CREATE TABLE `tblDocumentReviewers` ( + `reviewID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `type` tinyint(4) NOT NULL default '0', + `required` int(11) NOT NULL default '0', + PRIMARY KEY (`reviewID`), + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentStatus` +-- +DROP TABLE `tblDocumentStatus`; + +CREATE TABLE `tblDocumentStatus` ( + `statusID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`statusID`), + UNIQUE KEY `documentID` (`documentID`,`version`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentStatusLog` +-- +DROP TABLE `tblDocumentStatusLog`; + +CREATE TABLE `tblDocumentStatusLog` ( + `statusLogID` int(11) NOT NULL auto_increment, + `statusID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`statusLogID`), + KEY `statusID` (`statusID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocuments` +-- +DROP TABLE `tblDocuments`; + +CREATE TABLE `tblDocuments` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(150) default NULL, + `comment` text, + `date` int(12) default NULL, + `expires` int(12) default NULL, + `owner` int(11) default NULL, + `folder` int(11) default NULL, + `folderList` text NOT NULL, + `inheritAccess` tinyint(1) NOT NULL default '1', + `defaultAccess` tinyint(4) NOT NULL default '0', + `locked` int(11) NOT NULL default '-1', + `keywords` text NOT NULL, + `sequence` double NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblFolders` +-- +DROP TABLE `tblFolders`; + +CREATE TABLE `tblFolders` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(70) default NULL, + `parent` int(11) default NULL, + `comment` text, + `owner` int(11) default NULL, + `inheritAccess` tinyint(1) NOT NULL default '1', + `defaultAccess` tinyint(4) NOT NULL default '0', + `sequence` double NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `parent` (`parent`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblKeywordCategories` +-- +DROP TABLE `tblKeywordCategories`; + +CREATE TABLE `tblKeywordCategories` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(255) NOT NULL default '', + `owner` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblKeywords` +-- + +DROP TABLE `tblKeywords`; + +CREATE TABLE `tblKeywords` ( + `id` int(11) NOT NULL auto_increment, + `category` int(11) NOT NULL default '0', + `keywords` text NOT NULL, + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblNotify` +-- +DROP TABLE `tblNotify`; + +CREATE TABLE `tblNotify` ( + `target` int(11) NOT NULL default '0', + `targetType` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '-1', + `groupID` int(11) NOT NULL default '-1', + PRIMARY KEY (`target`,`targetType`,`userID`,`groupID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblSessions` +-- +DROP TABLE `tblSessions`; + +CREATE TABLE `tblSessions` ( + `id` varchar(50) NOT NULL default '', + `userID` int(11) NOT NULL default '0', + `lastAccess` int(11) NOT NULL default '0', + `theme` varchar(30) NOT NULL default '', + `language` varchar(30) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Initial content for database +-- + +INSERT INTO tblFolders VALUES (1, 'DMS', 0, 'DMS root', 1, 0, 2, 0); diff --git a/inc.Settings.php b/inc.Settings.php new file mode 100644 index 000000000..e4f6798b8 --- /dev/null +++ b/inc.Settings.php @@ -0,0 +1,132 @@ +_convertFileTypes = array(".doc" => "cscript \"" . $this->_rootDir."op/convert_word.js\" {SOURCE} {TARGET}", + ".xls" => "cscript \"".$this->_rootDir."op/convert_excel.js\" {SOURCE} {TARGET}", + ".ppt" => "cscript \"".$this->_rootDir."op/convert_pp.js\" {SOURCE} {TARGET}"); + // For linux users + // $this->_convertFileTypes = array(".doc" => "mswordview -o {TARGET} {SOURCE}"); + } +} + +$settings = new Settings(); + +?> diff --git a/inc/inc.AccessUtils.php b/inc/inc.AccessUtils.php new file mode 100644 index 000000000..ff4f49f80 --- /dev/null +++ b/inc/inc.AccessUtils.php @@ -0,0 +1,63 @@ +="); +define ("O_LTEQ", "<="); +define ("O_EQ", "="); + +define("T_FOLDER", 1); //TargetType = Folder +define("T_DOCUMENT", 2); // " = Document + +//Sortiert aus dem Array $objArr (entweder Folder- oder Document-Objeckte) alle Elemente heraus, auf +//die der Benutzer $user nicht mindestens den Zugriff $minMode hat und gib die restlichen Elemente zurück +function filterAccess($objArr, $user, $minMode) +{ + if (!is_array($objArr)) { + return array(); + } + $newArr = array(); + foreach ($objArr as $obj) + { + if ($obj->getAccessMode($user) >= $minMode) + array_push($newArr, $obj); + } + return $newArr; +} + +//Sortiert aus dem Benutzer-Array $users alle Benutzer heraus, die auf den Ordner oder das Dokument $obj +//nicht mindestens den Zugriff $minMode haben und gibt die restlichen Benutzer zurück +function filterUsersByAccess($obj, $users, $minMode) +{ + $newArr = array(); + foreach ($users as $currUser) + { + if ($obj->getAccessMode($currUser) >= $minMode) + array_push($newArr, $currUser); + } + return $newArr; +} + +?> diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php new file mode 100644 index 000000000..b17905663 --- /dev/null +++ b/inc/inc.Authentication.php @@ -0,0 +1,62 @@ +_httpRoot . "out/out.Login.php?referuri=".$refer); + exit; +} + +include_once("inc.Utils.php"); + +$dms_session = sanitizeString($_COOKIE["mydms_session"]); + +$queryStr = "SELECT * FROM tblSessions WHERE id = '".$dms_session."'"; +$resArr = $db->getResultArray($queryStr); +if (is_bool($resArr) && $resArr == false) + die ("Error while reading from tblSessions: " . $db->getErrorMsg()); + +if (count($resArr) == 0) +{ + setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot); //delete cookie + header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); + exit; +} + +$resArr = $resArr[0]; + +$queryStr = "UPDATE tblSessions SET lastAccess = " . mktime() . " WHERE id = '" . $resArr["id"] . "'"; +if (!$db->getResult($queryStr)) + die ("Error while updating tblSessions: " . $db->getErrorMsg()); + +$user = getUser($resArr["userID"]); +if (!is_object($user)) { + setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot); //delete cookie + header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); + exit; +} + +$theme = $resArr["theme"]; +include $settings->_rootDir . "languages/" . $resArr["language"] . "/lang.inc"; + +?> diff --git a/inc/inc.Calendar.php b/inc/inc.Calendar.php new file mode 100644 index 000000000..caf441583 --- /dev/null +++ b/inc/inc.Calendar.php @@ -0,0 +1,253 @@ += " . $date; + $ret = $db->getResultArray($queryStr); + return $ret; +} + +function getEventsInInterval($start, $stop){ + + global $db; + + $queryStr = "SELECT * FROM tblEvents WHERE ( start <= " . $start . " AND stop >= " . $start . " ) ". + "OR ( start <= " . $stop . " AND stop >= " . $stop . " ) ". + "OR ( start >= " . $start . " AND stop <= " . $stop . " )"; + $ret = $db->getResultArray($queryStr); + return $ret; +} + +function addEvent($from, $to, $name, $comment ){ + + global $db,$user; + + $queryStr = "INSERT INTO tblEvents (name, comment, start, stop, date, userID) VALUES ". + "('".$name."', '".$comment."', ".$from.", ".$to.", ".mktime().", ".$user->getID().")"; + + $ret = $db->getResult($queryStr); + return $ret; +} + +function getEvent($id){ + + if (!is_numeric($id)) return false; + + global $db; + + $queryStr = "SELECT * FROM tblEvents WHERE id = " . $id; + $ret = $db->getResultArray($queryStr); + + if (is_bool($ret) && $ret == false) return false; + else if (count($ret) != 1) return false; + + return $ret[0]; +} + +function editEvent($id, $from, $to, $name, $comment ){ + + if (!is_numeric($id)) return false; + + global $db; + + $queryStr = "UPDATE tblEvents SET start = " . $from . ", stop = " . $to . ", name = '" . $name . "', comment = '" . $comment . "', date = " . mktime() . " WHERE id = ". $id; + $ret = $db->getResult($queryStr); + return $ret; +} + +function delEvent($id){ + + if (!is_numeric($id)) return false; + + global $db; + + $queryStr = "DELETE FROM tblEvents WHERE id = " . $id; + $ret = $db->getResult($queryStr); + return $ret; +} + +// utilities /////////////////////////////////////////////////////////////////// + +function generateCalendarArrays() +{ + global $dayNames,$monthNames,$dayNamesLong; + + $monthNames = array( getMLText("january"), + getMLText("february"), + getMLText("march"), + getMLText("april"), + getMLText("may"), + getMLText("june"), + getMLText("july"), + getMLText("august"), + getMLText("september"), + getMLText("october"), + getMLText("november"), + getMLText("december") ); + + $dayNamesLong = array( getMLText("sunday"), + getMLText("monday"), + getMLText("tuesday"), + getMLText("wednesday"), + getMLText("thursday"), + getMLText("friday"), + getMLText("saturday") ); + + $dayNames = array(); + foreach ( $dayNamesLong as $dn ){ + $dayNames[] = substr($dn,0,2); + } +} + +// Calculate the number of days in a month, taking into account leap years. +function getDaysInMonth($month, $year) +{ + if ($month < 1 || $month > 12) return 0; + + $daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); + $d = $daysInMonth[$month - 1]; + + if ($month == 2){ + + if ($year%4 == 0){ + + if ($year%100 == 0){ + + if ($year%400 == 0) $d = 29; + } + else $d = 29; + } + } + return $d; +} + +// Adjust dates to allow months > 12 and < 0 and day<0 or day>days of the month +function adjustDate(&$day,&$month,&$year) +{ + $d=getDate(mktime(12,0,0, $month, $day, $year)); + $month=$d["mon"]; + $day=$d["mday"]; + $year=$d["year"]; +} + +// output ////////////////////////////////////////////////////////////////////// + +// Generate the HTML for a given month +function getMonthHTML($month, $year) +{ + global $dayNames,$monthNames,$settings; + + if (!isset($monthNames)) generateCalendarArrays(); + if (!isset($dayNames)) generateCalendarArrays(); + + $startDay = $settings->_firstDayOfWeek; + + $day=1; + adjustDate($day,$month,$year); + + $daysInMonth = getDaysInMonth($month, $year); + $date = getdate(mktime(12, 0, 0, $month, 1, $year)); + + $first = $date["wday"]; + $monthName = $monthNames[$month - 1]; + + $s = "\n"; + + $s .= "\n"; + $s .= "\n"; ; + $s .= "\n"; + + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + $s .= "\n"; + + // We need to work out what date to start at so that the first appears in the correct column + $d = $startDay + 1 - $first; + while ($d > 1) $d -= 7; + + // Make sure we know when today is, so that we can use a different CSS style + $today = getdate(time()); + + while ($d <= $daysInMonth) + { + $s .= "\n"; + + for ($i = 0; $i < 7; $i++){ + + $class = ($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "today" : ""; + $s .= "\n"; + $d++; + } + $s .= "\n"; + } + + $s .= "
".$monthName."
" . $dayNames[($startDay)%7] . "" . $dayNames[($startDay+1)%7] . "" . $dayNames[($startDay+2)%7] . "" . $dayNames[($startDay+3)%7] . "" . $dayNames[($startDay+4)%7] . "" . $dayNames[($startDay+5)%7] . "" . $dayNames[($startDay+6)%7] . "
"; + + if ($d > 0 && $d <= $daysInMonth){ + + $s .= "".$d.""; + } + else $s .= " "; + + $s .= "
\n"; + + return $s; +} + +function printYearTable($year) +{ + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "
" . getMonthHTML(1 , $year) ."" . getMonthHTML(2 , $year) ."" . getMonthHTML(3 , $year) ."" . getMonthHTML(4 , $year) ."
" . getMonthHTML(5 , $year) ."" . getMonthHTML(6 , $year) ."" . getMonthHTML(7 , $year) ."" . getMonthHTML(8 , $year) ."
" . getMonthHTML(9 , $year) ."" . getMonthHTML(10, $year) ."" . getMonthHTML(11, $year) ."" . getMonthHTML(12, $year) ."
\n"; +} + +?> diff --git a/inc/inc.ClassAccess.php b/inc/inc.ClassAccess.php new file mode 100644 index 000000000..849b274d8 --- /dev/null +++ b/inc/inc.ClassAccess.php @@ -0,0 +1,72 @@ +_userID = $userID; + $this->_mode = $mode; + } + + function getUserID() { return $this->_userID; } + + function getMode() { return $this->_mode; } + + function getUser() + { + if (!isset($this->_user)) + $this->_user = getUser($this->_userID); + return $this->_user; + } +} + + +class GroupAccess +{ + var $_groupID; + var $_mode; + + function GroupAccess($groupID, $mode) + { + $this->_groupID = $groupID; + $this->_mode = $mode; + } + + function getGroupID() { return $this->_groupID; } + + function getMode() { return $this->_mode; } + + function getGroup() + { + if (!isset($this->_group)) + $this->_group = getGroup($this->_groupID); + return $this->_group; + } +} +?> diff --git a/inc/inc.ClassDocument.php b/inc/inc.ClassDocument.php new file mode 100644 index 000000000..ce169d768 --- /dev/null +++ b/inc/inc.ClassDocument.php @@ -0,0 +1,2678 @@ +getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr) != 1) + return false; + $resArr = $resArr[0]; + + // New Locking mechanism uses a separate table to track the lock. + $queryStr = "SELECT * FROM tblDocumentLocks WHERE document = " . $id; + $lockArr = $db->getResultArray($queryStr); + if ((is_bool($lockArr) && $lockArr==false) || (count($lockArr)==0)) { + // Could not find a lock on the selected document. + $lock = -1; + } + else { + // A lock has been identified for this document. + $lock = $lockArr[0]["userID"]; + } + + return new Document($resArr["id"], $resArr["name"], $resArr["comment"], $resArr["date"], $resArr["expires"], $resArr["owner"], $resArr["folder"], $resArr["inheritAccess"], $resArr["defaultAccess"], $lock, $resArr["keywords"], $resArr["sequence"]); +} + + +// these are the document information (all versions) +class Document +{ + var $_id; + var $_name; + var $_comment; + var $_ownerID; + var $_folderID; + var $_expires; + var $_inheritAccess; + var $_defaultAccess; + var $_locked; + var $_keywords; + var $_sequence; + + function Document($id, $name, $comment, $date, $expires, $ownerID, $folderID, $inheritAccess, $defaultAccess, $locked, $keywords, $sequence) + { + $this->_id = $id; + $this->_name = $name; + $this->_comment = $comment; + $this->_date = $date; + $this->_expires = $expires; + $this->_ownerID = $ownerID; + $this->_folderID = $folderID; + $this->_inheritAccess = $inheritAccess; + $this->_defaultAccess = $defaultAccess; + $this->_locked = ($locked == null || $locked == '' ? -1 : $locked); + $this->_keywords = $keywords; + $this->_sequence = $sequence; + } + + function getDir() { + global $settings; + return $settings->_contentOffsetDir."/".$this->_id."/"; + } + + + function getID() { return $this->_id; } + + function getName() { return $this->_name; } + + function setName($newName) { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblDocuments SET name = '" . $newName . "' WHERE id = ". $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("document_renamed_email"); + $message = getMLText("document_renamed_email")."\r\n"; + $message .= + getMLText("old").": ".$this->_name."\r\n". + getMLText("new").": ".$newName."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->getFolder())."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + // if user is not owner send notification to owner + if ($user->getID()!= $this->_ownerID) + Email::toIndividual($user, $this->getOwner(), $subject, $message); + + $this->_name = $newName; + return true; + } + + function getComment() { return $this->_comment; } + + function setComment($newComment) { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblDocuments SET comment = '" . $newComment . "' WHERE id = ". $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("comment_changed_email"); + $message = getMLText("comment_changed_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->getFolder())."\r\n". + getMLText("comment").": ".$newComment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + $this->_comment = $newComment; + return true; + } + + function getKeywords() { return $this->_keywords; } + + function setKeywords($newKeywords) + { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblDocuments SET keywords = '" . $newKeywords . "' WHERE id = ". $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_keywords = $newKeywords; + return true; + } + + function getDate() + { + return $this->_date; + } + + function getFolder() + { + if (!isset($this->_folder)) + $this->_folder = getFolder($this->_folderID); + return $this->_folder; + } + + function setFolder($newFolder) + { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblDocuments SET folder = " . $newFolder->getID() . " WHERE id = ". $this->_id; + if (!$db->getResult($queryStr)) + return false; + $this->_folderID = $newFolder->getID(); + $this->_folder = $newFolder; + + // Make sure that the folder search path is also updated. + $path = $newFolder->getPath(); + $flist = ""; + foreach ($path as $f) { + $flist .= ":".$f->getID(); + } + if (strlen($flist)>1) { + $flist .= ":"; + } + $queryStr = "UPDATE tblDocuments SET folderList = '" . $flist . "' WHERE id = ". $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("document_moved_email"); + $message = getMLText("document_moved_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->getFolder())."\r\n". + getMLText("comment").": ".$newComment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + // if user is not owner send notification to owner + if ($user->getID()!= $this->_ownerID) + Email::toIndividual($user, $this->getOwner(), $subject, $message); + + return true; + } + + function getOwner() { + if (!isset($this->_owner)) + $this->_owner = getUser($this->_ownerID); + return $this->_owner; + } + + function setOwner($newOwner) { + GLOBAL $db, $user, $settings; + + $oldOwner = $this->getOwner(); + + $queryStr = "UPDATE tblDocuments set owner = " . $newOwner->getID() . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("ownership_changed_email"); + $message = getMLText("ownership_changed_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_name."\r\n". + getMLText("old").": ".$oldOwner->getFullName()."\r\n". + getMLText("new").": ".$newOwner->getFullName()."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->getFolder())."\r\n". + getMLText("comment").": ".$this->_comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + // Send notification to previous owner. + Email::toIndividual($user, $oldOwner, $subject, $message); + + $this->_ownerID = $newOwner->getID(); + $this->_owner = $newOwner; + return true; + } + + function getDefaultAccess() + { + if ($this->inheritsAccess()) + { + $res = $this->getFolder(); + if (!$res) return false; + return $this->_folder->getDefaultAccess(); + } + return $this->_defaultAccess; + } + + function setDefaultAccess($mode) { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblDocuments set defaultAccess = " . $mode . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("access_permission_changed_email"); + $message = getMLText("access_permission_changed_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->getFolder())."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + $this->_defaultAccess = $mode; + + // If any of the notification subscribers no longer have read access, + // remove their subscription. + foreach ($this->_notifyList["users"] as $u) { + if ($this->getAccessMode($u) < M_READ) { + $this->removeNotify($u->getID(), true); + } + } + foreach ($this->_notifyList["groups"] as $g) { + if ($this->getGroupAccessMode($g) < M_READ) { + $this->removeNotify($g->getID(), false); + } + } + + return true; + } + + function inheritsAccess() { return $this->_inheritAccess; } + + function setInheritAccess($inheritAccess) { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblDocuments SET inheritAccess = " . ($inheritAccess ? "1" : "0") . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_inheritAccess = ($inheritAccess ? "1" : "0"); + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("access_permission_changed_email"); + $message = getMLText("access_permission_changed_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->getFolder())."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + // If any of the notification subscribers no longer have read access, + // remove their subscription. + foreach ($this->_notifyList["users"] as $u) { + if ($this->getAccessMode($u) < M_READ) { + $this->removeNotify($u->getID(), true); + } + } + foreach ($this->_notifyList["groups"] as $g) { + if ($this->getGroupAccessMode($g) < M_READ) { + $this->removeNotify($g->getID(), false); + } + } + + return true; + } + + function expires() + { + if (intval($this->_expires) == 0) + return false; + else + return true; + } + + function getExpires() + { + if (intval($this->_expires) == 0) + return false; + else + return $this->_expires; + } + + function setExpires($expires) { + GLOBAL $db, $user, $settings; + + $expires = (!$expires) ? 0 : $expires; + + if ($expires == $this->_expires) { + // No change is necessary. + return true; + } + + $queryStr = "UPDATE tblDocuments SET expires = " . $expires . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("expiry_changed_email"); + $message = getMLText("expiry_changed_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->getFolder())."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + $this->_expires = $expires; + return true; + } + + function hasExpired(){ + + if (intval($this->_expires) == 0) return false; + if (time()>$this->_expires+24*60*60) return true; + return false; + } + + // return true if status has changed (to reload page) + function verifyLastestContentExpriry(){ + + $lc=$this->getLatestContent(); + $st=$lc->getStatus(); + + if (($st["status"]==S_DRAFT_REV || $st["status"]==S_DRAFT_APP) && $this->hasExpired()){ + $lc->setStatus(S_EXPIRED,""); + return true; + } + else if ($st["status"]==S_EXPIRED && !$this->hasExpired() ){ + $lc->verifyStatus(true); + return true; + } + return false; + } + + function isLocked() { return $this->_locked != -1; } + + function setLocked($falseOrUser) + { + GLOBAL $db; + + $lockUserID = -1; + if (is_bool($falseOrUser) && !$falseOrUser) { + $queryStr = "DELETE FROM tblDocumentLocks WHERE document = ".$this->_id; + } + else if (is_object($falseOrUser)) { + $queryStr = "INSERT INTO tblDocumentLocks (document, userID) VALUES (".$this->_id.", ".$falseOrUser->getID().")"; + $lockUserID = $falseOrUser->getID(); + } + else { + return false; + } + if (!$db->getResult($queryStr)) { + return false; + } + unset($this->_lockingUser); + $this->_locked = $lockUserID; + return true; + } + + function getLockingUser() + { + if (!$this->isLocked()) + return false; + + if (!isset($this->_lockingUser)) + $this->_lockingUser = getUser($this->_locked); + return $this->_lockingUser; + } + + function getSequence() { return $this->_sequence; } + + function setSequence($seq) + { + GLOBAL $db; + + $queryStr = "UPDATE tblDocuments SET sequence = " . $seq . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_sequence = $seq; + return true; + } + + function clearAccessList() + { + GLOBAL $db; + + $queryStr = "DELETE FROM tblACLs WHERE targetType = " . T_DOCUMENT . " AND target = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_accessList); + return true; + } + + function getAccessList($mode = M_ANY, $op = O_EQ) + { + GLOBAL $db; + + if ($this->inheritsAccess()) + { + $res = $this->getFolder(); + if (!$res) return false; + return $this->_folder->getAccessList($mode, $op); + } + + if (!isset($this->_accessList[$mode])) + { + if ($op!=O_GTEQ && $op!=O_LTEQ && $op!=O_EQ) { + return false; + } + $modeStr = ""; + if ($mode!=M_ANY) { + $modeStr = " AND mode".$op.$mode; + } + $queryStr = "SELECT * FROM tblACLs WHERE targetType = ".T_DOCUMENT. + " AND target = " . $this->_id . $modeStr . " ORDER BY targetType"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + + $this->_accessList[$mode] = array("groups" => array(), "users" => array()); + foreach ($resArr as $row) + { + if ($row["userID"] != -1) + array_push($this->_accessList[$mode]["users"], new UserAccess($row["userID"], $row["mode"])); + else //if ($row["groupID"] != -1) + array_push($this->_accessList[$mode]["groups"], new GroupAccess($row["groupID"], $row["mode"])); + } + } + + return $this->_accessList[$mode]; + } + + function addAccess($mode, $userOrGroupID, $isUser) { + GLOBAL $db; + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + $queryStr = "INSERT INTO tblACLs (target, targetType, ".$userOrGroup.", mode) VALUES + (".$this->_id.", ".T_DOCUMENT.", " . $userOrGroupID . ", " .$mode. ")"; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_accessList); + + // Update the notify list, if necessary. + if ($mode == M_NONE) { + $this->removeNotify($userOrGroupID, $isUser); + } + + return true; + } + + function changeAccess($newMode, $userOrGroupID, $isUser) { + GLOBAL $db; + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + $queryStr = "UPDATE tblACLs SET mode = " . $newMode . " WHERE targetType = ".T_DOCUMENT." AND target = " . $this->_id . " AND " . $userOrGroup . " = " . $userOrGroupID; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_accessList); + + // Update the notify list, if necessary. + if ($newMode == M_NONE) { + $this->removeNotify($userOrGroupID, $isUser); + } + + return true; + } + + function removeAccess($userOrGroupID, $isUser) { + GLOBAL $db; + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + $queryStr = "DELETE FROM tblACLs WHERE targetType = ".T_DOCUMENT." AND target = ".$this->_id." AND ".$userOrGroup." = " . $userOrGroupID; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_accessList); + + // Update the notify list, if necessary. + $mode = ($isUser ? $this->getAccessMode(getUser($userOrGroupID)) : $this->getGroupAccessMode(getGroup($userOrGroupID))); + if ($mode == M_NONE) { + $this->removeNotify($userOrGroupID, $isUser); + } + + return true; + } + + /* + * Liefert die Art der Zugriffsberechtigung für den User $user; Mögliche Rechte: n (keine), r (lesen), w (schreiben+lesen), a (alles) + * Zunächst wird Geprüft, ob die Berechtigung geerbt werden soll; in diesem Fall wird die Anfrage an den Eltern-Ordner weitergeleitet. + * Ansonsten werden die ACLs durchgegangen: Die höchstwertige Berechtigung gilt. + * Wird bei den ACLs nicht gefunden, wird die Standard-Berechtigung zurückgegeben. + * Ach ja: handelt es sich bei $user um den Besitzer ist die Berechtigung automatisch "a". + */ + function getAccessMode($user) + { + GLOBAL $settings; + + //Administrator?? + if ($user->isAdmin()) return M_ALL; + + //Besitzer?? + if ($user->getID() == $this->_ownerID) return M_ALL; + + //Gast-Benutzer?? + if (($user->getID() == $settings->_guestID) && ($settings->_enableGuestLogin)) + { + $mode = $this->getDefaultAccess(); + if ($mode >= M_READ) return M_READ; + else return M_NONE; + } + + //Berechtigung erben?? + // wird über GetAccessList() bereits realisiert. + // durch das Verwenden der folgenden Zeilen wären auch Owner-Rechte vererbt worden. + /* + if ($this->inheritsAccess()) + { + if (!$this->getFolder()) + return false; + return $this->_folder->getAccessMode($user); + } + */ + //ACLs durchforsten + $accessList = $this->getAccessList(); + if (!$accessList) return false; + + foreach ($accessList["users"] as $userAccess) + { + if ($userAccess->getUserID() == $user->getID()) + { + return $userAccess->getMode(); + } + } + foreach ($accessList["groups"] as $groupAccess) + { + if ($user->isMemberOfGroup($groupAccess->getGroup())) + { + return $groupAccess->getMode(); + } + } + return $this->getDefaultAccess(); + } + + + function getGroupAccessMode($group) { + global $settings; + + $highestPrivileged = M_NONE; + + //ACLs durchforsten + $foundInACL = false; + $accessList = $this->getAccessList(); + if (!$accessList) + return false; + + foreach ($accessList["groups"] as $groupAccess) { + if ($groupAccess->getGroupID() == $group->getID()) { + $foundInACL = true; + if ($groupAccess->getMode() > $highestPrivileged) + $highestPrivileged = $groupAccess->getMode(); + if ($highestPrivileged == M_ALL) //höher geht's nicht -> wir können uns die arbeit schenken + return $highestPrivileged; + } + } + + if ($foundInACL) + return $highestPrivileged; + + //Standard-Berechtigung verwenden + return $this->getDefaultAccess(); + + } + + function getNotifyList() { + if (!isset($this->_notifyList)) + { + GLOBAL $db; + + $queryStr ="SELECT * FROM tblNotify WHERE targetType = " . T_DOCUMENT . " AND target = " . $this->_id; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + $this->_notifyList = array("groups" => array(), "users" => array()); + foreach ($resArr as $row) + { + if ($row["userID"] != -1) + array_push($this->_notifyList["users"], getUser($row["userID"]) ); + else //if ($row["groupID"] != -1) + array_push($this->_notifyList["groups"], getGroup($row["groupID"]) ); + } + } + return $this->_notifyList; + } + + function addNotify($userOrGroupID, $isUser,$send_email=TRUE) { + + // Return values: + // -1: Invalid User/Group ID. + // -2: Target User / Group does not have read access. + // -3: User is already subscribed. + // -4: Database / internal error. + // 0: Update successful. + + global $db, $settings, $user; + + $userOrGroup = ($isUser ? "userID" : "groupID"); + + // + // Verify that user / group exists. + // + $obj = ($isUser ? getUser($userOrGroupID) : getGroup($userOrGroupID)); + if (!is_object($obj)) { + return -1; + } + + // + // Verify that the requesting user has permission to add the target to + // the notification system. + // + if ($user->getID() == $settings->_guestID) { + return -2; + } + if (!$user->isAdmin()) { + if ($isUser) { + if ($user->getID() != $obj->getID()) { + return -2; + } + } + else { + if (!$obj->isMember($user)) { + return -2; + } + } + } + + // + // Verify that target user / group has read access to the document. + // + if ($isUser) { + // Users are straightforward to check. + if ($this->getAccessMode($obj) < M_READ) { + return -2; + } + } + else { + // Groups are a little more complex. + if ($this->getDefaultAccess() >= M_READ) { + // If the default access is at least READ-ONLY, then just make sure + // that the current group has not been explicitly excluded. + $acl = $this->getAccessList(M_NONE, O_EQ); + $found = false; + foreach ($acl["groups"] as $group) { + if ($group->getGroupID() == $userOrGroupID) { + $found = true; + break; + } + } + if ($found) { + return -2; + } + } + else { + // The default access is restricted. Make sure that the group has + // been explicitly allocated access to the document. + $acl = $this->getAccessList(M_READ, O_GTEQ); + if (is_bool($acl)) { + return -4; + } + $found = false; + foreach ($acl["groups"] as $group) { + if ($group->getGroupID() == $userOrGroupID) { + $found = true; + break; + } + } + if (!$found) { + return -2; + } + } + } + // + // Check to see if user/group is already on the list. + // + $queryStr = "SELECT * FROM `tblNotify` WHERE `tblNotify`.`target` = '".$this->_id."' ". + "AND `tblNotify`.`targetType` = '".T_DOCUMENT."' ". + "AND `tblNotify`.`".$userOrGroup."` = '".$userOrGroupID."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr)) { + return -4; + } + if (count($resArr)>0) { + return -3; + } + + $queryStr = "INSERT INTO tblNotify (target, targetType, " . $userOrGroup . ") VALUES (" . $this->_id . ", " . T_DOCUMENT . ", " . $userOrGroupID . ")"; + if (!$db->getResult($queryStr)) + return -4; + + // Email user / group, informing them of subscription. + if ($send_email){ + $path=""; + $folder = $this->getFolder(); + $folderPath = $folder->getPath(); + for ($i = 0; $i < count($folderPath); $i++) { + $path .= $folderPath[$i]->getName(); + if ($i +1 < count($folderPath)) + $path .= " / "; + } + $subject = $settings->_siteName.": ".$this->getName()." - ".getMLText("notify_added_email"); + $message = getMLText("notify_added_email")."\r\n"; + $message .= + getMLText("document").": ".$this->getName()."\r\n". + getMLText("folder").": ".$path."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + if ($isUser) { + Email::toIndividual($user, $obj, $subject, $message); + } + else { + Email::toGroup($user, $obj, $subject, $message); + } + } + + unset($this->_notifyList); + return 0; + } + + function removeNotify($userOrGroupID, $isUser) { + + // Return values: + // -1: Invalid User/Group ID. + // -3: User is not subscribed. No action taken. + // -4: Database / internal error. + // 0: Update successful. + + GLOBAL $db, $settings, $user; + + // + // Verify that user / group exists. + // + $obj = ($isUser ? getUser($userOrGroupID) : getGroup($userOrGroupID)); + if (!is_object($obj)) { + return -1; + } + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + // + // Verify that the requesting user has permission to add the target to + // the notification system. + // + if ($user->getID() == $settings->_guestID) { + return -2; + } + if (!$user->isAdmin()) { + if ($isUser) { + if ($user->getID() != $obj->getID()) { + return -2; + } + } + else { + if (!$obj->isMember($user)) { + return -2; + } + } + } + + // + // Check to see if the target is in the database. + // + $queryStr = "SELECT * FROM `tblNotify` WHERE `tblNotify`.`target` = '".$this->_id."' ". + "AND `tblNotify`.`targetType` = '".T_DOCUMENT."' ". + "AND `tblNotify`.`".$userOrGroup."` = '".$userOrGroupID."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr)) { + return -4; + } + if (count($resArr)==0) { + return -3; + } + + $queryStr = "DELETE FROM tblNotify WHERE target = " . $this->_id . " AND targetType = " . T_DOCUMENT . " AND " . $userOrGroup . " = " . $userOrGroupID; + if (!$db->getResult($queryStr)) + return -4; + + // Email user / group, informing them of subscription change. + $path=""; + $folder = $this->getFolder(); + $folderPath = $folder->getPath(); + for ($i = 0; $i < count($folderPath); $i++) { + $path .= $folderPath[$i]->getName(); + if ($i +1 < count($folderPath)) + $path .= " / "; + } + $subject = $settings->_siteName.": ".$this->getName()." - ".getMLText("notify_deleted_email"); + $message = getMLText("notify_deleted_email")."\r\n"; + $message .= + getMLText("document").": ".$this->getName()."\r\n". + getMLText("folder").": ".$path."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + if ($isUser) { + Email::toIndividual($user, $obj, $subject, $message); + } + else { + Email::toGroup($user, $obj, $subject, $message); + } + + unset($this->_notifyList); + return 0; + } + + function addContent($comment, $user, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers=array(), $approvers=array(),$version=0,$send_email=TRUE) + { + GLOBAL $db, $settings; + + // the doc path is id/version.filetype + $dir = $this->getDir(); + + //Eintrag in tblDocumentContent + $date = mktime(); + + if ((int)$version<1){ + + $queryStr = "INSERT INTO tblDocumentContent (document, comment, date, createdBy, dir, orgFileName, fileType, mimeType) VALUES ". + "(".$this->_id.", '".$comment."', ".$date.", ".$user->getID().", '".$dir."', '".$orgFileName."', '".$fileType."', '" . $mimeType . "')"; + if (!$db->getResult($queryStr)) return false; + + $version = $db->getInsertID(); + + }else{ + $queryStr = "INSERT INTO tblDocumentContent (document, version, comment, date, createdBy, dir, orgFileName, fileType, mimeType) VALUES ". + "(".$this->_id.", ".(int)$version.",'".$comment."', ".$date.", ".$user->getID().", '".$dir."', '".$orgFileName."', '".$fileType."', '" . $mimeType . "')"; + if (!$db->getResult($queryStr)) return false; + } + + // copy file + if (!makeDir($settings->_contentDir . $dir)) return false; + if (!copyFile($tmpFile, $settings->_contentDir . $dir . $version . $fileType)) return false; + + unset($this->_content); + unset($this->_latestContent); + $docResultSet = new AddContentResultSet(new DocumentContent($this->_id, $version, $comment, $date, $user->getID(), $dir, $orgFileName, $fileType, $mimeType)); + + // TODO - verify + if ($settings->_enableConverting && in_array($docResultSet->_content->getFileType(), array_keys($settings->_convertFileTypes))) + $docResultSet->_content->convert(); //Auch wenn das schiefgeht, wird deswegen nicht gleich alles "hingeschmissen" (sprich: false zurückgegeben) + + $queryStr = "INSERT INTO `tblDocumentStatus` (`documentID`, `version`) ". + "VALUES ('". $this->_id ."', '". $version ."')"; + if (!$db->getResult($queryStr)) + return false; + + $statusID = $db->getInsertID(); + + // Add reviewers into the database. Reviewers must review the document + // and submit comments, if appropriate. Reviewers can also recommend that + // a document be rejected. + $pendingReview=false; + $reviewRes = array(); + foreach (array("i", "g") as $i){ + if (isset($reviewers[$i])) { + foreach ($reviewers[$i] as $reviewerID) { + $reviewer=($i=="i" ?getUser($reviewerID) : getGroup($reviewerID)); + $res = ($i=="i" ? $docResultSet->_content->addIndReviewer($reviewer, $user, true) : $docResultSet->_content->addGrpReviewer($reviewer, $user, true)); + $docResultSet->addReviewer($reviewer, $i, $res); + // If no error is returned, or if the error is just due to email + // failure, mark the state as "pending review". + if ($res==0 || $res=-3 || $res=-4) { + $pendingReview=true; + } + } + } + } + // Add approvers to the database. Approvers must also review the document + // and make a recommendation on its release as an approved version. + $pendingApproval=false; + $approveRes = array(); + foreach (array("i", "g") as $i){ + if (isset($approvers[$i])) { + foreach ($approvers[$i] as $approverID) { + $approver=($i=="i" ? getUser($approverID) : getGroup($approverID)); + $res=($i=="i" ? $docResultSet->_content->addIndApprover($approver, $user, !$pendingReview) : $docResultSet->_content->addGrpApprover($approver, $user, !$pendingReview)); + $docResultSet->addApprover($approver, $i, $res); + if ($res==0 || $res=-3 || $res=-4) { + $pendingApproval=true; + } + } + } + } + + // If there are no reviewers or approvers, the document is automatically + // promoted to the released state. + if ($pendingReview) { + $status = S_DRAFT_REV; + $comment = ""; + } + else if ($pendingApproval) { + $status = S_DRAFT_APP; + $comment = ""; + } + else { + $status = S_RELEASED; + $comment=""; + } + $queryStr = "INSERT INTO `tblDocumentStatusLog` (`statusID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $statusID ."', '". $status."', 'New document content submitted". $comment ."', NOW(), '". $user->getID() ."')"; + if (!$db->getResult($queryStr)) + return false; + + $docResultSet->setStatus($status,$comment,$user); + + // Send notification to subscribers. + if ($send_email){ + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("document_updated_email"); + $message = getMLText("document_updated_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->getFolder())."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + } + + // if user is not owner send notification to owner + if ($user->getID()!= $this->_ownerID) + Email::toIndividual($user, $this->getOwner(), $subject, $message); + + return $docResultSet; + } + + function getContent() + { + GLOBAL $db; + + if (!isset($this->_content)) + { + $queryStr = "SELECT * FROM tblDocumentContent WHERE document = ".$this->_id." ORDER BY version"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$res) + return false; + + $this->_content = array(); + foreach ($resArr as $row) + array_push($this->_content, new DocumentContent($row["document"], $row["version"], $row["comment"], $row["date"], $row["createdBy"], $row["dir"], $row["orgFileName"], $row["fileType"], $row["mimeType"])); + } + + return $this->_content; + } + + function getContentByVersion($version) + { + if (!is_numeric($version)) return false; + + if (isset($this->_content)) + { + foreach ($this->_content as $revision) + { + if ($revision->getVersion() == $version) + return $revision; + } + return false; + } + + GLOBAL $db; + $queryStr = "SELECT * FROM tblDocumentContent WHERE document = ".$this->_id." AND version = " . $version; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$res) + return false; + if (count($resArr) != 1) + return false; + + $resArr = $resArr[0]; + return new DocumentContent($resArr["document"], $resArr["version"], $resArr["comment"], $resArr["date"], $resArr["createdBy"], $resArr["dir"], $resArr["orgFileName"], $resArr["fileType"], $resArr["mimeType"]); + } + + function getLatestContent() + { + if (!isset($this->_latestContent)) + { + GLOBAL $db; + $queryStr = "SELECT * FROM tblDocumentContent WHERE document = ".$this->_id." ORDER BY version DESC LIMIT 0,1"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + if (count($resArr) != 1) + return false; + + $resArr = $resArr[0]; + $this->_latestContent = new DocumentContent($resArr["document"], $resArr["version"], $resArr["comment"], $resArr["date"], $resArr["createdBy"], $resArr["dir"], $resArr["orgFileName"], $resArr["fileType"], $resArr["mimeType"]); + } + return $this->_latestContent; + } + + function getDocumentLinks() + { + if (!isset($this->_documentLinks)) + { + GLOBAL $db; + + $queryStr = "SELECT * FROM tblDocumentLinks WHERE document = " . $this->_id; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + $this->_documentLinks = array(); + + foreach ($resArr as $row) + array_push($this->_documentLinks, new DocumentLink($row["id"], $row["document"], $row["target"], $row["userID"], $row["public"])); + } + return $this->_documentLinks; + } + + function addDocumentLink($targetID, $userID, $public) + { + GLOBAL $db; + + $public = ($public) ? "1" : "0"; + + $queryStr = "INSERT INTO tblDocumentLinks(document, target, userID, public) VALUES (".$this->_id.", ".$targetID.", ".$userID.", " . $public.")"; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_documentLinks); + return true; + } + + function removeDocumentLink($linkID) + { + GLOBAL $db; + + $queryStr = "DELETE FROM tblDocumentLinks WHERE id = " . $linkID; + if (!$db->getResult($queryStr)) return false; + unset ($this->_documentLinks); + return true; + } + + function getDocumentFiles() + { + if (!isset($this->_documentFiles)) + { + GLOBAL $db; + + $queryStr = "SELECT * FROM tblDocumentFiles WHERE document = " . $this->_id; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) return false; + + $this->_documentFiles = array(); + + foreach ($resArr as $row) + array_push($this->_documentFiles, new DocumentFile($row["id"], $row["document"], $row["userID"], $row["comment"], $row["date"], $row["dir"], $row["fileType"], $row["mimeType"], $row["orgFileName"], $row["name"])); + } + return $this->_documentFiles; + } + + function addDocumentFile($name, $comment, $user, $tmpFile, $orgFileName,$fileType, $mimeType ) + { + GLOBAL $db, $settings; + + $dir = $settings->_contentOffsetDir."/".$this->_id."/"; + + $queryStr = "INSERT INTO tblDocumentFiles (comment, date, dir, document, fileType, mimeType, orgFileName, userID, name) VALUES ". + "('".$comment."', '".mktime()."', '" . $dir ."', " . $this->_id.", '".$fileType."', '".$mimeType."', '".$orgFileName."',".$user->getID().",'".$name."')"; + if (!$db->getResult($queryStr)) return false; + + $id = $db->getInsertID(); + + $file = getDocumentFile($id); + if (is_bool($file) && !$file) return false; + + // copy file + if (!makeDir($settings->_contentDir . $dir)) return false; + if (!copyFile($tmpFile, $settings->_contentDir . $file->getPath() )) return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("new_file_email"); + $message = getMLText("new_file_email")."\r\n"; + $message .= + getMLText("name").": ".$name."\r\n". + getMLText("comment").": ".$comment."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->getID()."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + return true; + } + + function removeDocumentFile($ID) + { + global $settings,$user; + + $file=getDocumentFile($ID); + if (is_bool($file) && !$file) return false; + + if (file_exists( $settings->_contentDir . $file->getPath() )){ + if (!removeFile( $settings->_contentDir . $file->getPath() )) + return false; + } + + $name=$file->getName(); + $comment=$file->getcomment(); + + $file->remove(); + + unset ($this->_documentFiles); + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("removed_file_email"); + $message = getMLText("removed_file_email")."\r\n"; + $message .= + getMLText("name").": ".$name."\r\n". + getMLText("comment").": ".$comment."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->getID()."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + return true; + } + + function remove($send_email=TRUE) + { + GLOBAL $db, $user, $settings; + + $res = $this->getContent(); + if (is_bool($res) && !$res) return false; + + for ($i = 0; $i < count($this->_content); $i++) + if (!$this->_content[$i]->remove(FALSE)) + return false; + + // remove document file + $res = $this->getDocumentFiles(); + if (is_bool($res) && !$res) return false; + + for ($i = 0; $i < count($this->_documentFiles); $i++) + if (!$this->_documentFiles[$i]->remove()) + return false; + + // TODO: versioning file? + + if (file_exists( $settings->_contentDir . $this->getDir() )) + if (!removeDir( $settings->_contentDir . $this->getDir() )) + return false; + + $queryStr = "DELETE FROM tblDocuments WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblACLs WHERE target = " . $this->_id . " AND targetType = " . T_DOCUMENT; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblDocumentLinks WHERE document = " . $this->_id . " OR target = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblDocumentLocks WHERE document = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblDocumentFiles WHERE document = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $path = ""; + $folder = $this->getFolder(); + $folderPath = $folder->getPath(); + for ($i = 0; $i < count($folderPath); $i++) { + $path .= $folderPath[$i]->getName(); + if ($i +1 < count($folderPath)) + $path .= " / "; + } + + if ($send_email){ + + $subject = $settings->_siteName.": ".$this->getName()." - ".getMLText("document_deleted_email"); + $message = getMLText("document_deleted_email")."\r\n"; + $message .= + getMLText("document").": ".$this->getName()."\r\n". + getMLText("folder").": ".$path."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() ."> "; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + // Send notification to subscribers. + $this->getNotifyList(); + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + } + + // Delete the notification list. + $queryStr = "DELETE FROM tblNotify WHERE target = " . $this->_id . " AND targetType = " . T_DOCUMENT; + if (!$db->getResult($queryStr)) + return false; + + return true; + } + + function getApproversList() { + + GLOBAL $db, $settings; + + if (!isset($this->_approversList)) { + + $this->_approversList = array("groups" => array(), "users" => array()); + $userIDs = ""; + $groupIDs = ""; + $defAccess = $this->getDefaultAccess(); + + if ($defAccessgetAccessList(M_READ, O_GTEQ); + } + else { + // Get the list of all users and groups that DO NOT have read access + // to the document. + $tmpList = $this->getAccessList(M_NONE, O_LTEQ); + } + foreach ($tmpList["groups"] as $group) { + $groupIDs .= (strlen($groupIDs)==0 ? "" : ", ") . $group->getGroupID(); + } + foreach ($tmpList["users"] as $c_user) { + + if (!$settings->_enableAdminRevApp && $c_user->getUserID()==$settings->_adminID) continue; + $userIDs .= (strlen($userIDs)==0 ? "" : ", ") . $c_user->getUserID(); + } + + // Construct a query against the users table to identify those users + // that have read access to this document, either directly through an + // ACL entry, by virtue of ownership or by having administrative rights + // on the database. + $queryStr=""; + if ($defAccess < M_READ) { + if (strlen($groupIDs)>0) { + $queryStr = "(SELECT `tblUsers`.* FROM `tblUsers` ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ". + "WHERE `tblGroupMembers`.`groupID` IN (". $groupIDs .") ". + "AND `tblUsers`.`id` !='".$settings->_guestID."')"; + } + $queryStr .= (strlen($queryStr)==0 ? "" : " UNION "). + "(SELECT `tblUsers`.* FROM `tblUsers` ". + "WHERE (`tblUsers`.`id` !='".$settings->_guestID."') ". + "AND ((`tblUsers`.`id` = ". $this->_ownerID . ") ". + "OR (`tblUsers`.`isAdmin` = 1)". + (strlen($userIDs) == 0 ? "" : " OR (`tblUsers`.`id` IN (". $userIDs ."))"). + ")) ORDER BY `login`"; + } + else { + if (strlen($groupIDs)>0) { + $queryStr = "(SELECT `tblUsers`.* FROM `tblUsers` ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ". + "WHERE `tblGroupMembers`.`groupID` NOT IN (". $groupIDs .")". + "AND `tblUsers`.`id` != '".$settings->_guestID."' ". + (strlen($userIDs) == 0 ? ")" : " AND (`tblUsers`.`id` NOT IN (". $userIDs .")))"); + } + $queryStr .= (strlen($queryStr)==0 ? "" : " UNION "). + "(SELECT `tblUsers`.* FROM `tblUsers` ". + "WHERE (`tblUsers`.`id` = ". $this->_ownerID . ") ". + "OR (`tblUsers`.`isAdmin` = 1))". + "UNION ". + "(SELECT `tblUsers`.* FROM `tblUsers` ". + "WHERE `tblUsers`.`id` != '".$settings->_guestID."' ". + (strlen($userIDs) == 0 ? ")" : " AND (`tblUsers`.`id` NOT IN (". $userIDs .")))"). + " ORDER BY `login`"; + } + $resArr = $db->getResultArray($queryStr); + if (!is_bool($resArr)) { + foreach ($resArr as $row) { + if ((!$settings->_enableAdminRevApp) && ($row["id"]==$settings->_adminID)) continue; + $this->_approversList["users"][] = new LetoDMS_User($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["isAdmin"]); + } + } + + // Assemble the list of groups that have read access to the document. + $queryStr=""; + if ($defAccess < M_READ) { + if (strlen($groupIDs)>0) { + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ". + "WHERE `tblGroups`.`id` IN (". $groupIDs .")"; + } + } + else { + if (strlen($groupIDs)>0) { + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ". + "WHERE `tblGroups`.`id` NOT IN (". $groupIDs .")"; + } + else { + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups`"; + } + } + if (strlen($queryStr)>0) { + $resArr = $db->getResultArray($queryStr); + if (!is_bool($resArr)) { + foreach ($resArr as $row) { + $this->_approversList["groups"][] = new Group($row["id"], $row["name"], $row["comment"]); + } + } + } + } + return $this->_approversList; + } +} + + /* ---------------------------------------------------------------------------------------------------- */ + +/** + * Die Datei wird als "data.ext" (z.b. data.txt) gespeichert. Getrennt davon wird in der DB der ursprüngliche + * Dateiname festgehalten (-> $orgFileName). Die Datei wird deshalb nicht unter diesem ursprünglichen Namen + * gespeichert, da es zu Problemen mit verschiedenen Dateisystemen kommen kann: Linux hat z.b. Probleme mit + * deutschen Umlauten, während Windows wiederum den Doppelpunkt in Dateinamen nicht verwenden kann. + * Der ursprüngliche Dateiname wird nur zum Download verwendet (siehe op.Download.pgp) + */ + +// these are the version information +class DocumentContent +{ + + // if status is released and there are reviewers set status draft_rev + // if status is released or draft_rev and there are approves set status draft_app + // if status is draft and there are no approver and no reviewers set status to release + function verifyStatus($ignorecurrentstatus=false,$user=null){ + + unset($this->_status); + $st=$this->getStatus(); + + if (!$ignorecurrentstatus && ($st["status"]==S_OBSOLETE || $st["status"]==S_REJECTED || $st["status"]==S_EXPIRED )) return; + + $pendingReview=false; + unset($this->_reviewStatus); // force to be reloaded from DB + $reviewStatus=$this->getReviewStatus(true); + if (is_array($reviewStatus) && count($reviewStatus)>0) { + foreach ($reviewStatus as $r){ + if ($r["status"]==0){ + $pendingReview=true; + break; + } + } + } + $pendingApproval=false; + unset($this->_approvalStatus); // force to be reloaded from DB + $approvalStatus=$this->getApprovalStatus(true); + if (is_array($approvalStatus) && count($approvalStatus)>0) { + foreach ($approvalStatus as $a){ + if ($a["status"]==0){ + $pendingApproval=true; + break; + } + } + } + if ($pendingReview) $this->setStatus(S_DRAFT_REV,"",$user); + else if ($pendingApproval) $this->setStatus(S_DRAFT_APP,"",$user); + else $this->setStatus(S_RELEASED,"",$user); + } + + function DocumentContent($documentID, $version, $comment, $date, $userID, $dir, $orgFileName, $fileType, $mimeType) + { + $this->_documentID = $documentID; + $this->_version = $version; + $this->_comment = $comment; + $this->_date = $date; + $this->_userID = $userID; + $this->_dir = $dir; + $this->_orgFileName = $orgFileName; + $this->_fileType = $fileType; + $this->_mimeType = $mimeType; + } + + function getVersion() { return $this->_version; } + function getComment() { return $this->_comment; } + function getDate() { return $this->_date; } + function getOriginalFileName() { return $this->_orgFileName; } + function getFileType() { return $this->_fileType; } + function getFileName(){ return "data" . $this->_fileType; } + function getDir() { return $this->_dir; } + function getMimeType() { return $this->_mimeType; } + function getUser() + { + if (!isset($this->_user)) + $this->_user = getUser($this->_userID); + return $this->_user; + } + function getPath() { return $this->_dir . $this->_version . $this->_fileType; } + + function setComment($newComment) { + + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblDocumentContent SET comment = '" . $newComment . "' WHERE `document` = " . $this->_documentID . " AND `version` = " . $this->_version; + if (!$db->getResult($queryStr)) + return false; + + $this->_comment = $newComment; + + // Send notification to subscribers. + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + $nl=$this->_document->getNotifyList(); + + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("comment_changed_email"); + $message = getMLText("comment_changed_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$newComment."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."&version=".$this->_version."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $nl["users"], $subject, $message); + foreach ($nl["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + return true; + } + + + function convert() + { + GLOBAL $settings; + + if (file_exists($settings->_contentDir . $this->_dir . "index.html")) + return true; + + if (!in_array($this->_fileType, array_keys($settings->_convertFileTypes))) + return false; + + $source = $settings->_contentDir . $this->_dir . $this->getFileName(); + $target = $settings->_contentDir . $this->_dir . "index.html"; + // $source = str_replace("/", "\\", $source); + // $target = str_replace("/", "\\", $target); + + $command = $settings->_convertFileTypes[$this->_fileType]; + $command = str_replace("{SOURCE}", "\"$source\"", $command); + $command = str_replace("{TARGET}", "\"$target\"", $command); + + $output = array(); + $res = 0; + exec($command, $output, $res); + + if ($res != 0) + { + print (implode("\n", $output)); + return false; + } + return true; + } + + function viewOnline() + { + GLOBAL $settings; + + if (!isset($settings->_viewOnlineFileTypes) || !is_array($settings->_viewOnlineFileTypes)) { + return false; + } + + if (in_array(strtolower($this->_fileType), $settings->_viewOnlineFileTypes)) return true; + + if ($settings->_enableConverting && in_array($this->_fileType, array_keys($settings->_convertFileTypes))) + if ($this->wasConverted()) return true; + + return false; + } + + function wasConverted() + { + GLOBAL $settings; + + return file_exists($settings->_contentDir . $this->_dir . "index.html"); + } + + function getURL() + { + GLOBAL $settings; + + if (!$this->viewOnline())return false; + + if (in_array(strtolower($this->_fileType), $settings->_viewOnlineFileTypes)) + return "/" . $this->_documentID . "/" . $this->_version . "/" . $this->getOriginalFileName(); + else + return "/" . $this->_documentID . "/" . $this->_version . "/index.html"; + } + + // $send_email=FALSE is used when removing entire document + // to avoid one email for every version + function remove($send_email=TRUE) + { + GLOBAL $settings, $db, $user; + + $emailList = array(); + $emailList[] = $this->_userID; + + if (file_exists( $settings->_contentDir.$this->getPath() )) + if (!removeFile( $settings->_contentDir.$this->getPath() )) + return false; + + $status = $this->getStatus(); + $stID = $status["statusID"]; + + $queryStr = "DELETE FROM tblDocumentContent WHERE `document` = " . $this->_documentID . " AND `version` = " . $this->_version; + if (!$db->getResult($queryStr)) + return false; + + $queryStr = "DELETE FROM `tblDocumentStatusLog` WHERE `statusID` = '".$stID."'"; + if (!$db->getResult($queryStr)) + return false; + + $queryStr = "DELETE FROM `tblDocumentStatus` WHERE `documentID` = '". $this->_documentID ."' AND `version` = '" . $this->_version."'"; + if (!$db->getResult($queryStr)) + return false; + + $status = $this->getReviewStatus(); + $stList = ""; + foreach ($status as $st) { + $stList .= (strlen($stList)==0 ? "" : ", "). "'".$st["reviewID"]."'"; + if ($st["status"]==0 && !in_array($st["required"], $emailList)) { + $emailList[] = $st["required"]; + } + } + if (strlen($stList)>0) { + $queryStr = "DELETE FROM `tblDocumentReviewLog` WHERE `tblDocumentReviewLog`.`reviewID` IN (".$stList.")"; + if (!$db->getResult($queryStr)) + return false; + } + $queryStr = "DELETE FROM `tblDocumentReviewers` WHERE `documentID` = '". $this->_documentID ."' AND `version` = '" . $this->_version."'"; + if (!$db->getResult($queryStr)) + return false; + $status = $this->getApprovalStatus(); + $stList = ""; + foreach ($status as $st) { + $stList .= (strlen($stList)==0 ? "" : ", "). "'".$st["approveID"]."'"; + if ($st["status"]==0 && !in_array($st["required"], $emailList)) { + $emailList[] = $st["required"]; + } + } + if (strlen($stList)>0) { + $queryStr = "DELETE FROM `tblDocumentApproveLog` WHERE `tblDocumentApproveLog`.`approveID` IN (".$stList.")"; + if (!$db->getResult($queryStr)) + return false; + } + $queryStr = "DELETE FROM `tblDocumentApprovers` WHERE `documentID` = '". $this->_documentID ."' AND `version` = '" . $this->_version."'"; + if (!$db->getResult($queryStr)) + return false; + + // Notify affected users. + if ($send_email){ + + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + $recipients = array(); + foreach ($emailList as $eID) { + $eU = getUser($eID); + $recipients[] = $eU; + } + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("version_deleted_email"); + $message = getMLText("version_deleted_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() ."> "; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $recipients, $subject, $message); + + // Send notification to subscribers. + $nl=$this->_document->getNotifyList(); + Email::toList($user, $nl["users"], $subject, $message); + foreach ($nl["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + } + + return true; + } + + function getStatus($forceTemporaryTable=false) { + GLOBAL $db; + + // Retrieve the current overall status of the content represented by + // this object. + if (!isset($this->_status)) { + if (!$db->createTemporaryTable("ttstatid", $forceTemporaryTable)) { + return false; + } + $queryStr="SELECT `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment`, `tblDocumentStatusLog`.`date`, ". + "`tblDocumentStatusLog`.`userID` ". + "FROM `tblDocumentStatus` ". + "LEFT JOIN `tblDocumentStatusLog` USING (`statusID`) ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `tblDocumentStatus`.`documentID` = '". $this->_documentID ."' ". + "AND `tblDocumentStatus`.`version` = '". $this->_version ."' "; + $res = $db->getResultArray($queryStr); + if (is_bool($res) && !$res) + return false; + if (count($res)!=1) + return false; + $this->_status = $res[0]; + } + return $this->_status; + } + + function setStatus($status, $comment, $updateUser = null) { + + GLOBAL $db, $user, $settings; + + // If the supplied value lies outside of the accepted range, return an + // error. + if ($status < -3 || $status > 2) { + return false; + } + + // Retrieve the current overall status of the content represented by + // this object, if it hasn't been done already. + if (!isset($this->_status)) { + $this->getStatus(); + } + if ($this->_status["status"]==$status) { + return false; + } + $queryStr = "INSERT INTO `tblDocumentStatusLog` (`statusID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $this->_status["statusID"] ."', '". $status ."', '". $comment ."', NOW(), '". (is_null($updateUser) ? $settings->_adminID : $updateUser->getID()) ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) + return false; + + // Send notification to subscribers. + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + $nl=$this->_document->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_document->_name." - ".getMLText("document_status_changed_email"); + $message = getMLText("document_status_changed_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->_name."\r\n". + getMLText("status").": ".getOverallStatusText($status)."\r\n". + getMLText("folder").": ".getFolderPathPlain($this->_document->getFolder())."\r\n". + getMLText("comment").": ".$this->_document->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."&version=".$this->_version."\r\n"; + + $uu = (is_null($updateUser) ? getUser($settings->_adminID) : $updateUser); + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($uu, $nl["users"], $subject, $message); + foreach ($nl["groups"] as $grp) { + Email::toGroup($uu, $grp, $subject, $message); + } + + // TODO: if user os not owner send notification to owner + + return true; + } + + function getReviewStatus($forceTemporaryTable=false) { + GLOBAL $db; + + // Retrieve the current status of each assigned reviewer for the content + // represented by this object. + if (!isset($this->_reviewStatus)) { + if (!$db->createTemporaryTable("ttreviewid", $forceTemporaryTable)) { + return false; + } + $queryStr="SELECT `tblDocumentReviewers`.*, `tblDocumentReviewLog`.`status`, ". + "`tblDocumentReviewLog`.`comment`, `tblDocumentReviewLog`.`date`, ". + "`tblDocumentReviewLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". + "FROM `tblDocumentReviewers` ". + "LEFT JOIN `tblDocumentReviewLog` USING (`reviewID`) ". + "LEFT JOIN `ttreviewid` on `ttreviewid`.`maxLogID` = `tblDocumentReviewLog`.`reviewLogID` ". + "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentReviewers`.`required`". + "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentReviewers`.`required`". + "WHERE `ttreviewid`.`maxLogID`=`tblDocumentReviewLog`.`reviewLogID` ". + "AND `tblDocumentReviewers`.`documentID` = '". $this->_documentID ."' ". + "AND `tblDocumentReviewers`.`version` = '". $this->_version ."' "; + $res = $db->getResultArray($queryStr); + if (is_bool($res) && !$res) + return false; + // Is this cheating? Certainly much quicker than copying the result set + // into a separate object. + $this->_reviewStatus = $res; + } + return $this->_reviewStatus; + } + + function getApprovalStatus($forceTemporaryTable=false) { + GLOBAL $db; + + // Retrieve the current status of each assigned approver for the content + // represented by this object. + if (!isset($this->_approvalStatus)) { + if (!$db->createTemporaryTable("ttapproveid", $forceTemporaryTable)) { + return false; + } + $queryStr="SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". + "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". + "`tblDocumentApproveLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". + "FROM `tblDocumentApprovers` ". + "LEFT JOIN `tblDocumentApproveLog` USING (`approveID`) ". + "LEFT JOIN `ttapproveid` on `ttapproveid`.`maxLogID` = `tblDocumentApproveLog`.`approveLogID` ". + "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentApprovers`.`required`". + "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentApprovers`.`required`". + "WHERE `ttapproveid`.`maxLogID`=`tblDocumentApproveLog`.`approveLogID` ". + "AND `tblDocumentApprovers`.`documentID` = '". $this->_documentID ."' ". + "AND `tblDocumentApprovers`.`version` = '". $this->_version ."'"; + $res = $db->getResultArray($queryStr); + if (is_bool($res) && !$res) + return false; + $this->_approvalStatus = $res; + } + return $this->_approvalStatus; + } + + function addIndReviewer($user, $requestUser, $sendEmail=false) { + + GLOBAL $db, $settings; + + $userID = $user->getID(); + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + // Get the list of users and groups with write access to this document. + if (!isset($this->_approversList)) { + $this->_approversList = $this->_document->getApproversList(); + } + $approved = false; + foreach ($this->_approversList["users"] as $appUser) { + if ($userID == $appUser->getID()) { + $approved = true; + break; + } + } + if (!$approved) { + return -2; + } + + // Check to see if the user has already been added to the review list. + $reviewStatus = $user->getReviewStatus($this->_documentID, $this->_version); + if (is_bool($reviewStatus) && !$reviewStatus) { + return -1; + } + if (count($reviewStatus["indstatus"]) > 0 && $reviewStatus["indstatus"][0]["status"]!=-2) { + // User is already on the list of reviewers; return an error. + return -3; + } + + // Add the user into the review database. + if (! isset($reviewStatus["indstatus"][0]["status"])|| (isset($reviewStatus["indstatus"][0]["status"]) && $reviewStatus["indstatus"][0]["status"]!=-2)) { + $queryStr = "INSERT INTO `tblDocumentReviewers` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_documentID ."', '". $this->_version ."', '0', '". $userID ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + $reviewID = $db->getInsertID(); + } + else { + $reviewID = isset($reviewStatus["indstatus"][0]["reviewID"])?$reviewStatus["indstatus"][0]["reviewID"]:NULL; + } + + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $reviewID ."', '0', '', NOW(), '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Add reviewer to event notification table. + //$this->_document->addNotify($userID, true); + + // Send an email notification to the new reviewer. + if ($sendEmail) { + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("review_request_email"); + $message = getMLText("review_request_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$requestUser->getFullName()." <". $requestUser->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."&version=".$this->_version."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + return (Email::toIndividual($requestUser, $user, $subject, $message) < 0 ? -4 : 0); + } + return 0; + } + + function addGrpReviewer($group, $requestUser, $sendEmail=false) { + GLOBAL $db, $settings; + + $groupID = $group->getID(); + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + // Get the list of users and groups with write access to this document. + if (!isset($this->_approversList)) { + // TODO: error checking. + $this->_approversList = $this->_document->getApproversList(); + } + $approved = false; + foreach ($this->_approversList["groups"] as $appGroup) { + if ($groupID == $appGroup->getID()) { + $approved = true; + break; + } + } + if (!$approved) { + return -2; + } + + // Check to see if the group has already been added to the review list. + $reviewStatus = $group->getReviewStatus($this->_documentID, $this->_version); + if (is_bool($reviewStatus) && !$reviewStatus) { + return -1; + } + if (count($reviewStatus) > 0 && $reviewStatus[0]["status"]!=-2) { + // Group is already on the list of reviewers; return an error. + return -3; + } + + // Add the group into the review database. + if (!isset($reviewStatus[0]["status"]) || (isset($reviewStatus[0]["status"]) && $reviewStatus[0]["status"]!=-2)) { + $queryStr = "INSERT INTO `tblDocumentReviewers` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_documentID ."', '". $this->_version ."', '1', '". $groupID ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + $reviewID = $db->getInsertID(); + } + else { + $reviewID = isset($reviewStatus[0]["reviewID"])?$reviewStatus[0]["reviewID"]:NULL; + } + + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $reviewID ."', '0', '', NOW(), '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Add reviewer to event notification table. + //$this->_document->addNotify($groupID, false); + + // Send an email notification to the new reviewer. + if ($sendEmail) { + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("review_request_email"); + $message = getMLText("review_request_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$requestUser->getFullName()." <". $requestUser->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."&version=".$this->_version."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + return (Email::toGroup($requestUser, $group, $subject, $message) < 0 ? -4 : 0); + } + return 0; + } + + function addIndApprover($user, $requestUser, $sendEmail=false) { + GLOBAL $db, $settings; + + $userID = $user->getID(); + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + // Get the list of users and groups with write access to this document. + if (!isset($this->_approversList)) { + // TODO: error checking. + $this->_approversList = $this->_document->getApproversList(); + } + $approved = false; + foreach ($this->_approversList["users"] as $appUser) { + if ($userID == $appUser->getID()) { + $approved = true; + break; + } + } + if (!$approved) { + return -2; + } + + // Check to see if the user has already been added to the approvers list. + $approvalStatus = $user->getApprovalStatus($this->_documentID, $this->_version); + if (is_bool($approvalStatus) && !$approvalStatus) { + return -1; + } + if (count($approvalStatus["indstatus"]) > 0 && $approvalStatus["indstatus"][0]["status"]!=-2) { + // User is already on the list of approvers; return an error. + return -3; + } + + if ( !isset($approvalStatus["indstatus"][0]["status"]) || (isset($approvalStatus["indstatus"][0]["status"]) && $approvalStatus["indstatus"][0]["status"]!=-2)) { + // Add the user into the approvers database. + $queryStr = "INSERT INTO `tblDocumentApprovers` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_documentID ."', '". $this->_version ."', '0', '". $userID ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + $approveID = $db->getInsertID(); + } + else { + $approveID = isset($approvalStatus["indstatus"][0]["approveID"]) ? $approvalStatus["indstatus"][0]["approveID"] : NULL; + } + + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $approveID ."', '0', '', NOW(), '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Send an email notification to the new approver. + if ($sendEmail) { + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("approval_request_email"); + $message = getMLText("approval_request_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$requestUser->getFullName()." <". $requestUser->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."&version=".$this->_version."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + return (Email::toIndividual($requestUser, $user, $subject, $message) < 0 ? -4 : 0); + } + return 0; + } + + function addGrpApprover($group, $requestUser, $sendEmail=false) { + GLOBAL $db, $settings; + + $groupID = $group->getID(); + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + // Get the list of users and groups with write access to this document. + if (!isset($this->_approversList)) { + // TODO: error checking. + $this->_approversList = $this->_document->getApproversList(); + } + $approved = false; + foreach ($this->_approversList["groups"] as $appGroup) { + if ($groupID == $appGroup->getID()) { + $approved = true; + break; + } + } + if (!$approved) { + return -2; + } + + // Check to see if the group has already been added to the approver list. + $approvalStatus = $group->getApprovalStatus($this->_documentID, $this->_version); + if (is_bool($approvalStatus) && !$approvalStatus) { + return -1; + } + if (count($approvalStatus) > 0 && $approvalStatus[0]["status"]!=-2) { + // Group is already on the list of approvers; return an error. + return -3; + } + + // Add the group into the approver database. + if (!isset($approvalStatus[0]["status"]) || (isset($approvalStatus[0]["status"]) && $approvalStatus[0]["status"]!=-2)) { + $queryStr = "INSERT INTO `tblDocumentApprovers` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_documentID ."', '". $this->_version ."', '1', '". $groupID ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + $approveID = $db->getInsertID(); + } + else { + $approveID = isset($approvalStatus[0]["approveID"])?$approvalStatus[0]["approveID"]:NULL; + } + + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $approveID ."', '0', '', NOW(), '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Add approver to event notification table. + //$this->_document->addNotify($groupID, false); + + // Send an email notification to the new approver. + if ($sendEmail) { + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("approval_request_email"); + $message = getMLText("approval_request_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$requestUser->getFullName()." <". $requestUser->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."&version=".$this->_version."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + return (Email::toGroup($requestUser, $group, $subject, $message) < 0 ? -4 : 0); + } + return 0; + } + + function delIndReviewer($user, $requestUser, $sendEmail=false) { + GLOBAL $db, $settings; + + $userID = $user->getID(); + + // Check to see if the user can be removed from the review list. + $reviewStatus = $user->getReviewStatus($this->_documentID, $this->_version); + if (is_bool($reviewStatus) && !$reviewStatus) { + return -1; + } + if (count($reviewStatus["indstatus"])==0) { + // User is not assigned to review this document. No action required. + // Return an error. + return -3; + } + if ($reviewStatus["indstatus"][0]["status"]!=0) { + // User has already submitted a review or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $reviewStatus["indstatus"][0]["reviewID"] ."', '-2', '', NOW(), '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Send an email notification to the reviewer. + if ($sendEmail) { + + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("review_deletion_email"); + $message = getMLText("review_deletion_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$requestUser->getFullName()." <". $requestUser->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + return (Email::toIndividual($requestUser, $user, $subject, $message) < 0 ? -4 : 0); + } + return 0; + } + + function delGrpReviewer($group, $requestUser, $sendEmail=false) { + GLOBAL $db, $settings; + + $groupID = $group->getID(); + + // Check to see if the user can be removed from the review list. + $reviewStatus = $group->getReviewStatus($this->_documentID, $this->_version); + if (is_bool($reviewStatus) && !$reviewStatus) { + return -1; + } + if (count($reviewStatus)==0) { + // User is not assigned to review this document. No action required. + // Return an error. + return -3; + } + if ($reviewStatus[0]["status"]!=0) { + // User has already submitted a review or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $reviewStatus[0]["reviewID"] ."', '-2', '', NOW(), '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Send an email notification to the review group. + if ($sendEmail) { + + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("review_deletion_email"); + $message = getMLText("review_deletion_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$requestUser->getFullName()." <". $requestUser->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + return (Email::toGroup($requestUser, $group, $subject, $message) < 0 ? -4 : 0); + } + return 0; + } + + function delIndApprover($user, $requestUser, $sendEmail=false) { + GLOBAL $db, $settings; + + $userID = $user->getID(); + + // Check to see if the user can be removed from the approval list. + $approvalStatus = $user->getApprovalStatus($this->_documentID, $this->_version); + if (is_bool($approvalStatus) && !$approvalStatus) { + return -1; + } + if (count($approvalStatus["indstatus"])==0) { + // User is not assigned to approve this document. No action required. + // Return an error. + return -3; + } + if ($approvalStatus["indstatus"][0]["status"]!=0) { + // User has already submitted an approval or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $approvalStatus["indstatus"][0]["approveID"] ."', '-2', '', NOW(), '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Send an email notification to the approver. + if ($sendEmail) { + + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("approval_deletion_email"); + $message = getMLText("approval_deletion_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$requestUser->getFullName()." <". $requestUser->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + return (Email::toIndividual($requestUser, $user, $subject, $message) < 0 ? -4 : 0); + } + return 0; + } + + function delGrpApprover($group, $requestUser, $sendEmail=false) { + GLOBAL $db, $settings; + + $groupID = $group->getID(); + + // Check to see if the user can be removed from the approver list. + $approvalStatus = $group->getApprovalStatus($this->_documentID, $this->_version); + if (is_bool($approvalStatus) && !$approvalStatus) { + return -1; + } + if (count($approvalStatus)==0) { + // User is not assigned to approve this document. No action required. + // Return an error. + return -3; + } + if ($approvalStatus[0]["status"]!=0) { + // User has already submitted an approval or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $approvalStatus[0]["approveID"] ."', '-2', '', NOW(), '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Send an email notification to the approval group. + if ($sendEmail) { + + if (!isset($this->_document)) { + $this->_document = getDocument($this->_documentID); + } + + $subject = $settings->_siteName.": ".$this->_document->getName().", v.".$this->_version." - ".getMLText("approval_deletion_email"); + $message = getMLText("approval_deletion_email")."\r\n"; + $message .= + getMLText("document").": ".$this->_document->getName()."\r\n". + getMLText("version").": ".$this->_version."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + getMLText("user").": ".$requestUser->getFullName()." <". $requestUser->getEmail() .">\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$this->_documentID."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + return (Email::toGroup($requestUser, $group, $subject, $message) < 0 ? -4 : 0); + } + return 0; + } +} + + + /* ---------------------------------------------------------------------------------------------------- */ + +function getDocumentLink($linkID) { + + GLOBAL $db; + + if (!is_numeric($linkID)) return false; + + $queryStr = "SELECT * FROM tblDocumentLinks WHERE id = " . $linkID; + $resArr = $db->getResultArray($queryStr); + if ((is_bool($resArr) && !$resArr) || count($resArr)==0) + return false; + + $resArr = $resArr[0]; + return new DocumentLink($resArr["id"], $resArr["document"], $resArr["target"], $resArr["userID"], $resArr["public"]); +} + +function filterDocumentLinks($user, $links) +{ + GLOBAL $settings; + + $tmp = array(); + foreach ($links as $link) + if ($link->isPublic() || ($link->_userID == $user->getID()) || ($user->getID() == $settings->_adminID) ) + array_push($tmp, $link); + return $tmp; +} + +class DocumentLink +{ + var $_id; + var $_documentID; + var $_targetID; + var $_userID; + var $_public; + + function DocumentLink($id, $documentID, $targetID, $userID, $public) + { + $this->_id = $id; + $this->_documentID = $documentID; + $this->_targetID = $targetID; + $this->_userID = $userID; + $this->_public = $public; + } + + function getID() { return $this->_id; } + + function getDocument() + { + if (!isset($this->_document)) + $this->_document = getDocument($this->_documentID); + return $this->_document; + } + + function getTarget() + { + if (!isset($this->_target)) + $this->_target = getDocument($this->_targetID); + return $this->_target; + } + + function getUser() + { + if (!isset($this->_user)) + $this->_user = getUser($this->_userID); + return $this->_user; + } + + function isPublic() { return $this->_public; } + + function remove() + { + GLOBAL $db; + + $queryStr = "DELETE FROM tblDocumentLinks WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + return true; + } +} + + /* ---------------------------------------------------------------------------------------------------- */ + +function getDocumentFile($ID) { + + GLOBAL $db; + + if (!is_numeric($ID)) return false; + + $queryStr = "SELECT * FROM tblDocumentFiles WHERE id = " . $ID; + $resArr = $db->getResultArray($queryStr); + if ((is_bool($resArr) && !$resArr) || count($resArr)==0) return false; + + $resArr = $resArr[0]; + return new DocumentFile($resArr["id"], $resArr["document"], $resArr["userID"], $resArr["comment"], $resArr["date"], $resArr["dir"], $resArr["fileType"], $resArr["mimeType"], $resArr["orgFileName"], $resArr["name"]); +} + +class DocumentFile +{ + var $_id; + var $_documentID; + var $_userID; + var $_comment; + var $_date; + var $_dir; + var $_fileType; + var $_mimeType; + var $_orgFileName; + var $_name; + + function DocumentFile($id, $documentID, $userID, $comment, $date, $dir, $fileType, $mimeType, $orgFileName,$name) + { + $this->_id = $id; + $this->_documentID = $documentID; + $this->_userID = $userID; + $this->_comment = $comment; + $this->_date = $date; + $this->_dir = $dir; + $this->_fileType = $fileType; + $this->_mimeType = $mimeType; + $this->_orgFileName = $orgFileName; + $this->_name = $name; + } + + function getID() { return $this->_id; } + function getDocumentID() { return $this->_documentID; } + function getUserID() { return $this->_userID; } + function getComment() { return $this->_comment; } + function getDate() { return $this->_date; } + function getDir() { return $this->_dir; } + function getFileType() { return $this->_fileType; } + function getMimeType() { return $this->_mimeType; } + function getOriginalFileName() { return $this->_orgFileName; } + function getName() { return $this->_name; } + + function getUser() + { + if (!isset($this->_user)) + $this->_user = getUser($this->_userID); + return $this->_user; + } + + function getPath() + { + return $this->_dir . "f" .$this->_id . $this->_fileType; + } + + function remove() + { + GLOBAL $db,$settings; + + if (file_exists( $settings->_contentDir.$this->getPath() )) + if (!removeFile( $settings->_contentDir.$this->getPath() )) + return false; + + + $queryStr = "DELETE FROM tblDocumentFiles WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + return true; + } +} + +// +// Perhaps not the cleanest object ever devised, it exists to encapsulate all +// of the data generated during the addition of new content to the database. +// The object stores a copy of the new DocumentContent object, the newly assigned +// reviewers and approvers and the status. +// +class AddContentResultSet { + + var $_indReviewers; + var $_grpReviewers; + var $_indApprovers; + var $_grpApprovers; + var $_content; + var $_status; + + function AddContentResultSet($content) { + + $this->_content = $content; + $this->_indReviewers = null; + $this->_grpReviewers = null; + $this->_indApprovers = null; + $this->_grpApprovers = null; + $this->_status = null; + } + + function addReviewer($reviewer, $type, $status) { + + if (!is_object($reviewer) || (strcasecmp($type, "i") && strcasecmp($type, "g")) && !is_integer($status)){ + return false; + } + if (!strcasecmp($type, "i")) { + if (strcasecmp(get_class($reviewer), "User")) { + return false; + } + if ($this->_indReviewers == null) { + $this->_indReviewers = array(); + } + $this->_indReviewers[$status][] = $reviewer; + } + if (!strcasecmp($type, "g")) { + if (strcasecmp(get_class($reviewer), "Group")) { + return false; + } + if ($this->_grpReviewers == null) { + $this->_grpReviewers = array(); + } + $this->_grpReviewers[$status][] = $reviewer; + } + return true; + } + + function addApprover($approver, $type, $status) { + + if (!is_object($approver) || (strcasecmp($type, "i") && strcasecmp($type, "g")) && !is_integer($status)){ + return false; + } + if (!strcasecmp($type, "i")) { + if (strcasecmp(get_class($approver), "User")) { + return false; + } + if ($this->_indApprovers == null) { + $this->_indApprovers = array(); + } + $this->_indApprovers[$status][] = $approver; + } + if (!strcasecmp($type, "g")) { + if (strcasecmp(get_class($approver), "Group")) { + return false; + } + if ($this->_grpApprovers == null) { + $this->_grpApprovers = array(); + } + $this->_grpApprovers[$status][] = $approver; + } + return true; + } + + function setStatus($status) { + if (!is_integer($status)) { + return false; + } + if ($status<-3 || $status>2) { + return false; + } + $this->_status = $status; + return true; + } + + function getStatus() { + return $this->_status; + } + + function getReviewers($type) { + if (strcasecmp($type, "i") && strcasecmp($type, "g")) { + return false; + } + if (!strcasecmp($type, "i")) { + return ($this->_indReviewers == null ? array() : $this->_indReviewers); + } + else { + return ($this->_grpReviewers == null ? array() : $this->_grpReviewers); + } + } + + function getApprovers($type) { + if (strcasecmp($type, "i") && strcasecmp($type, "g")) { + return false; + } + if (!strcasecmp($type, "i")) { + return ($this->_indApprovers == null ? array() : $this->_indApprovers); + } + else { + return ($this->_grpApprovers == null ? array() : $this->_grpApprovers); + } + } +} +?> diff --git a/inc/inc.ClassEmail.php b/inc/inc.ClassEmail.php new file mode 100644 index 000000000..313abdf4a --- /dev/null +++ b/inc/inc.ClassEmail.php @@ -0,0 +1,106 @@ +_enableEmail==FALSE) return 0; + + if ($recipient->getEmail()=="") return 0; + + if ((!is_object($sender) && strcasecmp(get_class($sender), "User")) || + (!is_object($recipient) && strcasecmp(get_class($recipient), "User"))) { + return -1; + } + + $header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" . + "Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n"; + + $message = getMLText("email_header")."\r\n\r\n".$message; + $message .= "\r\n\r\n".getMLText("email_footer"); + + return (mail($recipient->getEmail(), $subject, $message, $header) ? 0 : -1); + } + + function toGroup($sender, $groupRecipient, $subject, $message) { + + global $settings; + if (!$settings->_enableEmail) return 0; + + if ((!is_object($sender) && strcasecmp(get_class($sender), "User")) || + (!is_object($groupRecipient) && strcasecmp(get_class($groupRecipient), "Group"))) { + return -1; + } + + $header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" . + "Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n"; + + $toList = ""; + foreach ($groupRecipient->getUsers() as $recipient) { + + if ($recipient->getEmail()!="") + $toList .= (strlen($toList)==0 ? "" : ", ") . $recipient->getEmail(); + } + + if (strlen($toList)==0) { + return -1; + } + + $message = getMLText("email_header")."\r\n\r\n".$message; + $message .= "\r\n\r\n".getMLText("email_footer"); + + return (mail($toList, $subject, $message, $header) ? 0 : -1); + } + + function toList($sender, $recipients, $subject, $message) { + + global $settings; + if (!$settings->_enableEmail) return 0; + + if ((!is_object($sender) && strcasecmp(get_class($sender), "User")) || + (!is_array($recipients) && count($recipients)==0)) { + return -1; + } + + $header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" . + "Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n"; + + $toList = ""; + foreach ($recipients as $recipient) { + if (is_object($recipient) && !strcasecmp(get_class($recipient), "User")) { + + if ($recipient->getEmail()!="") + $toList .= (strlen($toList)==0 ? "" : ", ") . $recipient->getEmail(); + } + } + + if (strlen($toList)==0) { + return -1; + } + + $message = getMLText("email_header")."\r\n\r\n".$message; + $message .= "\r\n\r\n".getMLText("email_footer"); + + return (mail($toList, $subject, $message, $header) ? 0 : -1); + } +} +?> diff --git a/inc/inc.ClassFolder.php b/inc/inc.ClassFolder.php new file mode 100644 index 000000000..2c8fa927b --- /dev/null +++ b/inc/inc.ClassFolder.php @@ -0,0 +1,1166 @@ +getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) + return false; + else if (count($resArr) != 1) + return false; + + $resArr = $resArr[0]; + return new Folder($resArr["id"], $resArr["name"], $resArr["parent"], $resArr["comment"], $resArr["owner"], $resArr["inheritAccess"], $resArr["defaultAccess"], $resArr["sequence"]); +} + +function getFolderPathHTML($folder, $tagAll=false) { + + $path = $folder->getPath(); + $txtpath = ""; + for ($i = 0; $i < count($path); $i++) { + if ($i +1 < count($path)) { + $txtpath .= "getID()."&showtree=".showtree()."\">". + $path[$i]->getName()." / "; + } + else { + $txtpath .= ($tagAll ? "getID()."&showtree=".showtree()."\">". + $path[$i]->getName()."" : $path[$i]->getName()); + } + } + return $txtpath; +} + +function getFolderPathPlain($folder) { + $path=""; + $folderPath = $folder->getPath(); + for ($i = 0; $i < count($folderPath); $i++) { + $path .= $folderPath[$i]->getName(); + if ($i +1 < count($folderPath)) + $path .= " / "; + } + return $path; +} + + +/**********************************************************************\ +| Folder-Klasse | +\**********************************************************************/ + +class Folder +{ + var $_id; + var $_name; + var $_parentID; + var $_comment; + var $_ownerID; + var $_inheritAccess; + var $_defaultAccess; + var $_sequence; + + function Folder($id, $name, $parentID, $comment, $ownerID, $inheritAccess, $defaultAccess, $sequence) + { + $this->_id = $id; + $this->_name = $name; + $this->_parentID = $parentID; + $this->_comment = $comment; + $this->_ownerID = $ownerID; + $this->_inheritAccess = $inheritAccess; + $this->_defaultAccess = $defaultAccess; + $this->_sequence = $sequence; + } + + function getID() { return $this->_id; } + + function getName() { return $this->_name; } + + function setName($newName) { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblFolders SET name = '" . $newName . "' WHERE id = ". $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("folder_renamed_email"); + $message = getMLText("folder_renamed_email")."\r\n"; + $message .= + getMLText("old").": ".$this->_name."\r\n". + getMLText("new").": ".$newName."\r\n". + getMLText("folder").": ".getFolderPathPlain($this)."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + $this->_name = $newName; + + return true; + } + + function getComment() { return $this->_comment; } + + function setComment($newComment) { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblFolders SET comment = '" . $newComment . "' WHERE id = ". $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("comment_changed_email"); + $message = getMLText("comment_changed_email")."\r\n"; + $message .= + getMLText("name").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this)."\r\n". + getMLText("comment").": ".$newComment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + $this->_comment = $newComment; + return true; + } + + function getParent() + { + global $settings; + + if ($this->_id == $settings->_rootFolderID || !isset($this->_parentID) || ($this->_parentID == null) || ($this->_parentID == "") || ($this->_parentID == 0)) { + return false; + } + + if (!isset($this->_parent)) { + $this->_parent = getFolder($this->_parentID); + } + return $this->_parent; + } + + function setParent($newParent) { + global $db, $user, $settings; + + if ($this->_id == $settings->_rootFolderID || !isset($this->_parentID) || ($this->_parentID == null) || ($this->_parentID == "") || ($this->_parentID == 0)) { + return false; + } + + $queryStr = "UPDATE tblFolders SET parent = " . $newParent->getID() . " WHERE id = ". $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + $this->_parentID = $newParent->getID(); + $this->_parent = $newParent; + + // Must also ensure that any documents in this folder tree have their + // folderLists updated. + $pathPrefix=""; + $path = $this->getPath(); + foreach ($path as $f) { + $pathPrefix .= ":".$f->getID(); + } + if (strlen($pathPrefix)>1) { + $pathPrefix .= ":"; + } + + $queryStr = "SELECT `tblDocuments`.`id`, `tblDocuments`.`folderList` FROM `tblDocuments` WHERE `folderList` LIKE '%:".$this->_id.":%'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + foreach ($resArr as $row) { + $newPath = ereg_replace("^.*:".$this->_id.":(.*$)", $pathPrefix."\\1", $row["folderList"]); + $queryStr="UPDATE `tblDocuments` SET `folderList` = '".$newPath."' WHERE `tblDocuments`.`id` = '".$row["id"]."'"; + $res = $db->getResult($queryStr); + } + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("folder_moved_email"); + $message = getMLText("folder_moved_email")."\r\n"; + $message .= + getMLText("name").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this)."\r\n". + getMLText("comment").": ".$this->_comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + return true; + } + + function getOwner() + { + if (!isset($this->_owner)) + $this->_owner = getUser($this->_ownerID); + return $this->_owner; + } + + function setOwner($newOwner) { + GLOBAL $db, $user, $settings; + + $oldOwner = $this->getOwner(); + + $queryStr = "UPDATE tblFolders set owner = " . $newOwner->getID() . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("ownership_changed_email"); + $message = getMLText("ownership_changed_email")."\r\n"; + $message .= + getMLText("name").": ".$this->_name."\r\n". + getMLText("old").": ".$oldOwner->getFullName()."\r\n". + getMLText("new").": ".$newOwner->getFullName()."\r\n". + getMLText("folder").": ".getFolderPathPlain($this)."\r\n". + getMLText("comment").": ".$this->_comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + $this->_ownerID = $newOwner->getID(); + $this->_owner = $newOwner; + return true; + } + + function getDefaultAccess() + { + if ($this->inheritsAccess()) + { + $res = $this->getParent(); + if (!$res) return false; + return $this->_parent->getDefaultAccess(); + } + + return $this->_defaultAccess; + } + + function setDefaultAccess($mode) { + GLOBAL $db, $user, $settings; + + $queryStr = "UPDATE tblFolders set defaultAccess = " . $mode . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("access_permission_changed_email"); + $message = getMLText("access_permission_changed_email")."\r\n"; + $message .= + getMLText("name").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this)."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + $this->_defaultAccess = $mode; + + // If any of the notification subscribers no longer have read access, + // remove their subscription. + foreach ($this->_notifyList["users"] as $u) { + if ($this->getAccessMode($u) < M_READ) { + $this->removeNotify($u->getID(), true); + } + } + foreach ($this->_notifyList["groups"] as $g) { + if ($this->getGroupAccessMode($g) < M_READ) { + $this->removeNotify($g->getID(), false); + } + } + + return true; + } + + function inheritsAccess() { return $this->_inheritAccess; } + + function setInheritAccess($inheritAccess) { + GLOBAL $db, $user, $settings; + + $inheritAccess = ($inheritAccess) ? "1" : "0"; + + $queryStr = "UPDATE tblFolders SET inheritAccess = " . $inheritAccess . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_inheritAccess = $inheritAccess; + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("access_permission_changed_email"); + $message = getMLText("access_permission_changed_email")."\r\n"; + $message .= + getMLText("name").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this)."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + // If any of the notification subscribers no longer have read access, + // remove their subscription. + foreach ($this->_notifyList["users"] as $u) { + if ($this->getAccessMode($u) < M_READ) { + $this->removeNotify($u->getID(), true); + } + } + foreach ($this->_notifyList["groups"] as $g) { + if ($this->getGroupAccessMode($g) < M_READ) { + $this->removeNotify($g->getID(), false); + } + } + + return true; + } + + function getSequence() { return $this->_sequence; } + + function setSequence($seq) + { + GLOBAL $db; + + $queryStr = "UPDATE tblFolders SET sequence = " . $seq . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_sequence = $seq; + return true; + } + + function getSubFolders($orderby="") { + GLOBAL $db; + + if (!isset($this->_subFolders)) + { + if ($orderby=="n") $queryStr = "SELECT * FROM tblFolders WHERE parent = " . $this->_id . " ORDER BY name"; + else $queryStr = "SELECT * FROM tblFolders WHERE parent = " . $this->_id . " ORDER BY sequence"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + $this->_subFolders = array(); + for ($i = 0; $i < count($resArr); $i++) + $this->_subFolders[$i] = new Folder($resArr[$i]["id"], $resArr[$i]["name"], $resArr[$i]["parent"], $resArr[$i]["comment"], $resArr[$i]["owner"], $resArr[$i]["inheritAccess"], $resArr[$i]["defaultAccess"], $resArr[$i]["sequence"]); + } + + return $this->_subFolders; + } + + function addSubFolder($name, $comment, $owner, $sequence) { + GLOBAL $db, $user, $settings; + + //inheritAccess = true, defaultAccess = M_READ + $queryStr = "INSERT INTO tblFolders (name, parent, comment, owner, inheritAccess, defaultAccess, sequence) ". + "VALUES ('".$name."', ".$this->_id.", '".$comment."', ".$owner->getID().", 1, ".M_READ.", ".$sequence.")"; + if (!$db->getResult($queryStr)) + return false; + $newFolder = getFolder($db->getInsertID()); + unset($this->_subFolders); + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("new_subfolder_email"); + $message = getMLText("new_subfolder_email")."\r\n"; + $message .= + getMLText("name").": ".$name."\r\n". + getMLText("folder").": ".getFolderPathPlain($newFolder)."\r\n". + getMLText("comment").": ".$comment."\r\n". + getMLText("user").": ".$owner->getFullName()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$newFolder->getID()."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + return $newFolder; + } + + /** + * Gibt ein Array mit allen Eltern, "Großelter" usw bis zum RootFolder zurück + * Der Ordner selbst ist das letzte Element dieses Arrays + */ + function getPath() { + if (!isset($this->_parentID) || ($this->_parentID == "") || ($this->_parentID == 0)) { + return array($this); + } + else { + $res = $this->getParent(); + if (!$res) return false; + + $path = $this->_parent->getPath(); + if (!$path) return false; + + array_push($path, $this); + return $path; + } + } + + /** + * Überprüft, ob dieser Ordner ein Unterordner von $folder ist + */ + function isDescendant($folder) + { + if ($this->_parentID == $folder->getID()) + return true; + else if (isset($this->_parentID)) + { + $res = $this->getParent(); + if (!$res) return false; + + return $this->_parent->isDescendant($folder); + } + else + return false; + } + + function getDocuments($orderby="") + { + GLOBAL $db; + + if (!isset($this->_documents)) + { + + if ($orderby=="n") $queryStr = "SELECT * FROM tblDocuments WHERE folder = " . $this->_id . " ORDER BY name"; + else $queryStr = "SELECT * FROM tblDocuments WHERE folder = " . $this->_id . " ORDER BY sequence"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + + $this->_documents = array(); + foreach ($resArr as $row) { + array_push($this->_documents, new Document($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], isset($row["lockUser"])?$row["lockUser"]:NULL, $row["keywords"], $row["sequence"])); + } + } + return $this->_documents; + } + + // $comment will be used for both document and version leaving empty the version_comment + function addDocument($name, $comment, $expires, $owner, $keywords, $tmpFile, $orgFileName, $fileType, $mimeType, $sequence, $reviewers=array(), $approvers=array(),$reqversion,$version_comment="") + { + GLOBAL $db, $user, $settings; + + $expires = (!$expires) ? 0 : $expires; + + // Must also ensure that the document has a valid folderList. + $pathPrefix=""; + $path = $this->getPath(); + foreach ($path as $f) { + $pathPrefix .= ":".$f->getID(); + } + if (strlen($pathPrefix)>1) { + $pathPrefix .= ":"; + } + + $queryStr = "INSERT INTO tblDocuments (name, comment, date, expires, owner, folder, folderList, inheritAccess, defaultAccess, locked, keywords, sequence) VALUES ". + "('".$name."', '".$comment."', " . mktime().", ".$expires.", ".$owner->getID().", ".$this->_id.",'".$pathPrefix."', 1, ".M_READ.", -1, '".$keywords."', " . $sequence . ")"; + if (!$db->getResult($queryStr)) + return false; + + $document = getDocument($db->getInsertID()); + + if ($version_comment!="") + $res = $document->addContent($version_comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers,$reqversion,FALSE); + else $res = $document->addContent($comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers,$reqversion,FALSE); + + if (is_bool($res) && !$res) + { + $queryStr = "DELETE FROM tblDocuments WHERE id = " . $document->getID(); + $db->getResult($queryStr); + return false; + } + + // Send notification to subscribers. + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("new_document_email"); + $message = getMLText("new_document_email")."\r\n"; + $message .= + getMLText("name").": ".$name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this)."\r\n". + getMLText("comment").": ".$comment."\r\n". + getMLText("comment_for_current_version").": ".$version_comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + + return array($document, $res); + } + + + function remove($send_email=TRUE) { + global $db, $user, $settings; + + // Do not delete the root folder. + if ($this->_id == $settings->_rootFolderID || !isset($this->_parentID) || ($this->_parentID == null) || ($this->_parentID == "") || ($this->_parentID == 0)) { + return false; + } + + //Entfernen der Unterordner und Dateien + $res = $this->getSubFolders(); + if (is_bool($res) && !$res) return false; + $res = $this->getDocuments(); + if (is_bool($res) && !$res) return false; + + foreach ($this->_subFolders as $subFolder) + { + $res = $subFolder->remove(FALSE); + if (!$res) return false; + } + + foreach ($this->_documents as $document) + { + $res = $document->remove(FALSE); + if (!$res) return false; + } + + //Entfernen der Datenbankeinträge + $queryStr = "DELETE FROM tblFolders WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblACLs WHERE target = ". $this->_id. " AND targetType = " . T_FOLDER; + if (!$db->getResult($queryStr)) + return false; + + // Send notification to subscribers. + if ($send_email){ + + $this->getNotifyList(); + $subject = $settings->_siteName.": ".$this->_name." - ".getMLText("folder_deleted_email"); + $message = getMLText("folder_deleted_email")."\r\n"; + $message .= + getMLText("name").": ".$this->_name."\r\n". + getMLText("folder").": ".getFolderPathPlain($this)."\r\n". + getMLText("comment").": ".$this->_comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toList($user, $this->_notifyList["users"], $subject, $message); + foreach ($this->_notifyList["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + } + + $queryStr = "DELETE FROM tblNotify WHERE target = ". $this->_id. " AND targetType = " . T_FOLDER; + if (!$db->getResult($queryStr)) + return false; + + return true; + } + + + function getAccessList($mode = M_ANY, $op = O_EQ) + { + GLOBAL $db; + + if ($this->inheritsAccess()) + { + $res = $this->getParent(); + if (!$res) return false; + return $this->_parent->getAccessList($mode, $op); + } + + if (!isset($this->_accessList[$mode])) + { + if ($op!=O_GTEQ && $op!=O_LTEQ && $op!=O_EQ) { + return false; + } + $modeStr = ""; + if ($mode!=M_ANY) { + $modeStr = " AND mode".$op.$mode; + } + $queryStr = "SELECT * FROM tblACLs WHERE targetType = ".T_FOLDER. + " AND target = " . $this->_id . $modeStr . " ORDER BY targetType"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + + $this->_accessList[$mode] = array("groups" => array(), "users" => array()); + foreach ($resArr as $row) + { + if ($row["userID"] != -1) + array_push($this->_accessList[$mode]["users"], new UserAccess($row["userID"], $row["mode"])); + else //if ($row["groupID"] != -1) + array_push($this->_accessList[$mode]["groups"], new GroupAccess($row["groupID"], $row["mode"])); + } + } + + return $this->_accessList[$mode]; + } + + function clearAccessList() + { + GLOBAL $db; + + $queryStr = "DELETE FROM tblACLs WHERE targetType = " . T_FOLDER . " AND target = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_accessList); + return true; + } + + function addAccess($mode, $userOrGroupID, $isUser) { + GLOBAL $db; + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + $queryStr = "INSERT INTO tblACLs (target, targetType, ".$userOrGroup.", mode) VALUES + (".$this->_id.", ".T_FOLDER.", " . $userOrGroupID . ", " .$mode. ")"; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_accessList); + + // Update the notify list, if necessary. + if ($mode == M_NONE) { + $this->removeNotify($userOrGroupID, $isUser); + } + + return true; + } + + function changeAccess($newMode, $userOrGroupID, $isUser) { + GLOBAL $db; + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + $queryStr = "UPDATE tblACLs SET mode = " . $newMode . " WHERE targetType = ".T_FOLDER." AND target = " . $this->_id . " AND " . $userOrGroup . " = " . $userOrGroupID; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_accessList); + + // Update the notify list, if necessary. + if ($newMode == M_NONE) { + $this->removeNotify($userOrGroupID, $isUser); + } + + return true; + } + + function removeAccess($userOrGroupID, $isUser) { + GLOBAL $db; + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + $queryStr = "DELETE FROM tblACLs WHERE targetType = ".T_FOLDER." AND target = ".$this->_id." AND ".$userOrGroup." = " . $userOrGroupID; + if (!$db->getResult($queryStr)) + return false; + + unset($this->_accessList); + + // Update the notify list, if necessary. + $mode = ($isUser ? $this->getAccessMode(getUser($userOrGroupID)) : $this->getGroupAccessMode(getGroup($userOrGroupID))); + if ($mode == M_NONE) { + $this->removeNotify($userOrGroupID, $isUser); + } + + return true; + } + + /* + * Liefert die Art der Zugriffsberechtigung für den User $user; Mögliche Rechte: n (keine), r (lesen), w (schreiben+lesen), a (alles) + * Zunächst wird Geprüft, ob die Berechtigung geerbt werden soll; in diesem Fall wird die Anfrage an den Eltern-Ordner weitergeleitet. + * Ansonsten werden die ACLs durchgegangen: Die höchstwertige Berechtigung gilt. + * Wird bei den ACLs nicht gefunden, wird die Standard-Berechtigung zurückgegeben. + * Ach ja: handelt es sich bei $user um den Besitzer ist die Berechtigung automatisch "a". + */ + function getAccessMode($user) + { + GLOBAL $settings; + + //Admin?? + if ($user->isAdmin()) return M_ALL; + + //Besitzer ?? + if ($user->getID() == $this->_ownerID) return M_ALL; + + //Gast-Benutzer?? + if (($user->getID() == $settings->_guestID) && ($settings->_enableGuestLogin)) + { + $mode = $this->getDefaultAccess(); + if ($mode >= M_READ) return M_READ; + else return M_NONE; + } + + //Berechtigung erben?? + // wird über GetAccessList() bereits realisiert. + // durch das Verwenden der folgenden Zeilen wären auch Owner-Rechte vererbt worden. + /* + if ($this->inheritsAccess()) + { + if (isset($this->_parentID)) + { + if (!$this->getParent()) + return false; + return $this->_parent->getAccessMode($user); + } + } + */ + + //ACLs durchforsten + $accessList = $this->getAccessList(); + if (!$accessList) return false; + + foreach ($accessList["users"] as $userAccess) + { + if ($userAccess->getUserID() == $user->getID()) + { + return $userAccess->getMode(); + } + } + foreach ($accessList["groups"] as $groupAccess) + { + if ($user->isMemberOfGroup($groupAccess->getGroup())) + { + return $groupAccess->getMode(); + } + } + return $this->getDefaultAccess(); + } + + function getGroupAccessMode($group) { + GLOBAL $settings; + + $highestPrivileged = M_NONE; + $foundInACL = false; + $accessList = $this->getAccessList(); + if (!$accessList) + return false; + + foreach ($accessList["groups"] as $groupAccess) { + if ($groupAccess->getGroupID() == $group->getID()) { + $foundInACL = true; + if ($groupAccess->getMode() > $highestPrivileged) + $highestPrivileged = $groupAccess->getMode(); + if ($highestPrivileged == M_ALL) //höher geht's nicht -> wir können uns die arbeit schenken + return $highestPrivileged; + } + } + if ($foundInACL) + return $highestPrivileged; + + //Standard-Berechtigung verwenden + return $this->getDefaultAccess(); + } + + function getNotifyList() + { + if (!isset($this->_notifyList)) + { + GLOBAL $db; + + $queryStr ="SELECT * FROM tblNotify WHERE targetType = " . T_FOLDER . " AND target = " . $this->_id; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + $this->_notifyList = array("groups" => array(), "users" => array()); + foreach ($resArr as $row) + { + if ($row["userID"] != -1) + array_push($this->_notifyList["users"], getUser($row["userID"]) ); + else //if ($row["groupID"] != -1) + array_push($this->_notifyList["groups"], getGroup($row["groupID"]) ); + } + } + return $this->_notifyList; + } + + function addNotify($userOrGroupID, $isUser) { + + // Return values: + // -1: Invalid User/Group ID. + // -2: Target User / Group does not have read access. + // -3: User is already subscribed. + // -4: Database / internal error. + // 0: Update successful. + + GLOBAL $db, $settings, $user; + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + // + // Verify that user / group exists. + // + $obj = ($isUser ? getUser($userOrGroupID) : getGroup($userOrGroupID)); + if (!is_object($obj)) { + return -1; + } + + // + // Verify that the requesting user has permission to add the target to + // the notification system. + // + if ($user->getID() == $settings->_guestID) { + return -2; + } + if (!$user->isAdmin()) { + if ($isUser) { + if ($user->getID() != $obj->getID()) { + return -2; + } + } + else { + if (!$obj->isMember($user)) { + return -2; + } + } + } + + // + // Verify that user / group has read access to the document. + // + if ($isUser) { + // Users are straightforward to check. + if ($this->getAccessMode($obj) < M_READ) { + return -2; + } + } + else { + // Groups are a little more complex. + if ($this->getDefaultAccess() >= M_READ) { + // If the default access is at least READ-ONLY, then just make sure + // that the current group has not been explicitly excluded. + $acl = $this->getAccessList(M_NONE, O_EQ); + $found = false; + foreach ($acl["groups"] as $group) { + if ($group->getGroupID() == $userOrGroupID) { + $found = true; + break; + } + } + if ($found) { + return -2; + } + } + else { + // The default access is restricted. Make sure that the group has + // been explicitly allocated access to the document. + $acl = $this->getAccessList(M_READ, O_GTEQ); + if (is_bool($acl)) { + return -4; + } + $found = false; + foreach ($acl["groups"] as $group) { + if ($group->getGroupID() == $userOrGroupID) { + $found = true; + break; + } + } + if (!$found) { + return -2; + } + } + } + // + // Check to see if user/group is already on the list. + // + $queryStr = "SELECT * FROM `tblNotify` WHERE `tblNotify`.`target` = '".$this->_id."' ". + "AND `tblNotify`.`targetType` = '".T_FOLDER."' ". + "AND `tblNotify`.`".$userOrGroup."` = '".$userOrGroupID."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr)) { + return -4; + } + if (count($resArr)>0) { + return -3; + } + + $queryStr = "INSERT INTO tblNotify (target, targetType, " . $userOrGroup . ") VALUES (" . $this->_id . ", " . T_FOLDER . ", " . $userOrGroupID . ")"; + if (!$db->getResult($queryStr)) + return -4; + + // Email user / group, informing them of subscription. + $path=""; + $folderPath = $this->getPath(); + for ($i = 0; $i < count($folderPath); $i++) { + $path .= $folderPath[$i]->getName(); + if ($i +1 < count($folderPath)) + $path .= " / "; + } + $subject = $settings->_siteName.": ".$this->getName()." - ".getMLText("notify_added_email"); + $message = getMLText("notify_added_email")."\r\n"; + $message .= + getMLText("name").": ".$this->getName()."\r\n". + getMLText("folder").": ".$path."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + if ($isUser) { + Email::toIndividual($user, $obj, $subject, $message); + } + else { + Email::toGroup($user, $obj, $subject, $message); + } + + unset($this->_notifyList); + return 0; + } + + function removeNotify($userOrGroupID, $isUser) { + + // Return values: + // -1: Invalid User/Group ID. + // -3: User is not subscribed. No action taken. + // -4: Database / internal error. + // 0: Update successful. + + GLOBAL $db, $settings, $user; + + // + // Verify that user / group exists. + // + $obj = ($isUser ? getUser($userOrGroupID) : getGroup($userOrGroupID)); + if (!is_object($obj)) { + return -1; + } + + $userOrGroup = ($isUser) ? "userID" : "groupID"; + + // + // Verify that the requesting user has permission to add the target to + // the notification system. + // + if ($user->getID() == $settings->_guestID) { + return -2; + } + if (!$user->isAdmin()) { + if ($isUser) { + if ($user->getID() != $obj->getID()) { + return -2; + } + } + else { + if (!$obj->isMember($user)) { + return -2; + } + } + } + + // + // Check to see if the target is in the database. + // + $queryStr = "SELECT * FROM `tblNotify` WHERE `tblNotify`.`target` = '".$this->_id."' ". + "AND `tblNotify`.`targetType` = '".T_FOLDER."' ". + "AND `tblNotify`.`".$userOrGroup."` = '".$userOrGroupID."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr)) { + return -4; + } + if (count($resArr)==0) { + return -3; + } + + $queryStr = "DELETE FROM tblNotify WHERE target = " . $this->_id . " AND targetType = " . T_FOLDER . " AND " . $userOrGroup . " = " . $userOrGroupID; + if (!$db->getResult($queryStr)) + return -4; + + // Email user / group, informing them of subscription. + $path=""; + $folderPath = $this->getPath(); + for ($i = 0; $i < count($folderPath); $i++) { + $path .= $folderPath[$i]->getName(); + if ($i +1 < count($folderPath)) + $path .= " / "; + } + $subject = $settings->_siteName.": ".$this->getName()." - ".getMLText("notify_deleted_email"); + $message = getMLText("notify_deleted_email")."\r\n"; + $message .= + getMLText("name").": ".$this->getName()."\r\n". + getMLText("folder").": ".$path."\r\n". + getMLText("comment").": ".$this->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$this->_id."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + if ($isUser) { + Email::toIndividual($user, $obj, $subject, $message); + } + else { + Email::toGroup($user, $obj, $subject, $message); + } + + unset($this->_notifyList); + return 0; + } + + function getApproversList() { + GLOBAL $db, $settings; + + if (!isset($this->_approversList)) { + $this->_approversList = array("groups" => array(), "users" => array()); + $userIDs = ""; + $groupIDs = ""; + $defAccess = $this->getDefaultAccess(); + + if ($defAccessgetAccessList(M_READ, O_GTEQ); + } + else { + // Get the list of all users and groups that DO NOT have write access + // to the folder. + $tmpList = $this->getAccessList(M_NONE, O_LTEQ); + } + foreach ($tmpList["groups"] as $group) { + $groupIDs .= (strlen($groupIDs)==0 ? "" : ", ") . $group->getGroupID(); + } + foreach ($tmpList["users"] as $user) { + if ($user->getUserID()!=$settings->_guestID) { + $userIDs .= (strlen($userIDs)==0 ? "" : ", ") . $user->getUserID(); + } + } + + // Construct a query against the users table to identify those users + // that have write access to this folder, either directly through an + // ACL entry, by virtue of ownership or by having administrative rights + // on the database. + $queryStr=""; + if ($defAccess < M_READ) { + if (strlen($groupIDs)>0) { + $queryStr = "(SELECT `tblUsers`.* FROM `tblUsers` ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ". + "WHERE `tblGroupMembers`.`groupID` IN (". $groupIDs .") ". + "AND `tblUsers`.`id` !='".$settings->_guestID."')"; + } + $queryStr .= (strlen($queryStr)==0 ? "" : " UNION "). + "(SELECT `tblUsers`.* FROM `tblUsers` ". + "WHERE (`tblUsers`.`id` !='".$settings->_guestID."') ". + "AND ((`tblUsers`.`id` = ". $this->_ownerID . ") ". + "OR (`tblUsers`.`isAdmin` = 1)". + (strlen($userIDs) == 0 ? "" : " OR (`tblUsers`.`id` IN (". $userIDs ."))"). + ")) ORDER BY `login`"; + } + else { + if (strlen($groupIDs)>0) { + $queryStr = "(SELECT `tblUsers`.* FROM `tblUsers` ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ". + "WHERE `tblGroupMembers`.`groupID` NOT IN (". $groupIDs .")". + "AND `tblUsers`.`id` != '".$settings->_guestID."' ". + (strlen($userIDs) == 0 ? ")" : " AND (`tblUsers`.`id` NOT IN (". $userIDs .")))"); + } + $queryStr .= (strlen($queryStr)==0 ? "" : " UNION "). + "(SELECT `tblUsers`.* FROM `tblUsers` ". + "WHERE (`tblUsers`.`id` = ". $this->_ownerID . ") ". + "OR (`tblUsers`.`isAdmin` = 1))". + "UNION ". + "(SELECT `tblUsers`.* FROM `tblUsers` ". + "WHERE `tblUsers`.`id` != '".$settings->_guestID."' ". + (strlen($userIDs) == 0 ? ")" : " AND (`tblUsers`.`id` NOT IN (". $userIDs .")))"). + " ORDER BY `login`"; + } + $resArr = $db->getResultArray($queryStr); + if (!is_bool($resArr)) { + foreach ($resArr as $row) { + if ((!$settings->_enableAdminRevApp) && ($row["id"]==$settings->_adminID)) continue; + $this->_approversList["users"][] = new LetoDMS_User($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["isAdmin"]); + } + } + + // Assemble the list of groups that have write access to the folder. + $queryStr=""; + if ($defAccess < M_READ) { + if (strlen($groupIDs)>0) { + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ". + "WHERE `tblGroups`.`id` IN (". $groupIDs .")"; + } + } + else { + if (strlen($groupIDs)>0) { + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ". + "WHERE `tblGroups`.`id` NOT IN (". $groupIDs .")"; + } + else { + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups`"; + } + } + if (strlen($queryStr)>0) { + $resArr = $db->getResultArray($queryStr); + if (!is_bool($resArr)) { + foreach ($resArr as $row) { + $this->_approversList["groups"][] = new Group($row["id"], $row["name"], $row["comment"]); + } + } + } + } + return $this->_approversList; + } +} + +?> diff --git a/inc/inc.ClassGroup.php b/inc/inc.ClassGroup.php new file mode 100644 index 000000000..2a9864635 --- /dev/null +++ b/inc/inc.ClassGroup.php @@ -0,0 +1,340 @@ +getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) + return false; + else if (count($resArr) != 1) //wenn, dann wohl eher 0 als > 1 ;-) + return false; + + $resArr = $resArr[0]; + + return new Group($resArr["id"], $resArr["name"], $resArr["comment"]); +} + +function getGroupByName($name) { + global $db; + + $queryStr = "SELECT `tblGroups`.* FROM `tblGroups` WHERE `tblGroups`.`name` = '".$name."'"; + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) + return false; + else if (count($resArr) != 1) //wenn, dann wohl eher 0 als > 1 ;-) + return false; + + $resArr = $resArr[0]; + + return new Group($resArr["id"], $resArr["name"], $resArr["comment"]); +} + +function getAllGroups() +{ + global $db; + + $queryStr = "SELECT * FROM tblGroups ORDER BY name"; + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) + return false; + + $groups = array(); + + for ($i = 0; $i < count($resArr); $i++) + $groups[$i] = new Group($resArr[$i]["id"], $resArr[$i]["name"], $resArr[$i]["comment"]); + + return $groups; +} + + +function addGroup($name, $comment) +{ + global $db; + + if (is_object(getGroupByName($name))) { + return false; + } + + $queryStr = "INSERT INTO tblGroups (name, comment) VALUES ('".$name."', '" . $comment . "')"; + if (!$db->getResult($queryStr)) + return false; + + return getGroup($db->getInsertID()); +} + + +/**********************************************************************\ +| Group-Klasse | +\**********************************************************************/ + +class Group +{ + var $_id; + var $_name; + + function Group($id, $name, $comment) + { + $this->_id = $id; + $this->_name = $name; + $this->_comment = $comment; + } + + function getID() { return $this->_id; } + + function getName() { return $this->_name; } + + function setName($newName) + { + global $db; + + $queryStr = "UPDATE tblGroups SET name = '" . $newName . "' WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_name = $newName; + return true; + } + + function getComment() { return $this->_comment; } + + function setComment($newComment) + { + global $db; + + $queryStr = "UPDATE tblGroups SET comment = '" . $newComment . "' WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_comment = $newComment; + return true; + } + + function getUsers() + { + global $db; + + if (!isset($this->_users)) + { + $queryStr = "SELECT `tblUsers`.* FROM `tblUsers` ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ". + "WHERE `tblGroupMembers`.`groupID` = '". $this->_id ."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + $this->_users = array(); + + foreach ($resArr as $row) + { + $user = new LetoDMS_User($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["isAdmin"]); + array_push($this->_users, $user); + } + } + return $this->_users; + } + + function addUser($user,$asManager=false) + { + global $db; + + $queryStr = "INSERT INTO tblGroupMembers (groupID, userID, manager) VALUES (".$this->_id.", ".$user->getID(). ", " . ($asManager?"1":"0") ." )"; + $res = $db->getResult($queryStr); + + if ($res) return false; + + unset($this->_users); + return true; + } + + function removeUser($user) + { + global $db; + + $queryStr = "DELETE FROM tblGroupMembers WHERE groupID = ".$this->_id." AND userID = ".$user->getID(); + $res = $db->getResult($queryStr); + + if ($res) return false; + unset($this->_users); + return true; + } + + // $asManager=false: verify if user is in group + // $asManager=true : verify if user is in group as manager + function isMember($user,$asManager=false) + { + if (isset($this->_users)&&!$asManager) + { + foreach ($this->_users as $usr) + if ($usr->getID() == $user->getID()) + return true; + return false; + } + + global $db; + if ($asManager) $queryStr = "SELECT * FROM tblGroupMembers WHERE groupID = " . $this->_id . " AND userID = " . $user->getID() . " AND manager = 1"; + else $queryStr = "SELECT * FROM tblGroupMembers WHERE groupID = " . $this->_id . " AND userID = " . $user->getID(); + + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) return false; + if (count($resArr) != 1) return false; + + return true; + } + + function toggleManager($user) + { + global $db; + + if (!$this->isMember($user)) return false; + + if ($this->isMember($user,true)) $queryStr = "UPDATE tblGroupMembers SET manager = 0 WHERE groupID = ".$this->_id." AND userID = ".$user->getID(); + else $queryStr = "UPDATE tblGroupMembers SET manager = 1 WHERE groupID = ".$this->_id." AND userID = ".$user->getID(); + + if (!$db->getResult($queryStr)) return false; + return true; + } + + /** + * Entfernt die Gruppe aus dem System. + * Dies ist jedoch nicht mit einem Löschen des entsprechenden Eintrags aus tblGroups geschehen - vielmehr + * muss dafür gesorgt werden, dass die Gruppe nirgendwo mehr auftaucht. D.h. auch die Tabellen tblACLs, + * tblNotify und tblGroupMembers müssen berücksichtigt werden. + */ + function remove() + { + GLOBAl $db, $user; + + $queryStr = "DELETE FROM tblGroups WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblGroupMembers WHERE groupID = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblACLs WHERE groupID = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblNotify WHERE groupID = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblMandatoryReviewers WHERE reviewerGroupID = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + $queryStr = "DELETE FROM tblMandatoryApprovers WHERE approverGroupID = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + // TODO : update document status if reviewer/approver has been deleted + + + $reviewStatus = $this->getReviewStatus(); + foreach ($reviewStatus as $r) { + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $r["reviewID"] ."', '-2', 'Review group removed from process', NOW(), '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + } + + $approvalStatus = $this->getApprovalStatus(); + foreach ($approvalStatus as $a) { + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $a["approveID"] ."', '-2', 'Approval group removed from process', NOW(), '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + } + + return true; + } + + function getReviewStatus($documentID=null, $version=null) { + global $db; + + if (!$db->createTemporaryTable("ttreviewid")) { + return false; + } + + $status = array(); + + // See if the group is assigned as a reviewer. + $queryStr = "SELECT `tblDocumentReviewers`.*, `tblDocumentReviewLog`.`status`, ". + "`tblDocumentReviewLog`.`comment`, `tblDocumentReviewLog`.`date`, ". + "`tblDocumentReviewLog`.`userID` ". + "FROM `tblDocumentReviewers` ". + "LEFT JOIN `tblDocumentReviewLog` USING (`reviewID`) ". + "LEFT JOIN `ttreviewid` on `ttreviewid`.`maxLogID` = `tblDocumentReviewLog`.`reviewLogID` ". + "WHERE `ttreviewid`.`maxLogID`=`tblDocumentReviewLog`.`reviewLogID` ". + ($documentID==null ? "" : "AND `tblDocumentReviewers`.`documentID` = '". $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentReviewers`.`version` = '". $version ."' "). + "AND `tblDocumentReviewers`.`type`='1' ". + "AND `tblDocumentReviewers`.`required`='". $this->_id ."' "; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) + $status[] = $res; + } + return $status; + } + + function getApprovalStatus($documentID=null, $version=null) { + global $db; + + if (!$db->createTemporaryTable("ttapproveid")) { + return false; + } + + $status = array(); + + // See if the group is assigned as an approver. + $queryStr = "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". + "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". + "`tblDocumentApproveLog`.`userID` ". + "FROM `tblDocumentApprovers` ". + "LEFT JOIN `tblDocumentApproveLog` USING (`approveID`) ". + "LEFT JOIN `ttapproveid` on `ttapproveid`.`maxLogID` = `tblDocumentApproveLog`.`approveLogID` ". + "WHERE `ttapproveid`.`maxLogID`=`tblDocumentApproveLog`.`approveLogID` ". + ($documentID==null ? "" : "AND `tblDocumentApprovers`.`documentID` = '". $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentApprovers`.`version` = '". $version ."' "). + "AND `tblDocumentApprovers`.`type`='1' ". + "AND `tblDocumentApprovers`.`required`='". $this->_id ."' "; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) + $status[] = $res; + } + + return $status; + } +} +?> diff --git a/inc/inc.ClassKeywords.php b/inc/inc.ClassKeywords.php new file mode 100644 index 000000000..8851d60e0 --- /dev/null +++ b/inc/inc.ClassKeywords.php @@ -0,0 +1,188 @@ +getResultArray($queryStr); + if ((is_bool($resArr) && !$resArr) || (count($resArr) != 1)) + return false; + + $resArr = $resArr[0]; + return new Keywordcategory($resArr["id"], $resArr["owner"], $resArr["name"]); +} + +function getKeywordCategoryByName($name, $owner) { + GLOBAL $db; + + $queryStr = "SELECT * FROM tblKeywordCategories WHERE name = '" . $name . "' AND owner = '" . $owner. "'"; + $resArr = $db->getResultArray($queryStr); + if ((is_bool($resArr) && !$resArr) || (count($resArr) != 1)) + return false; + + $resArr = $resArr[0]; + return new Keywordcategory($resArr["id"], $resArr["owner"], $resArr["name"]); +} + +function getAllKeywordCategories($userID = -1) { + GLOBAL $db, $settings; + + $queryStr = "SELECT * FROM tblKeywordCategories"; + if ($userID != -1) + $queryStr .= " WHERE owner = $userID OR owner = " . $settings->_adminID; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + + $categories = array(); + foreach ($resArr as $row) + array_push($categories, new KeywordCategory($row["id"], $row["owner"], $row["name"])); + + return $categories; +} + +function getAllUserKeywordCategories($userID) { + GLOBAL $db, $settings; + + $queryStr = "SELECT * FROM tblKeywordCategories"; + if ($userID != -1) + $queryStr .= " WHERE owner = " . $userID; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + + $categories = array(); + foreach ($resArr as $row) + array_push($categories, new KeywordCategory($row["id"], $row["owner"], $row["name"])); + + return $categories; +} + +function addKeywordCategory($owner, $name) { + global $db; + + if (is_object(getKeywordCategoryByName($name, owner))) { + return false; + } + $queryStr = "INSERT INTO tblKeywordCategories (owner, name) VALUES ($owner, '$name')"; + if (!$db->getResult($queryStr)) + return false; + + return getKeywordCategory($db->getInsertID()); +} + +//---------------------------------------------------------------------------------------------- +class KeywordCategory +{ + var $_id; + var $_ownerID; + var $_name; + + function KeywordCategory($id, $ownerID, $name) + { + $this->_id = $id; + $this->_name = $name; + $this->_ownerID = $ownerID; + } + + function getID() { return $this->_id; } + + function getName() { return $this->_name; } + + function getOwner() { + if (!isset($this->_owner)) + $this->_owner = getUser($this->_ownerID); + return $this->_owner; + } + + function setName($newName) + { + GLOBAL $db; + + $queryStr = "UPDATE tblKeywordCategories SET name = '$newName' WHERE id = ". $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_name = $newName; + return true; + } + + function setOwner($user) { + GLOBAL $db; + + $queryStr = "UPDATE tblKeywordCategories SET owner = " . $user->getID() . " WHERE id " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_ownerID = $user->getID(); + $this->_owner = $user; + return true; + } + + function getKeywordLists() { + GLOBAL $db; + + $queryStr = "SELECT * FROM tblKeywords WHERE category = " . $this->_id; + return $db->getResultArray($queryStr); + } + + function editKeywordList($listID, $keywords) { + GLOBAL $db; + + $queryStr = "UPDATE tblKeywords SET keywords = '$keywords' WHERE id = $listID"; + return $db->getResult($queryStr); + } + + function addKeywordList($keywords) { + GLOBAL $db; + + $queryStr = "INSERT INTO tblKeywords (category, keywords) VALUES (" . $this->_id . ", '$keywords')"; + return $db->getResult($queryStr); + } + + function removeKeywordList($listID) { + GLOBAL $db; + + $queryStr = "DELETE FROM tblKeywords WHERE id = $listID"; + return $db->getResult($queryStr); + } + + function remove() + { + GLOBAL $db; + + $queryStr = "DELETE FROM tblKeywords WHERE category = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $queryStr = "DELETE FROM tblKeywordCategories WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + return true; + } +} + +?> diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php new file mode 100644 index 000000000..d014b8d38 --- /dev/null +++ b/inc/inc.ClassUI.php @@ -0,0 +1,719 @@ +_theme; +} +if (strlen($theme)==0) { + $theme="blue"; +} + +// for extension use LOWER CASE only +$icons = array(); +$icons["txt"] = "txt.png"; +$icons["text"] = "txt.png"; +$icons["doc"] = "word.png"; +$icons["dot"] = "word.png"; +$icons["docx"] = "word.png"; +$icons["dotx"] = "word.png"; +$icons["rtf"] = "document.png"; +$icons["xls"] = "excel.png"; +$icons["xlt"] = "excel.png"; +$icons["xlsx"] = "excel.png"; +$icons["xltx"] = "excel.png"; +$icons["ppt"] = "powerpoint.png"; +$icons["pot"] = "powerpoint.png"; +$icons["pptx"] = "powerpoint.png"; +$icons["potx"] = "powerpoint.png"; +$icons["exe"] = "binary.png"; +$icons["html"] = "html.png"; +$icons["htm"] = "html.png"; +$icons["gif"] = "image.png"; +$icons["jpg"] = "image.png"; +$icons["jpeg"] = "image.png"; +$icons["bmp"] = "image.png"; +$icons["png"] = "image.png"; +$icons["tif"] = "image.png"; +$icons["tiff"] = "image.png"; +$icons["log"] = "log.png"; +$icons["midi"] = "midi.png"; +$icons["pdf"] = "pdf.png"; +$icons["wav"] = "sound.png"; +$icons["mp3"] = "sound.png"; +$icons["c"] = "source_c.png"; +$icons["cpp"] = "source_cpp.png"; +$icons["h"] = "source_h.png"; +$icons["java"] = "source_java.png"; +$icons["py"] = "source_py.png"; +$icons["tar"] = "tar.png"; +$icons["gz"] = "gz.png"; +$icons["7z"] = "gz.png"; +$icons["bz"] = "gz.png"; +$icons["bz2"] = "gz.png"; +$icons["tgz"] = "gz.png"; +$icons["zip"] = "gz.png"; +$icons["mpg"] = "video.png"; +$icons["avi"] = "video.png"; +$icons["tex"] = "tex.png"; +$icons["ods"] = "ooo_spreadsheet.png"; +$icons["ots"] = "ooo_spreadsheet.png"; +$icons["sxc"] = "ooo_spreadsheet.png"; +$icons["stc"] = "ooo_spreadsheet.png"; +$icons["odt"] = "ooo_textdocument.png"; +$icons["ott"] = "ooo_textdocument.png"; +$icons["sxw"] = "ooo_textdocument.png"; +$icons["stw"] = "ooo_textdocument.png"; +$icons["odp"] = "ooo_presentation.png"; +$icons["otp"] = "ooo_presentation.png"; +$icons["sxi"] = "ooo_presentation.png"; +$icons["sti"] = "ooo_presentation.png"; +$icons["odg"] = "ooo_drawing.png"; +$icons["otg"] = "ooo_drawing.png"; +$icons["sxd"] = "ooo_drawing.png"; +$icons["std"] = "ooo_drawing.png"; +$icons["odf"] = "ooo_formula.png"; +$icons["sxm"] = "ooo_formula.png"; +$icons["smf"] = "ooo_formula.png"; +$icons["mml"] = "ooo_formula.png"; + +$icons["default"] = "default.png"; + +class UI { + function getStyles() { + GLOBAL $settings; + + $themes = array(); + $path = $settings->_rootDir . "styles/"; + $handle = opendir($path); + + while ($entry = readdir($handle) ) { + if ($entry == ".." || $entry == ".") + continue; + else if (is_dir($path . $entry)) + array_push($themes, $entry); + } + closedir($handle); + return $themes; + } + + function htmlStartPage($title="", $bodyClass="") { + global $theme, $settings; + + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "".(strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS").(strlen($title)>0 ? ": " : "").$title."\n"; + echo "\n"; + echo "0 ? " class=\"".$bodyClass."\"" : "").">\n"; + } + + function htmlEndPage() { + UI::footNote(); + echo "\n\n"; + } + + function footNote() { + global $settings; + + if ($settings->_printDisclaimer){ + echo "
".getMLText("disclaimer")."
"; + } + + if (isset($settings->_footNote) && strlen((string)$settings->_footNote)>0) { + echo "
".(string)$settings->_footNote."
"; + } + + return; + } + + function globalBanner() { + global $settings; + + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo "
". + (strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS"). + "
\n"; + echo "
 
\n". + "
\n"; + return; + } + + function globalNavigation($folder=null) { + global $settings, $user; + + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "
\n"; + echo "
". + (strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS"). + "
\n"; + echo "\n"; + echo "
".getMLText("signed_in_as")." ".$user->getFullName(). + " (".getMLText("sign_out").").
\n"; + echo "
 
\n". + "
\n"; + return; + } + + function pageNavigation($pageTitle, $pageType=null, $extra=null) { + global $settings, $user; + + echo "
\n"; + // This spacer span is an awful hack, but it is the only way I know to + // get the spacer to match the mainheading content's size. + echo "".($settings->_titleDisplayHack ? $pageTitle : "")."\n"; + echo "
".$pageTitle."
\n"; + echo "
\n
\n"; + + if ($pageType!=null && strcasecmp($pageType, "noNav")) { + echo "
\n"; + switch ($pageType) { + case "view_folder": + UI::folderNavigationBar($extra); + break; + case "view_document": + UI::documentNavigationBar(); + break; + case "my_documents": + UI::myDocumentsNavigationBar(); + break; + case "my_account": + UI::accountNavigationBar(); + break; + case "admin_tools": + UI::adminToolsNavigationBar(); + break; + case "calendar"; + UI::calendarNavigationBar($extra); + break; + } + echo "
\n
\n"; + } + + return; + } + + function folderNavigationBar($folder) { + + global $user, $settings, $theme; + + if (!is_object($folder) || strcasecmp(get_class($folder), "Folder")) { + echo "
    \n"; + echo "
\n"; + return; + } + $accessMode = $folder->getAccessMode($user); + $folderID = $folder->getID(); + echo "\n"; + return; + } + + function documentNavigationBar() { + + global $user, $settings, $document; + + $accessMode = $document->getAccessMode($user); + $docid=".php?documentid=" . $document->getID(); + + echo "\n"; + return; + } + + function accountNavigationBar() { + + global $settings,$user; + + echo "\n"; + return; + } + + function myDocumentsNavigationBar() { + + echo "\n"; + return; + } + + function adminToolsNavigationBar() { + + global $settings; + + echo "\n"; + return; + } + + function calendarNavigationBar($d){ + + $ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2]; + + echo "\n"; + return; + + } + + function pageList($pageNumber, $totalPages, $baseURI, $params) { + + if (!is_numeric($pageNumber) || !is_numeric($totalPages) || $totalPages<2) { + return; + } + + // Construct the basic URI based on the $_GET array. One could use a + // regular expression to strip out the pg (page number) variable to + // achieve the same effect. This seems to be less haphazard though... + $resultsURI = $baseURI; + $first=true; + foreach ($params as $key=>$value) { + // Don't include the page number in the basic URI. This is added in + // during the list display loop. + if (!strcasecmp($key, "pg")) { + continue; + } + if (is_array($value)) { + foreach ($value as $subvalue) { + $resultsURI .= ($first ? "?" : "&").$key."%5B%5D=".$subvalue; + $first = false; + } + } + else { + $resultsURI .= ($first ? "?" : "&").$key."=".$value; + } + $first = false; + } + + echo "
"; + echo getMLText("results_page").": "; + for ($i = 1; $i <= $totalPages; $i++) { + if ($i == $pageNumber) echo "".$i." "; + else echo "".$i.""." "; + } + if ($totalPages>1) { + echo "".getMLText("all_pages").""." "; + } + echo "
"; + + return; + } + + function contentContainer($content) { + + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo $content; + echo "
\n
\n
\n"; + return; + } + function contentContainerStart() { + + echo "
\n"; + echo "
\n"; + echo "
\n"; + return; + } + function contentContainerEnd() { + + echo "
\n
\n
\n"; + return; + } + + function contentHeading($heading) { + + echo "
".$heading."
\n"; + return; + } + function contentSubHeading($heading, $first=false) { + + echo "
".$heading."
\n"; + return; + } + + function getMimeIcon($fileType) { + global $icons; + + $ext = strtolower(substr($fileType, 1)); + if (isset($icons[$ext])) { + return $icons[$ext]; + } + else { + return $icons["default"]; + } + } + + function printDateChooser($defDate = -1, $varName) { + + if ($defDate == -1) + $defDate = mktime(); + $day = date("d", $defDate); + $month = date("m", $defDate); + $year = date("Y", $defDate); + + print " \n"; + print " \n"; + print ""; + } + + function printSequenceChooser($objArr, $keepID = -1) { + if (count($objArr) > 0) { + $max = $objArr[count($objArr)-1]->getSequence() + 1; + $min = $objArr[0]->getSequence() - 1; + } + else { + $max = 1.0; + } + print ""; + } + + function printDocumentChooser($formName) { + global $settings; + ?> + + "; + print ""; + print "  "; + } + + function printFolderChooser($formName, $accessMode, $exclude = -1, $default = false) { + global $settings; + ?> + + getID() : "") ."\">"; + print "getName() : "") ."\">"; + print "  "; + } + + function getImgPath($img) { + global $theme; + + if ( is_file("../styles/$theme/images/$img") ) { + return "../styles/$theme/images/$img"; + } + else if ( is_file("../styles/$theme/img/$img") ) { + return "../styles/$theme/img/$img"; + } + return "../out/images/$img"; + } + + function printImgPath($img) { + print UI::getImgPath($img); + } + + function exitError($pagetitle,$error){ + + UI::htmlStartPage($pagetitle); + UI::globalNavigation(); + + print "
"; + print $error; + print "
"; + + UI::htmlEndPage(); + + add_log_line(" UI::exitError error=".$error." pagetitle=".$pagetitle); + + exit; + } + + // navigation flag is used for items links (navigation or selection) + function printFoldersTree($accessMode, $exclude, $folderID, $currentFolderID=-1, $navigation=false) + { + global $user, $form, $settings; + + if ($settings->_expandFolderTree==2){ + + // folder completely open + $is_open=true; + + }else if ($settings->_expandFolderTree==1 && $folderID==$settings->_rootFolderID ){ + + $is_open=true; + + }else{ + // open the tree until the current folder + $is_open=false; + + if ($currentFolderID!=-1){ + + $currentFolder=getFolder($currentFolderID); + + if (is_object($currentFolder)){ + + $parent=$currentFolder->getParent(); + + while (is_object($parent)){ + if ($parent->getID()==$folderID){ + $is_open=true; + break; + } + $parent=$parent->getParent(); + } + } + } + } + + $folder = getFolder($folderID); + if (!is_object($folder)) return; + + $subFolders = $folder->getSubFolders(); + $subFolders = filterAccess($subFolders, $user, M_READ); + + if ($folderID == $settings->_rootFolderID) print "
    \n"; + + print "
  • \n"; + + if (count($subFolders) > 0){ + print "\n"; + } + else{ + print "\n"; + } + + if ($folder->getAccessMode($user) >= $accessMode) { + + if ($folderID != $currentFolderID){ + + if ($navigation) print ""; + else print "getName()) . "')\">"; + + }else print ""; + + if ($is_open) print "".$folder->getName(); + else print "".$folder->getName(); + + if ($folderID != $currentFolderID) print "\n"; + else print ""; + + } + else print "".$folder->getName()."\n"; + + if ($is_open) print "
      \n"; + else print "\n"; + + if ($folderID == $settings->_rootFolderID) print "
    \n"; + } + + function printTreeNavigation($folderid,$showtree){ + + global $settings; + + ?> + + "; + + if ($showtree==1){ + + print ""; + + UI::contentHeading(""); + UI::contentContainerStart(); + UI::printFoldersTree(M_READ, -1, $settings->_rootFolderID, $folderid, true); + UI::contentContainerEnd(); + + }else{ + + print ""; + + UI::contentHeading(""); + UI::contentContainerStart(); + UI::contentContainerEnd(); + } + + print ""; + } +} + +?> diff --git a/inc/inc.ClassUser.php b/inc/inc.ClassUser.php new file mode 100644 index 000000000..fc7b6cb44 --- /dev/null +++ b/inc/inc.ClassUser.php @@ -0,0 +1,705 @@ +getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) + return false; + + $users = array(); + + for ($i = 0; $i < count($resArr); $i++) + $users[$i] = new LetoDMS_User($resArr[$i]["id"], $resArr[$i]["login"], $resArr[$i]["pwd"], $resArr[$i]["fullName"], $resArr[$i]["email"], (isset($resArr["language"])?$resArr["language"]:NULL), (isset($resArr["theme"])?$resArr["theme"]:NULL), $resArr[$i]["comment"], $resArr[$i]["isAdmin"], $resArr[$i]["hidden"]); + + return $users; +} + + +function addUser($login, $pwd, $fullName, $email, $language, $theme, $comment, $isAdmin=0, $isHidden=0) { + return LetoDMS_User::addUser($login, $pwd, $fullName, $email, $language, $theme, $comment, $isAdmin, $isHidden); +} + + +/**********************************************************************\ +| User-Klasse | +\**********************************************************************/ + +class LetoDMS_User +{ + var $_id; + var $_login; + var $_pwd; + var $_fullName; + var $_email; + var $_language; + var $_theme; + var $_comment; + var $_isAdmin; + var $_isHidden; + + function LetoDMS_User($id, $login, $pwd, $fullName, $email, $language, $theme, $comment, $isAdmin, $isHidden=0) + { + $this->_id = $id; + $this->_login = $login; + $this->_pwd = $pwd; + $this->_fullName = $fullName; + $this->_email = $email; + $this->_language = $language; + $this->_theme = $theme; + $this->_comment = $comment; + $this->_isAdmin = $isAdmin; + $this->_isHidden = $isHidden; + } + + function getUser($id) { + GLOBAL $db; + + if (!is_numeric($id)) + return false; + + $queryStr = "SELECT * FROM tblUsers WHERE id = " . $id; + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) return false; + if (count($resArr) != 1) return false; + + $resArr = $resArr[0]; + + return new LetoDMS_User($resArr["id"], $resArr["login"], $resArr["pwd"], $resArr["fullName"], $resArr["email"], $resArr["language"], $resArr["theme"], $resArr["comment"], $resArr["isAdmin"], $resArr["hidden"]); + } + + function getUserByLogin($login) + { + global $db; + + $queryStr = "SELECT * FROM tblUsers WHERE login = '".$login."'"; + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) return false; + if (count($resArr) != 1) return false; + + $resArr = $resArr[0]; + + return new LetoDMS_User($resArr["id"], $resArr["login"], $resArr["pwd"], $resArr["fullName"], $resArr["email"], $resArr["language"], $resArr["theme"], $resArr["comment"], $resArr["isAdmin"], $resArr["hidden"]); + } + + function addUser($login, $pwd, $fullName, $email, $language, $theme, $comment, $isAdmin=0, $isHidden=0) { + global $db; + + if (is_object(self::getUserByLogin($login))) { + return false; + } + $queryStr = "INSERT INTO tblUsers (login, pwd, fullName, email, language, theme, comment, isAdmin, hidden) VALUES ('".$login."', '".$pwd."', '".$fullName."', '".$email."', '".$language."', '".$theme."', '".$comment."', '".$isAdmin."', '".$isHidden."')"; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + return self::getUser($db->getInsertID()); + } + + function getID() { return $this->_id; } + + function getLogin() { return $this->_login; } + + function setLogin($newLogin) + { + GLOBAL $db; + + $queryStr = "UPDATE tblUsers SET login ='" . $newLogin . "' WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_login = $newLogin; + return true; + } + + function getFullName() { return $this->_fullName; } + + function setFullName($newFullName) + { + GLOBAL $db; + + $queryStr = "UPDATE tblUsers SET fullname = '" . $newFullName . "' WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_fullName = $newFullName; + return true; + } + + function getPwd() { return $this->_pwd; } + + function setPwd($newPwd) + { + GLOBAL $db; + + $queryStr = "UPDATE tblUsers SET pwd ='" . $newPwd . "' WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_pwd = $newPwd; + return true; + } + + function getEmail() { return $this->_email; } + + function setEmail($newEmail) + { + GLOBAL $db; + + $queryStr = "UPDATE tblUsers SET email ='" . $newEmail . "' WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_email = $newEmail; + return true; + } + + function getLanguage() { return $this->_language; } + + function setLanguage($newLanguage) + { + GLOBAL $db; + + $queryStr = "UPDATE tblUsers SET language ='" . $newLanguage . "' WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_language = $newLanguage; + return true; + } + + function getTheme() { return $this->_theme; } + + function setTheme($newTheme) + { + GLOBAL $db; + + $queryStr = "UPDATE tblUsers SET theme ='" . $newTheme . "' WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_theme = $newTheme; + return true; + } + + function getComment() { return $this->_comment; } + + function setComment($newComment) + { + GLOBAL $db; + + $queryStr = "UPDATE tblUsers SET comment ='" . $newComment . "' WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_comment = $newComment; + return true; + } + + function isAdmin() { return $this->_isAdmin; } + + function setAdmin($isAdmin) + { + GLOBAL $db; + + $isAdmin = ($isAdmin) ? "1" : "0"; + $queryStr = "UPDATE tblUsers SET isAdmin = " . $isAdmin . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_isAdmin = $isAdmin; + return true; + } + + function isHidden() { return $this->_isHidden; } + + function setHidden($isHidden) + { + GLOBAL $db; + + $isHidden = ($isHidden) ? "1" : "0"; + $queryStr = "UPDATE tblUsers SET hidden = " . $isHidden . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_isHidden = $isAdmin; + return true; + } + + + + /** + * Entfernt den Benutzer aus dem System. + * Dies ist jedoch nicht mit einem Löschen des entsprechenden Eintrags aus tblUsers geschehen - vielmehr + * muss dafür gesorgt werden, dass der Benutzer nirgendwo mehr auftaucht. D.h. auch die Tabellen tblACLs, + * tblNotify, tblGroupMembers, tblFolders, tblDocuments und tblDocumentContent müssen berücksichtigt werden. + */ + function remove() { + GLOBAL $db, $settings, $user; + + if ($this->_id==$settings->_adminID) { + return false; // Cannot delete administrator. + } + + //Private Stichwortlisten löschen + $queryStr = "SELECT tblKeywords.id FROM tblKeywords, tblKeywordCategories WHERE tblKeywords.category = tblKeywordCategories.id AND tblKeywordCategories.owner = " . $this->_id; + $resultArr = $db->getResultArray($queryStr); + if (count($resultArr) > 0) { + $queryStr = "DELETE FROM tblKeywords WHERE "; + for ($i = 0; $i < count($resultArr); $i++) { + $queryStr .= "id = " . $resultArr[$i]["id"]; + if ($i + 1 < count($resultArr)) + $queryStr .= " OR "; + } + if (!$db->getResult($queryStr)) return false; + } + + $queryStr = "DELETE FROM tblKeywordCategories WHERE owner = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + //Benachrichtigungen entfernen + $queryStr = "DELETE FROM tblNotify WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + //Der Besitz von Dokumenten oder Ordnern, deren bisheriger Besitzer der zu löschende war, geht an den Admin über + $queryStr = "UPDATE tblFolders SET owner = " . $settings->_adminID . " WHERE owner = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + $queryStr = "UPDATE tblDocuments SET owner = " . $settings->_adminID . " WHERE owner = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + $queryStr = "UPDATE tblDocumentContent SET createdBy = " . $settings->_adminID . " WHERE createdBy = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + //Verweise auf Dokumente: Private löschen... + $queryStr = "DELETE FROM tblDocumentLinks WHERE userID = " . $this->_id . " AND public = 0"; + if (!$db->getResult($queryStr)) return false; + + //... und öffentliche an Admin übergeben + $queryStr = "UPDATE tblDocumentLinks SET userID = " . $settings->_adminID . " WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + // set administrator for deleted user's attachments + $queryStr = "UPDATE tblDocumentFiles SET userID = " . $settings->_adminID . " WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + //Evtl. von diesem Benutzer gelockte Dokumente werden freigegeben + $queryStr = "DELETE FROM tblDocumentLocks WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + //User aus allen Gruppen löschen + $queryStr = "DELETE FROM tblGroupMembers WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + //User aus allen ACLs streichen + $queryStr = "DELETE FROM tblACLs WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + //Eintrag aus tblUsers löschen + $queryStr = "DELETE FROM tblUserImages WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + //Eintrag aus tblUsers löschen + $queryStr = "DELETE FROM tblUsers WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + // mandatory review/approve + $queryStr = "DELETE FROM tblMandatoryReviewers WHERE reviewerUserID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + $queryStr = "DELETE FROM tblMandatoryApprovers WHERE approverUserID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + $queryStr = "DELETE FROM tblMandatoryReviewers WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + $queryStr = "DELETE FROM tblMandatoryApprovers WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + // set administrator for deleted user's events + $queryStr = "UPDATE tblEvents SET userID = " . $settings->_adminID . " WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + + + // TODO : update document status if reviewer/approver has been deleted + // "DELETE FROM tblDocumentApproveLog WHERE userID = " . $this->_id; + // "DELETE FROM tblDocumentReviewLog WHERE userID = " . $this->_id; + + + $reviewStatus = $this->getReviewStatus(); + foreach ($reviewStatus["indstatus"] as $ri) { + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $ri["reviewID"] ."', '-2', 'Reviewer removed from process', NOW(), '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + } + + $approvalStatus = $this->getApprovalStatus(); + foreach ($approvalStatus["indstatus"] as $ai) { + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $ai["approveID"] ."', '-2', 'Approver removed from process', NOW(), '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + } + +// unset($this); + return true; + } + + function joinGroup($group) + { + if ($group->isMember($this)) + return false; + + if (!$group->addUser($this)) + return false; + + unset($this->_groups); + return true; + } + + function leaveGroup($group) + { + if (!$group->isMember($this)) + return false; + + if (!$group->removeUser($this)) + return false; + + unset($this->_groups); + return true; + } + + function getGroups() { + GLOBAL $db; + + if (!isset($this->_groups)) + { + $queryStr = "SELECT `tblGroups`.*, `tblGroupMembers`.`userID` FROM `tblGroups` ". + "LEFT JOIN `tblGroupMembers` ON `tblGroups`.`id` = `tblGroupMembers`.`groupID` ". + "WHERE `tblGroupMembers`.`userID`='". $this->_id ."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + $this->_groups = array(); + foreach ($resArr as $row) { + $group = new Group($row["id"], $row["name"], $row["comment"]); + array_push($this->_groups, $group); + } + } + return $this->_groups; + } + + function isMemberOfGroup($group) + { + return $group->isMember($this); + } + + function hasImage() + { + if (!isset($this->_hasImage)) + { + GLOBAL $db; + + $queryStr = "SELECT COUNT(*) AS num FROM tblUserImages WHERE userID = " . $this->_id; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + if ($resArr[0]["num"] == 0) $this->_hasImage = false; + else $this->_hasImage = true; + } + + return $this->_hasImage; + } + + function getImageURL() + { + GLOBAL $settings; + +// if (!$this->hasImage()) +// return false; + return $settings->_httpRoot . "out/out.UserImage.php?userid=" . $this->_id; + } + + function setImage($tmpfile, $mimeType) + { + GLOBAL $db; + + $fp = fopen($tmpfile, "rb"); + if (!$fp) return false; + $content = fread($fp, filesize($tmpfile)); + fclose($fp); + + if ($this->hasImage()) + $queryStr = "UPDATE tblUserImages SET image = '".base64_encode($content)."', mimeType = '". $mimeType."' WHERE userID = " . $this->_id; + else + $queryStr = "INSERT INTO tblUserImages (userID, image, mimeType) VALUES (" . $this->_id . ", '".base64_encode($content)."', '".$mimeType."')"; + if (!$db->getResult($queryStr)) + return false; + + $this->_hasImage = true; + return true; + } + + function getReviewStatus($documentID=null, $version=null) { + GLOBAL $db; + + if (!$db->createTemporaryTable("ttreviewid")) { + return false; + } + + $status = array("indstatus"=>array(), "grpstatus"=>array()); + + // See if the user is assigned as an individual reviewer. + $queryStr = "SELECT `tblDocumentReviewers`.*, `tblDocumentReviewLog`.`status`, ". + "`tblDocumentReviewLog`.`comment`, `tblDocumentReviewLog`.`date`, ". + "`tblDocumentReviewLog`.`userID` ". + "FROM `tblDocumentReviewers` ". + "LEFT JOIN `tblDocumentReviewLog` USING (`reviewID`) ". + "LEFT JOIN `ttreviewid` on `ttreviewid`.`maxLogID` = `tblDocumentReviewLog`.`reviewLogID` ". + "WHERE `ttreviewid`.`maxLogID`=`tblDocumentReviewLog`.`reviewLogID` ". + ($documentID==null ? "" : "AND `tblDocumentReviewers`.`documentID` = '". $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentReviewers`.`version` = '". $version ."' "). + "AND `tblDocumentReviewers`.`type`='0' ". + "AND `tblDocumentReviewers`.`required`='". $this->_id ."' "; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) + $status["indstatus"][] = $res; + } + + // See if the user is the member of a group that has been assigned to + // review the document version. + $queryStr = "SELECT `tblDocumentReviewers`.*, `tblDocumentReviewLog`.`status`, ". + "`tblDocumentReviewLog`.`comment`, `tblDocumentReviewLog`.`date`, ". + "`tblDocumentReviewLog`.`userID` ". + "FROM `tblDocumentReviewers` ". + "LEFT JOIN `tblDocumentReviewLog` USING (`reviewID`) ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`groupID` = `tblDocumentReviewers`.`required` ". + "LEFT JOIN `ttreviewid` on `ttreviewid`.`maxLogID` = `tblDocumentReviewLog`.`reviewLogID` ". + "WHERE `ttreviewid`.`maxLogID`=`tblDocumentReviewLog`.`reviewLogID` ". + ($documentID==null ? "" : "AND `tblDocumentReviewers`.`documentID` = '". $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentReviewers`.`version` = '". $version ."' "). + "AND `tblDocumentReviewers`.`type`='1' ". + "AND `tblGroupMembers`.`userID`='". $this->_id ."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) + $status["grpstatus"][] = $res; + } + return $status; + } + + function getApprovalStatus($documentID=null, $version=null) { + GLOBAL $db; + + if (!$db->createTemporaryTable("ttapproveid")) { + return false; + } + + $status = array("indstatus"=>array(), "grpstatus"=>array()); + + // See if the user is assigned as an individual approver. + $queryStr = "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". + "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". + "`tblDocumentApproveLog`.`userID` ". + "FROM `tblDocumentApprovers` ". + "LEFT JOIN `tblDocumentApproveLog` USING (`approveID`) ". + "LEFT JOIN `ttapproveid` on `ttapproveid`.`maxLogID` = `tblDocumentApproveLog`.`approveLogID` ". + "WHERE `ttapproveid`.`maxLogID`=`tblDocumentApproveLog`.`approveLogID` ". + ($documentID==null ? "" : "AND `tblDocumentApprovers`.`documentID` = '". $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentApprovers`.`version` = '". $version ."' "). + "AND `tblDocumentApprovers`.`type`='0' ". + "AND `tblDocumentApprovers`.`required`='". $this->_id ."' "; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) + $status["indstatus"][] = $res; + } + + // See if the user is the member of a group that has been assigned to + // approve the document version. + $queryStr = "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". + "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". + "`tblDocumentApproveLog`.`userID` ". + "FROM `tblDocumentApprovers` ". + "LEFT JOIN `tblDocumentApproveLog` USING (`approveID`) ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`groupID` = `tblDocumentApprovers`.`required` ". + "LEFT JOIN `ttapproveid` on `ttapproveid`.`maxLogID` = `tblDocumentApproveLog`.`approveLogID` ". + "WHERE `ttapproveid`.`maxLogID`=`tblDocumentApproveLog`.`approveLogID` ". + ($documentID==null ? "" : "AND `tblDocumentApprovers`.`documentID` = '". $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentApprovers`.`version` = '". $version ."' "). + "AND `tblDocumentApprovers`.`type`='1' ". + "AND `tblGroupMembers`.`userID`='". $this->_id ."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) + $status["grpstatus"][] = $res; + } + return $status; + } + + function getDocuments() { + GLOBAL $db; + + if (!isset($this->_documents)) + { + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser` ". + "FROM `tblDocuments` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "WHERE `tblDocuments`.`owner` = " . $this->_id . " ORDER BY `sequence`"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + + $this->_documents = array(); + foreach ($resArr as $row) { + array_push($this->_documents, new Document($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], $row["lockUser"], $row["keywords"], $row["sequence"])); + } + } + return $this->_documents; + } + + function getMandatoryReviewers() + { + GLOBAL $db; + + $queryStr = "SELECT * FROM tblMandatoryReviewers WHERE userID = " . $this->_id; + $resArr = $db->getResultArray($queryStr); + + return $resArr; + } + + function getMandatoryApprovers() + { + GLOBAL $db; + + $queryStr = "SELECT * FROM tblMandatoryApprovers WHERE userID = " . $this->_id; + $resArr = $db->getResultArray($queryStr); + + return $resArr; + } + + function setMandatoryReviewer($id, $isgroup=false) + { + GLOBAL $db; + + if ($isgroup){ + + $queryStr = "SELECT * FROM tblMandatoryReviewers WHERE userID = " . $this->_id . " AND reviewerGroupID = " . $id; + $resArr = $db->getResultArray($queryStr); + if (count($resArr)!=0) return; + + $queryStr = "INSERT INTO tblMandatoryReviewers (userID, reviewerGroupID) VALUES (" . $this->_id . ", " . $id .")"; + $resArr = $db->getResult($queryStr); + if (is_bool($resArr) && !$resArr) return false; + + }else{ + + $queryStr = "SELECT * FROM tblMandatoryReviewers WHERE userID = " . $this->_id . " AND reviewerUserID = " . $id; + $resArr = $db->getResultArray($queryStr); + if (count($resArr)!=0) return; + + $queryStr = "INSERT INTO tblMandatoryReviewers (userID, reviewerUserID) VALUES (" . $this->_id . ", " . $id .")"; + $resArr = $db->getResult($queryStr); + if (is_bool($resArr) && !$resArr) return false; + } + + } + + function setMandatoryApprover($id, $isgroup=false) + { + GLOBAL $db; + + if ($isgroup){ + + $queryStr = "SELECT * FROM tblMandatoryApprovers WHERE userID = " . $this->_id . " AND approverGroupID = " . $id; + $resArr = $db->getResultArray($queryStr); + if (count($resArr)!=0) return; + + $queryStr = "INSERT INTO tblMandatoryApprovers (userID, approverGroupID) VALUES (" . $this->_id . ", " . $id .")"; + $resArr = $db->getResult($queryStr); + if (is_bool($resArr) && !$resArr) return false; + + }else{ + + $queryStr = "SELECT * FROM tblMandatoryApprovers WHERE userID = " . $this->_id . " AND approverUserID = " . $id; + $resArr = $db->getResultArray($queryStr); + if (count($resArr)!=0) return; + + $queryStr = "INSERT INTO tblMandatoryApprovers (userID, approverUserID) VALUES (" . $this->_id . ", " . $id .")"; + $resArr = $db->getResult($queryStr); + if (is_bool($resArr) && !$resArr) return false; + } + } + + function delMandatoryReviewers() + { + GLOBAL $db; + $queryStr = "DELETE FROM tblMandatoryReviewers WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + } + + function delMandatoryApprovers() + { + GLOBAL $db; + $queryStr = "DELETE FROM tblMandatoryApprovers WHERE userID = " . $this->_id; + if (!$db->getResult($queryStr)) return false; + } +} +?> diff --git a/inc/inc.DBAccess.php b/inc/inc.DBAccess.php new file mode 100644 index 000000000..c76dcf0d1 --- /dev/null +++ b/inc/inc.DBAccess.php @@ -0,0 +1,246 @@ +_ADOdbPath . "adodb.inc.php"; + +/**********************************************************************\ +| Klasse zum Datenbankzugriff | +\**********************************************************************/ + +//Zugriff erfolgt auf MySQL-Server + + +class DatabaseAccess +{ + var $_driver; + var $_hostname; + var $_database; + var $_user; + var $_passw; + var $_conn; + var $_connected; + var $_ttreviewid; + var $_ttapproveid; + var $_ttstatid; + var $_ttcontentid; + + /* + Backup functions + */ + + function TableList() + { + return $this->_conn->MetaTables("TABLES"); + } + + /** + * Konstruktor + */ + function DatabaseAccess($driver, $hostname, $user, $passw, $database = false) + { + $this->_driver = $driver; + $this->_hostname = $hostname; + $this->_database = $database; + $this->_user = $user; + $this->_passw = $passw; + $this->_connected = false; + // $tt*****id is a hack to ensure that we do not try to create the + // temporary table twice during a single connection. Can be fixed by + // using Views (MySQL 5.0 onward) instead of temporary tables. + // CREATE ... IF NOT EXISTS cannot be used because it has the + // unpleasant side-effect of performing the insert again even if the + // table already exists. + // + // See createTemporaryTable() method for implementation. + $this->_ttreviewid = false; + $this->_ttapproveid = false; + $this->_ttstatid = false; + $this->_ttcontentid = false; + } + + /** + * Baut Verbindung zur Datenquelle auf und liefert + * true bei Erfolg, andernfalls false + */ + function connect() + { + $this->_conn = ADONewConnection($this->_driver); + if ($this->_database) + $this->_conn->Connect($this->_hostname, $this->_user, $this->_passw, $this->_database); + else + $this->_conn->Connect($this->_hostname, $this->_user, $this->_passw); + + if (!$this->_conn) + return false; + + $this->_connected = true; + return true; + } + + /** + * Stellt sicher, dass eine Verbindung zur Datenquelle aufgebaut ist + * true bei Erfolg, andernfalls false + */ + function ensureConnected() + { + if (!$this->_connected) return $this->connect(); + else return true; + } + + /** + * Führt die SQL-Anweisung $queryStr aus und liefert das Ergebnis-Set als Array (d.h. $queryStr + * muss eine select-anweisung sein). + * Falls die Anfrage fehlschlägt wird false geliefert + */ + function getResultArray($queryStr) + { + $resArr = array(); + + $res = $this->_conn->Execute($queryStr); + if (!$res) { + print "
    " . $this->getErrorMsg() . "
    " . $queryStr . "
    "; + return false; + } + $resArr = $res->GetArray(); + $res->Close(); + return $resArr; + } + + /** + * Führt die SQL-Anweisung $queryStr aus (die kein ergebnis-set liefert, z.b. insert, del usw) und + * gibt das resultat zurück + */ + function getResult($queryStr, $silent=false) + { + $res = $this->_conn->Execute($queryStr); + if (!$res && !$silent) + print "
    " . $this->getErrorMsg() . "
    " . $queryStr . "
    "; + + return $res; + } + + function getInsertID() + { + return $this->_conn->Insert_ID(); + } + + function getErrorMsg() + { + return $this->_conn->ErrorMsg(); + } + + function getErrorNo() + { + return $this->_conn->ErrorNo(); + } + + function createTemporaryTable($tableName, $override=false) { + if (!strcasecmp($tableName, "ttreviewid")) { + $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (PRIMARY KEY (`reviewID`), INDEX (`maxLogID`)) ". + "SELECT `tblDocumentReviewLog`.`reviewID`, ". + "MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". + "FROM `tblDocumentReviewLog` ". + "GROUP BY `tblDocumentReviewLog`.`reviewID` ". + "ORDER BY `tblDocumentReviewLog`.`reviewLogID`"; + if (!$this->_ttreviewid) { + if (!$this->getResult($queryStr)) + return false; + $this->_ttreviewid=true; + } + else { + if (is_bool($override) && $override) { + if (!$this->getResult("DELETE FROM `ttreviewid`")) + return false; + if (!$this->getResult($queryStr)) + return false; + } + } + return $this->_ttreviewid; + } + else if (!strcasecmp($tableName, "ttapproveid")) { + $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttapproveid` (PRIMARY KEY (`approveID`), INDEX (`maxLogID`)) ". + "SELECT `tblDocumentApproveLog`.`approveID`, ". + "MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ". + "FROM `tblDocumentApproveLog` ". + "GROUP BY `tblDocumentApproveLog`.`approveID` ". + "ORDER BY `tblDocumentApproveLog`.`approveLogID`"; + if (!$this->_ttapproveid) { + if (!$this->getResult($queryStr)) + return false; + $this->_ttapproveid=true; + } + else { + if (is_bool($override) && $override) { + if (!$this->getResult("DELETE FROM `ttapproveid`")) + return false; + if (!$this->getResult($queryStr)) + return false; + } + } + return $this->_ttapproveid; + } + else if (!strcasecmp($tableName, "ttstatid")) { + $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttstatid` (PRIMARY KEY (`statusID`), INDEX (`maxLogID`)) ". + "SELECT `tblDocumentStatusLog`.`statusID`, ". + "MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ". + "FROM `tblDocumentStatusLog` ". + "GROUP BY `tblDocumentStatusLog`.`statusID` ". + "ORDER BY `tblDocumentStatusLog`.`statusLogID`"; + if (!$this->_ttstatid) { + if (!$this->getResult($queryStr)) + return false; + $this->_ttstatid=true; + } + else { + if (is_bool($override) && $override) { + if (!$this->getResult("DELETE FROM `ttstatid`")) + return false; + if (!$this->getResult($queryStr)) + return false; + } + } + return $this->_ttstatid; + } + else if (!strcasecmp($tableName, "ttcontentid")) { + $queryStr = "CREATE TEMPORARY TABLE `ttcontentid` (PRIMARY KEY (`document`), INDEX (`maxVersion`)) ". + "SELECT `tblDocumentContent`.`document`, ". + "MAX(`tblDocumentContent`.`version`) AS `maxVersion` ". + "FROM `tblDocumentContent` ". + "GROUP BY `tblDocumentContent`.`document` ". + "ORDER BY `tblDocumentContent`.`document`"; + if (!$this->_ttcontentid) { + if (!$this->getResult($queryStr)) + return false; + $this->_ttcontentid=true; + } + else { + if (is_bool($override) && $override) { + if (!$this->getResult("DELETE FROM `ttcontentid`")) + return false; + if (!$this->getResult($queryStr)) + return false; + } + } + return $this->_ttcontentid; + } + return false; + } +} + +?> diff --git a/inc/inc.DBInit.php b/inc/inc.DBInit.php new file mode 100644 index 000000000..753cd1104 --- /dev/null +++ b/inc/inc.DBInit.php @@ -0,0 +1,24 @@ +_dbDriver, $settings->_dbHostname, $settings->_dbUser, $settings->_dbPass, $settings->_dbDatabase); +$db->connect() or die ("Could not connect to db-server \"" . $settings->_dbHostname . "\""); + +?> diff --git a/inc/inc.FileUtils.php b/inc/inc.FileUtils.php new file mode 100644 index 000000000..76469ce95 --- /dev/null +++ b/inc/inc.FileUtils.php @@ -0,0 +1,175 @@ +_contentDir)); + + $mkfolder = $settings->_contentDir; + + $path = preg_split( "/[\\\\\/]/" , $path ); + + for( $i=0 ; isset( $path[$i] ) ; $i++ ) + { + if(!strlen(trim($path[$i])))continue; + $mkfolder .= $path[$i]; + + if( !is_dir( $mkfolder ) ){ + $res= @mkdir( "$mkfolder" , 0777); + if (!$res) return false; + } + $mkfolder .= DIRECTORY_SEPARATOR; + } + + return true; + +} + +function removeDir($path) +{ + $handle = @opendir($path); + while ($entry = @readdir($handle) ) + { + if ($entry == ".." || $entry == ".") + continue; + else if (is_dir($path . $entry)) + { + if (!removeDir($path . $entry . "/")) + return false; + } + else + { + if (!@unlink($path . $entry)) + return false; + } + } + @closedir($handle); + return @rmdir($path); +} + +function copyDir($sourcePath, $targetPath) +{ + if (mkdir($targetPath, 0777)) + { + $handle = @opendir($sourcePath); + while ($entry = @readdir($handle) ) + { + if ($entry == ".." || $entry == ".") + continue; + else if (is_dir($sourcePath . $entry)) + { + if (!copyDir($sourcePath . $entry . "/", $targetPath . $entry . "/")) + return false; + } + else + { + if (!@copy($sourcePath . $entry, $targetPath . $entry)) + return false; + } + } + @closedir($handle); + } + else + return false; + + return true; +} + +function moveDir($sourcePath, $targetPath) +{ + if (!copyDir($sourcePath, $targetPath)) + return false; + return removeDir($sourcePath); +} + +// code by Kioob (php.net manual) +function gzcompressfile($source,$level=false) +{ + $dest=$source.'.gz'; + $mode='wb'.$level; + $error=false; + if($fp_out=@gzopen($dest,$mode)){ + if($fp_in=@fopen($source,'rb')){ + while(!feof($fp_in)) + @gzwrite($fp_out,fread($fp_in,1024*512)); + @fclose($fp_in); + } + else $error=true; + @gzclose($fp_out); + } + else $error=true; + + if($error) return false; + else return $dest; +} + +?> diff --git a/inc/inc.Language.php b/inc/inc.Language.php new file mode 100644 index 000000000..daded790d --- /dev/null +++ b/inc/inc.Language.php @@ -0,0 +1,229 @@ +_rootDir . "languages/"; + $handle = opendir($path); + + while ($entry = readdir($handle) ) + { + if ($entry == ".." || $entry == ".") + continue; + else if (is_dir($path . $entry)) + array_push($languages, $entry); + } + closedir($handle); + + return $languages; +} + +include $settings->_rootDir . "languages/" . $settings->_language . "/lang.inc"; + + +function getMLText($key, $replace = array()) +{ + GLOBAL $settings, $text; + + if (!isset($text[$key])) + return "Error getting Text: " . $key . " (" . $settings->_language . ")"; + + $tmpText = $text[$key]; + + if (count($replace) == 0) + return $tmpText; + + $keys = array_keys($replace); + foreach ($keys as $key) + $tmpText = str_replace("[".$key."]", $replace[$key], $tmpText); + + return $tmpText; +} + +function printMLText($key, $replace = array()) +{ + print getMLText($key, $replace); +} + +function printReviewStatusText($status, $date=0) { + if (is_null($status)) { + print getMLText("status_unknown"); + } + else { + switch ($status) { + case -2: + print getMLText("status_reviewer_removed"); + break; + case -1: + print getMLText("status_reviewer_rejected").($date !=0 ? " ".$date : ""); + break; + case 0: + print getMLText("status_not_reviewed"); + break; + case 1: + print getMLText("status_reviewed").($date !=0 ? " ".$date : ""); + break; + default: + print getMLText("status_unknown"); + break; + } + } +} + +function getReviewStatusText($status, $date=0) { + if (is_null($status)) { + return getMLText("status_unknown"); + } + else { + switch ($status) { + case -2: + return getMLText("status_reviewer_removed"); + break; + case -1: + return getMLText("status_reviewer_rejected").($date !=0 ? " ".$date : ""); + break; + case 0: + return getMLText("status_not_reviewed"); + break; + case 1: + return getMLText("status_reviewed").($date !=0 ? " ".$date : ""); + break; + default: + return getMLText("status_unknown"); + break; + } + } +} + +function printApprovalStatusText($status, $date=0) { + if (is_null($status)) { + print getMLText("status_unknown"); + } + else { + switch ($status) { + case -2: + print getMLText("status_approver_removed"); + break; + case -1: + print getMLText("status_approval_rejected").($date !=0 ? " ".$date : ""); + break; + case 0: + print getMLText("status_not_approved"); + break; + case 1: + print getMLText("status_approved").($date !=0 ? " ".$date : ""); + break; + default: + print getMLText("status_unknown"); + break; + } + } +} + +function getApprovalStatusText($status, $date=0) { + if (is_null($status)) { + return getMLText("status_unknown"); + } + else { + switch ($status) { + case -2: + return getMLText("status_approver_removed"); + break; + case -1: + return getMLText("status_approval_rejected").($date !=0 ? " ".$date : ""); + break; + case 0: + return getMLText("status_not_approved"); + break; + case 1: + return getMLText("status_approved").($date !=0 ? " ".$date : ""); + break; + default: + return getMLText("status_unknown"); + break; + } + } +} + +function printOverallStatusText($status) { + if (is_null($status)) { + print getMLText("assumed_released"); + } + else { + switch($status) { + case S_DRAFT_REV: + print getMLText("draft_pending_review"); + break; + case S_DRAFT_APP: + print getMLText("draft_pending_approval"); + break; + case S_RELEASED: + print getMLText("released"); + break; + case S_REJECTED: + print getMLText("rejected"); + break; + case S_OBSOLETE: + print getMLText("obsolete"); + break; + case S_EXPIRED: + print getMLText("expired"); + break; + default: + print getMLText("status_unknown"); + break; + } + } +} + +function getOverallStatusText($status) { + if (is_null($status)) { + return getMLText("assumed_released"); + } + else { + switch($status) { + case S_DRAFT_REV: + return getMLText("draft_pending_review"); + break; + case S_DRAFT_APP: + return getMLText("draft_pending_approval"); + break; + case S_RELEASED: + return getMLText("released"); + break; + case S_REJECTED: + return getMLText("rejected"); + break; + case S_OBSOLETE: + return getMLText("obsolete"); + break; + case S_EXPIRED: + return getMLText("expired"); + break; + default: + return getMLText("status_unknown"); + break; + } + } +} +?> diff --git a/inc/inc.Settings.php b/inc/inc.Settings.php new file mode 100644 index 000000000..3db24fd20 --- /dev/null +++ b/inc/inc.Settings.php @@ -0,0 +1,29 @@ + diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php new file mode 100644 index 000000000..fc023b290 --- /dev/null +++ b/inc/inc.Utils.php @@ -0,0 +1,260 @@ +1000000000) return number_format($size_bytes/1000000000,1,".","")." GBytes"; + else if ($size_bytes>1000000) return number_format($size_bytes/1000000,1,".","")." MBytes"; + else if ($size_bytes>1000) return number_format($size_bytes/1000,1,".","")." KBytes"; + return number_format($size_bytes,0,"","")." Bytes"; +} + +function getReadableDate($timestamp) { + return date("d.m.Y", $timestamp); +} + +function getLongReadableDate($timestamp) { + return date("d/m/Y H:i", $timestamp); +} + +// +// The original string sanitizer, kept for reference. +//function sanitizeString($string) { +// $string = str_replace("'", "'", $string); +// $string = str_replace("--", "", $string); +// $string = str_replace("<", "<", $string); +// $string = str_replace(">", ">", $string); +// $string = str_replace("/*", "", $string); +// $string = str_replace("*/", "", $string); +// $string = str_replace("\"", """, $string); +// +// return $string; +//} + +function sanitizeString($string) { + + $string = (string) $string; + if (get_magic_quotes_gpc()) { + $string = stripslashes($string); + } + + $string = str_replace("\\", "\\\\", $string); + $string = str_replace("--", "\-\-", $string); + $string = str_replace(";", "\;", $string); + // Use HTML entities to represent the other characters that have special + // meaning in SQL. These can be easily converted back to ASCII / UTF-8 + // with a decode function if need be. + $string = str_replace("&", "&", $string); + $string = str_replace("%", "%", $string); // percent + $string = str_replace("\"", """, $string); // double quote + $string = str_replace("/*", "/*", $string); // start of comment + $string = str_replace("*/", "*/", $string); // end of comment + $string = str_replace("<", "<", $string); + $string = str_replace(">", ">", $string); + $string = str_replace("=", "=", $string); + $string = str_replace(")", ")", $string); + $string = str_replace("(", "(", $string); + $string = str_replace("'", "'", $string); + $string = str_replace("+", "+", $string); + + return trim($string); +} + +function mydmsDecodeString($string) { + + $string = (string)$string; + + $string = str_replace("&", "&", $string); + $string = str_replace("%", "%", $string); // percent + $string = str_replace(""", "\"", $string); // double quote + $string = str_replace("/*", "/*", $string); // start of comment + $string = str_replace("*/", "*/", $string); // end of comment + $string = str_replace("<", "<", $string); + $string = str_replace(">", ">", $string); + $string = str_replace("=", "=", $string); + $string = str_replace(")", ")", $string); + $string = str_replace("(", "(", $string); + $string = str_replace("'", "'", $string); + $string = str_replace("+", "+", $string); + + return $string; +} + +function createVersionigFile($document) +{ + global $settings; + + // if directory has been removed recreate it + if (!file_exists($settings->_contentDir . $document->getDir())) + if (!makeDir($settings->_contentDir . $document->getDir())) return false; + + $handle = fopen($settings->_contentDir . $document->getDir() .$settings-> _versioningFileName , "wb"); + + if (is_bool($handle)&&!$handle) return false; + + $tmp = mydmsDecodeString($document->getName())." (ID ".$document->getID().")\n\n"; + fwrite($handle, $tmp); + + $owner = $document->getOwner(); + $tmp = getMLText("owner")." = ".$owner->getFullName()." <".$owner->getEmail().">\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("creation_date")." = ".getLongReadableDate($document->getDate())."\n"; + fwrite($handle, $tmp); + + $latestContent = $document->getLatestContent(); + $tmp = "\n### ".getMLText("current_version")." ###\n\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("version")." = ".$latestContent->getVersion()."\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("file")." = ".$latestContent->getOriginalFileName()." (".$latestContent->getMimeType().")\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("comment")." = ". mydmsDecodeString($latestContent->getComment())."\n"; + fwrite($handle, $tmp); + + $status = $latestContent->getStatus(); + $tmp = getMLText("status")." = ".getOverallStatusText($status["status"])."\n"; + fwrite($handle, $tmp); + + $reviewStatus = $latestContent->getReviewStatus(); + $tmp = "\n### ".getMLText("reviewers")." ###\n"; + fwrite($handle, $tmp); + + foreach ($reviewStatus as $r) { + + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = getUser($r["required"]); + if (!is_object($required)) $reqName = getMLText("unknown_user")." = ".$r["required"]; + else $reqName = getMLText("user")." = ".$required->getFullName(); + break; + case 1: // Reviewer is a group. + $required = getGroup($r["required"]); + if (!is_object($required)) $reqName = getMLText("unknown_group")." = ".$r["required"]; + else $reqName = getMLText("group")." = ".$required->getName(); + break; + } + + $tmp = "\n".$reqName."\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("status")." = ".getReviewStatusText($r["status"])."\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("comment")." = ". mydmsDecodeString($r["comment"])."\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("last_update")." = ".$r["date"]."\n"; + fwrite($handle, $tmp); + + } + + + $approvalStatus = $latestContent->getApprovalStatus(); + $tmp = "\n### ".getMLText("approvers")." ###\n"; + fwrite($handle, $tmp); + + foreach ($approvalStatus as $r) { + + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = getUser($r["required"]); + if (!is_object($required)) $reqName = getMLText("unknown_user")." = ".$r["required"]; + else $reqName = getMLText("user")." = ".$required->getFullName(); + break; + case 1: // Reviewer is a group. + $required = getGroup($r["required"]); + if (!is_object($required)) $reqName = getMLText("unknown_group")." = ".$r["required"]; + else $reqName = getMLText("group")." = ".$required->getName(); + break; + } + + $tmp = "\n".$reqName."\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("status")." = ".getApprovalStatusText($r["status"])."\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("comment")." = ". mydmsDecodeString($r["comment"])."\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("last_update")." = ".$r["date"]."\n"; + fwrite($handle, $tmp); + + } + + $versions = $document->getContent(); + $tmp = "\n### ".getMLText("previous_versions")." ###\n"; + fwrite($handle, $tmp); + + for ($i = count($versions)-2; $i >= 0; $i--){ + + $version = $versions[$i]; + $status = $version->getStatus(); + + $tmp = "\n".getMLText("version")." = ".$version->getVersion()."\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("file")." = ".$version->getOriginalFileName()." (".$version->getMimeType().")\n"; + fwrite($handle, $tmp); + + $tmp = getMLText("comment")." = ". mydmsDecodeString($version->getComment())."\n"; + fwrite($handle, $tmp); + + $status = $latestContent->getStatus(); + $tmp = getMLText("status")." = ".getOverallStatusText($status["status"])."\n"; + fwrite($handle, $tmp); + + } + + fclose($handle); + return true; +} + +function add_log_line($msg="") +{ + global $settings,$user; + + if ($settings->_logFileEnable!=TRUE) return; + + if ($settings->_logFileRotation=="h") $logname=date("YmdH", time()); + else if ($settings->_logFileRotation=="d") $logname=date("Ymd", time()); + else $logname=date("Ym", time()); + + if($h = fopen($settings->_contentDir.$logname.".log", "a")) { + fwrite($h,date("Y/m/d H:i", time())." ".$user->getLogin()." (".$_SERVER['REMOTE_ADDR'].") ".basename($_SERVER["REQUEST_URI"], ".php").$msg."\n"); + fclose($h); + } +} + +function showtree() +{ + global $settings; + + if (isset($_GET["showtree"])) return $_GET["showtree"]; + else if ($settings->_expandFolderTree==0) return 0; + + return 1; +} + +?> diff --git a/inc/inc.Version.php b/inc/inc.Version.php new file mode 100644 index 000000000..8c6be9d23 --- /dev/null +++ b/inc/inc.Version.php @@ -0,0 +1,32 @@ +_string .", ". $this->_number; + } +} diff --git a/index.php b/index.php new file mode 100644 index 000000000..3630ce875 --- /dev/null +++ b/index.php @@ -0,0 +1,33 @@ +_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php")); +?> + + + LetoDMS + + + + + + + diff --git a/install.txt b/install.txt new file mode 100644 index 000000000..e40b5ca1e --- /dev/null +++ b/install.txt @@ -0,0 +1,147 @@ +NOTE: +creare il db mydms +crere utente mydms con permessi sul db +mysql -D mydms -u mydms -pmydms < create_tables.sql + +installare adodb versione 4 +modificare inc/inc.Settings.php + +------------------------------------------------------------------- + MyDMS 1.7.2 Installation Instructions +------------------------------------------------------------------- + + +1. Requirements + +MyDMS is a web-based application written in PHP. It uses the MySQL RDBMS to +manage the documents that are loaded into the application. + +Make sure you have PHP 4.0 or higher installed, and MySQL 4 or higher. MyDMS +will work with PHP running in CGI-mode as well as running as module under +apache. If you want to give your users the opportunity of uploading passport +photos you have to enable the gd-library (but the rest of MyDMS will +work without gd, too). + +You will also need to download and install the ADODB database +abstraction library from http://adodb.sf.net/ since MyDMS relies +upon it for all database connectivity. + + +2. Installation & Configuration + +Unzip the downloaded file (mydms-1.7.2.zip) in a directory that is +accessible via your web server. + +You will also need to create a directory where the uploaded files +are stored. This directory should not be accessible via your +web-server for security reasons (create it outside of your www-root +directory or put an appropriate .htaccess file in it). + +Download the ADODB package from SourceForge. The URL for the ADODB project +page is: + + http://adodb.sourceforge.net/ + +Extract the distribution into a suitable directory. For example, one can +extract the files into the MyDMS root directory. + +Next you should set up your Database. Use the included script +create_tables.sql. Since the exact procedure differs on the +different database-systems I cannot give you a detailed instruction +here. Post any questions concering this problem to the MyDMS-Forum. In +general, create the database, make sure that the database has been selected +(e.g. "USE mydms;"), then run the script. As of 1.6.0, you must make sure +that the database user has "create temporary table" privileges. + +N.B. If the create_tables.sql script fails, it may be because the database +has been configured to use InnoDB tables by default instead of MyISAM tables. +If this is the case, it will be necessary to alter the sript such that each +create table command has the text " ENGINE = MyISAM" appended to the end, +immediately prior to the semi-colon. For example: + + Before: + + CREATE TABLE `tblDocumentLocks` ( + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`document`) + ) ; + + After: + + CREATE TABLE `tblDocumentLocks` ( + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`document`) + ) ENGINE = MyISAM ; + +Now edit the configuration file. First, go to the "inc" directory and copy +(or move) "inc.Settings-sample.php" to "inc.Settings.php". Open the file and +set the variables to the correct values (you will find a short description +for each variable in the file itself). + +TIP: You can find out your root-directory by placing the following +line into a php-file: +Open it with your browser and look for "DOCUMENT_ROOT". + +When running into problems with the db-settings, read the readme-file +in the adodb-directory or post questions to the MyDMS-Forum. + +By default PHP allows only files to be uploaded that are up to 2Mb +in size. You can change this limit by editing php.ini: Search for +"upload_max_filesize" and set it to the appropriate value (you +should also change the value for "post_max_size" and make sure that +your web-server does not limit the size either). + + +3. Email Notification + +A new, re-vamped Notification system allows users to receive an email when a +document or folder is changed. This is a new, event-based mechanism that +notifies the user as soon as the change has been made and replaces the +cron mechanism originally developed. Any user that has read access to a +document or folder can subscribe to be notified of changes. Users that +have been assigned as reviewers or approvers for a document are +automatically added to the notification system for that document. + +A new page has been created for users to assist with the management of +their notification subscriptions. This can be found in the "My Account" +section under "Notification List". + + +4. Auto-conversion to HTML + +Version 1.3.0 introduces a new feature: Documents can automatically be +converted to HTML when uploading. +You can enable this feature by setting $_enableConverting (in +inc.Settings.php) to true. +You will also need to edit $_convertFileTypes (again in +inc.Settings.php). This array defines which file-types are converted +and how. +Under windows Word-, Excel- and Powerpoint-Files are automatically +converted using js-Scipts and MS-Office. I tested it with Office 2000 +and it worked just fine. +Under Linux mswordview is used to convert Word-Files by default. +Warning: Getting this feature working can be very tricky but if it +works it is a great enhancement I think. +Especially IIS could cause problems with its IIS-Guest-Account not +having enough rights to execute Word or Excel... +You will also have to edit your httpd.conf to be able to view the converted +files online. Load mod_rewrite and add to following lines to your conf: + + RewriteEngine on + RewriteCond %{REQUEST_URI} (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ + RewriteRule (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ $1op.ViewOnline.php?request=$2:$3 [PT] + +IIS Users can download the IIS Rewrite Engine for example: +http://www.qwerksoft.com/products/iisrewrite/ + +Post any questions to the MyDMS forum, please. + + +5. Nearly finished + +Now point your browser to http://your.server.com/mydms/index.php +and login with "admin" both as username and password. +After having logged in you should first choose "My Account" and +change the Administrator's password and email-address. diff --git a/js/displayFunctions.js b/js/displayFunctions.js new file mode 100644 index 000000000..9c3004863 --- /dev/null +++ b/js/displayFunctions.js @@ -0,0 +1,35 @@ +// +// Function to toggle the display of a block element in a page. +// +// There is a CSS-only mechanism to do this, but it does not work properly +// on Opera and apparently Safari. +// +function showBlock(el) { + var objEl = document.getElementById(el); + + // Find out the value of the CSS variable "display". + // Need to use this round-about method since global styles are not + // recognised when looking at an object's style class + // (i.e. objEl.style). + if (objEl.currentStyle) // IE 5 + var displayProp = objEl.currentStyle["display"]; + else if (window.getComputedStyle) { // MOZILLA + var tstyle = window.getComputedStyle(objEl, ""); + var displayProp = tstyle.getPropertyValue("display"); + } + + // Toggle the display property. + if(displayProp=="block") { + objEl.style.display="none"; + } + else { + objEl.style.display="block"; + } +} + + +function hideBlock(el) { + var objEl = document.getElementById(el); + + objEl.style.display="none"; +} diff --git a/languages/Chinese_ZH_TW/help.htm b/languages/Chinese_ZH_TW/help.htm new file mode 100644 index 000000000..b7fa69458 --- /dev/null +++ b/languages/Chinese_ZH_TW/help.htm @@ -0,0 +1,7 @@ +

    TODO

    + + + + + + diff --git a/languages/Chinese_ZH_TW/lang.inc b/languages/Chinese_ZH_TW/lang.inc new file mode 100644 index 000000000..d7e84278e --- /dev/null +++ b/languages/Chinese_ZH_TW/lang.inc @@ -0,0 +1,579 @@ +†₫¿†äÅ­Ü †¡ñ†ố„»£„¹́ˆâ»†ü󅾨ƒÇé"; +$text["confirm_rm_folder"] = "‡ó¦ˆ¬́…ꬉÖñˆ₫ç†ûÖ…ñ¾\"[foldername]\" …Æî…ൄ¹¡‡Üä…຅« …ùÄ?
    †₫¿†äÅ­Ü †¡ñ†ố„»£„¹́ˆâ»†ü󅾨ƒÇé"; +$text["confirm_rm_version"] = "†é¿‡ó¦…«Üˆªü‡º©‰Öñ†¬ö†íê \"[documentname]\" ‡Üä‡ëꆣ¼ [version] ­–
    †₫¿†äÅ­Ü †¡ñ†ố„»£„¹́ˆâ»†ü󅾨ƒÇé"; +$text["content"] = "…຅« "; +$text["continue"] = "Continue"; +$text["creating_new_default_keyword_category"] = "†û—…ó¤‰í¤…êÑ..."; +$text["creation_date"] = "…©¦‡½ï†ùц£–"; +$text["current_version"] = "‡¢«…ë́‡ëꆣ¼"; +$text["default_access"] = "‰áɈ¿¡‡Üä…¡ÿ…Åû†¿í…­Å"; +$text["default_keyword_category"] = "‰í¤…êÑ­Ü"; +$text["default_keyword_category_name"] = "…É́‡¿˜"; +$text["default_keywords"] = "…ů„©Ñ„»À‡ö¿‡Üä‰ù£‰́´…¡ù"; +$text["delete"] = "…ꬉÖñ"; +$text["delete_last_version"] = "Document has only one revision. Deleting entire document record..."; +$text["deleting_document_notify"] = "…¾¤‡̣—…ị̈‰Ç܇–Ñ„¹¡…ꬉÖñ..."; +$text["deleting_folder_notify"] = "…¾¤‡̣—…ị̈‰Ç܇–Ñ„¹¡…ꬉÖñ…à⇳á..."; +$text["details"] = "Details"; +$text["details_version"] = "Details for version: [version]"; +$text["document"] = "Document"; +$text["document_access_again"] = "‡¸¿ˆ­¯†¬ö†íê‡Üä…¡ÿ…Åû†¼è‰ÖÉ"; +$text["document_add_access"] = "†¡ú…£¿†û—…ó¤…à⇳á…ê—†¼è‰ÖɆĺ…êµˆí¿„¹¡..."; +$text["document_already_locked"] = "†¡ñ†¬ö†íê…¸™ˆó½‰Äû…«Ü"; +$text["document_del_access"] = "†¡ú…£¿…¾¤†¼è‰ÖɆĺ…êµˆí¿„¹¡…ꬉÖñ…à⇳á..."; +$text["document_edit_access"] = "†¡ú…£¿†ö ˆ«è…¡ÿ…Åû†¿í…­Å..."; +$text["document_infos"] = "†¬ö†íêˆ₫爿è"; +$text["document_is_not_locked"] = "†¡ñ†¬ö†íꆙƆ£ëˆó½‰Äû…«Ü"; +$text["document_link_by"] = "‰Çú‡´É„¦¦"; +$text["document_link_public"] = "…༉ûï"; +$text["document_list"] = "†¬ö†íê"; +$text["document_notify_again"] = "…ǻ†¼í„À«†ö ‡̣—…ị̈‰Ç܇–Ñ"; +$text["document_overview"] = "†¬ö†íê-†ªé†₫ü"; +$text["document_set_default_access"] = "†¡ú…£¿ˆ¿¡…«Ü†¬ö†íê‰áɈ¿¡‡Üä…¡ÿ…Åû†¼è‰ÖÉ..."; +$text["document_set_inherit"] = "†¡ú…£¿†¹à‰Öñ†¼è‰ÖɆĺ…êµˆí¿­î†¬ö†íꅗ燠­†ëÀ…¡ÿ…Åû†¼è‰ÖÉ..."; +$text["document_set_not_inherit_copy"] = "†¡ú…£¿ˆñçˆú»…¡ÿ…Åû†¼è‰ÖÉ..."; +$text["document_set_not_inherit_empty"] = "†¡ú…£¿†¹à‰Öñ‡ ­†ëÀ‡Üä…¡ÿ…Åû†¼è‰ÖɃÇé…̣–‡ö¿‡¨¦‡Ü䆼è‰ÖɆĺ…굈í¿..."; +$text["document_status"] = "Document Status"; +$text["document_title"] = "†¬ö†íꇫí‡Éå - †¬ö†íê [documentname]"; +$text["document_versions"] = "†ëdž£ë‡ëꆣ¼"; +$text["documents_in_process"] = "Documents In Process"; +$text["documents_owned_by_user"] = "Documents Owned by User"; +$text["documents_to_approve"] = "Documents Awaiting User's Approval"; +$text["documents_to_review"] = "Documents Awaiting User's Review"; +$text["documents_user_requiring_attention"] = "Documents Owned by User That Require Attention"; +$text["does_not_expire"] = "‰é䆙ƉüĆ£–"; +$text["does_not_inherit_access_msg"] = "„¹́†ÿ¯‡ ­†ëÀ‡Üä…¡ÿ…Åû†¼è‰ÖÉ"; +$text["download"] = "†¬ö†íꄹë"; +$text["draft_pending_approval"] = "Draft - pending approval"; +$text["draft_pending_review"] = "Draft - pending review"; +$text["edit"] = "edit"; +$text["edit_default_keyword_category"] = "‡¸¿ˆ­¯‰í¤…êÑ"; +$text["edit_default_keywords"] = "‡¸¿ˆ­¯‰ù£‰́´…¡ù"; +$text["edit_document"] = "‡¸¿ˆ­¯†¬ö†íê"; +$text["edit_document_access"] = "„À«†ö ˆ¿¬…̣ņ¼è‰ÖÉ"; +$text["edit_document_notify"] = "‡̣—…ị̈‰Ç܇–Ñ"; +$text["edit_document_props"] = "‡¸¿ˆ­¯†¬ö†íê…˜¼†Çº"; +$text["edit_document_props_again"] = "…ǻ†¼í‡¸¿ˆ­¯†¬ö†íê"; +$text["edit_existing_access"] = "‡¸¿ˆ­¯†¼è‰ÖÉ"; +$text["edit_existing_notify"] = "‡¸¿ˆ­¯‡̣—…ị̈‰Ç܇–Ñ"; +$text["edit_folder"] = "‡¸¿ˆ­¯ˆ₫ç†ûÖ…ñ¾"; +$text["edit_folder_access"] = "‡¸¿ˆ­¯…¡ÿ…Åû†¼è‰ÖÉ"; +$text["edit_folder_notify"] = "‡̣—…ị̈‰Ç܇–Ñ"; +$text["edit_folder_props"] = "‡¸¿ˆ­¯ˆ₫ç†ûÖ…ñ¾…˜¼†Çº"; +$text["edit_folder_props_again"] = "‡¸¿ˆ­¯ˆ₫ç†ûÖ…ñ¾…˜¼†Çº"; +$text["edit_group"] = "‡¸¿ˆ­¯‡¾ñ‡´ä\"[groupname]\""; +$text["edit_inherit_access"] = "‡ ­†ëÀ†Çº…¡ÿ…Åû"; +$text["edit_personal_default_keywords"] = "‡¸¿ˆ­¯…Ç¦‰ù£‰́´…¡ù"; +$text["edit_user"] = "‡¸¿ˆ­¯„»À‡ö¿ˆÇà\"[username]\""; +$text["edit_user_details"] = "Edit User Details"; +$text["editing_default_keyword_category"] = "„À«†ö ‰í¤…êÑ..."; +$text["editing_default_keywords"] = "„À«†ö ‰ù£‰́´…¡ù„¹¡..."; +$text["editing_document_props"] = "†¬ö†íꇸ¿ˆ­¯..."; +$text["editing_folder_props"] = "†¡ú…£¿‡¸¿ˆ­¯ˆ₫ç†ûÖ…ñ¾..."; +$text["editing_group"] = "‡¸¿ˆ­¯„»À‡ö¿ˆÇà‡¾ñ‡´ä..."; +$text["editing_user"] = "‡¸¿ˆ­¯„»À‡ö¿ˆÇà..."; +$text["editing_user_data"] = "‡¸¿ˆ­¯„»À‡ö¿ˆÇàˆ¿¡…«Ü..."; +$text["email"] = "‰¢©…¡É‰â´„©µ"; +$text["email_err_group"] = "Error sending email to one or more members of this group."; +$text["email_err_user"] = "Error sending email to user."; +$text["email_sent"] = "Email sent"; +$text["empty_access_list"] = "†¼è‰ÖɆÿ¯‡¨¦‡Üä"; +$text["empty_notify_list"] = "†™Æ†£ë…຅« "; +$text["error_adding_session"] = "Error occured while creating session."; +$text["error_occured"] = "‰î¯ˆ¬ñ­ü"; +$text["error_removing_old_sessions"] = "Error occured while removing old sessions"; +$text["error_updating_revision"] = "Error updating status of document revision."; +$text["exp_date"] = "‰üĆ£–†ùц£–"; +$text["expired"] = "Expired"; +$text["expires"] = "‰üĆ£–ˆ¿¡…«Ü"; +$text["file"] = "File"; +$text["file_info"] = "File Information"; +$text["file_size"] = "†¬ö†íê…ñº…—Å"; +$text["folder_access_again"] = "‡¸¿ˆ­¯ˆ₫ç†ûÖ…ñ¾‡Üä…¡ÿ…Åû†¼è‰ÖÉ"; +$text["folder_add_access"] = "…É憼è‰ÖÉ„¹¡†û—…ó¤…à⇳á..."; +$text["folder_contents"] = "Folders"; +$text["folder_del_access"] = "†¡ú…£¿…¾¤†¼è‰ÖÉ„¹¡…ꬉÖñ…à⇳á..."; +$text["folder_edit_access"] = "‡¸¿ˆ­¯…¡ÿ…Åû†¼è‰ÖÉ..."; +$text["folder_infos"] = "ˆ₫ç†ûÖ…ñ¾ˆ₫爿è"; +$text["folder_notify_again"] = "‡¸¿ˆ­¯‡̣—…ị̈‰Ç܇–Ñ"; +$text["folder_overview"] = "ˆ₫ç†ûÖ…ñ¾-†ªé†₫ü"; +$text["folder_path"] = "ˆ¸¯…¾æ"; +$text["folder_set_default_access"] = "‡é¦ˆ₫ç†ûÖ…ñ¾ˆ¿¡…«Ü‰áɈ¿¡‡Üä…¡ÿ…Åû†¿í…­Å..."; +$text["folder_set_inherit"] = "†¡ú…£¿†¹à‰Öñ†¼è‰ÖɆĺ…êµˆí¿ƒÇé…̣–‡ö¿‡ ­†ëÀ†¼è‰ÖÉ"; +$text["folder_set_not_inherit_copy"] = "ˆñçˆú»…¡ÿ…Åû†¼è‰ÖÉ…êùˆí¿..."; +$text["folder_set_not_inherit_empty"] = "†¡ú…£¿†¹à‰Öñ‡ ­†ëÀ‡Ü䆼è‰ÖɃÇé…̣–‡ö¿‡¨¦‡Ü䆼è‰ÖɆĺ…굈í¿..."; +$text["folder_title"] = "†¬ö†íꇫí‡Éå - ˆ₫ç†ûÖ…ñ¾ [foldername]"; +$text["folders_and_documents_statistic"] = "†–ч£ï†¬ö†íêˆêçˆ₫ç†ûÖ…ñ¾ˆ₫爿è"; +$text["foldertree"] = "ˆ₫ç†ûÖ…ñ¾†¿ "; +$text["from_approval_process"] = "from approval process"; +$text["from_review_process"] = "from review process"; +$text["global_default_keywords"] = "…à¿…––‰ù£‰́´…¡ù"; +$text["goto"] = "…ë́…¾Ç"; +$text["group"] = "‡¾ñ‡´ä"; +$text["group_already_approved"] = "An approval has already been submitted on behalf of group"; +$text["group_already_reviewed"] = "A review has already been submitted on behalf of group"; +$text["group_approvers"] = "Group Approvers"; +$text["group_email_sent"] = "Email sent to group members"; +$text["group_exists"] = "Group already exists."; +$text["group_management"] = "„»À‡ö¿ˆÇà‡¾ñ‡´ä"; +$text["group_members"] = "‡¾ñ‡´ä†êÉ…ôí"; +$text["group_reviewers"] = "Group Reviewers"; +$text["group_unable_to_add"] = "Unable to add group"; +$text["group_unable_to_remove"] = "Unable to remove group"; +$text["groups"] = "„»À‡ö¿ˆÇà‡¾ñ‡´ä"; +$text["guest_login"] = "„©Ñˆ¿¬…«óˆ¦½„©»‡Ö©…àÑ"; +$text["guest_login_disabled"] = "Guest login is disabled."; +$text["individual_approvers"] = "Individual Approvers"; +$text["individual_reviewers"] = "Individual Reviewers"; +$text["individuals"] = "Individuals"; +$text["inherits_access_msg"] = "ˆ«Ç…¯½†¼è‰ÖɈ󽇠­†ëÀƒÇé

    ˆñçˆú»†¼è‰ÖÉ…êùˆí¿
    „»À‡ö¿‡¨¦‡Ü䆼è‰ÖÉ…êùˆí¿"; +$text["internal_error"] = "Internal error"; +$text["internal_error_exit"] = "Internal error. Unable to complete request. Exiting."; +$text["invalid_access_mode"] = "Invalid Access Mode"; +$text["invalid_action"] = "Invalid Action"; +$text["invalid_approval_status"] = "Invalid Approval Status"; +$text["invalid_create_date_end"] = "Invalid end date for creation date range."; +$text["invalid_create_date_start"] = "Invalid start date for creation date range."; +$text["invalid_doc_id"] = "Invalid Document ID"; +$text["invalid_folder_id"] = "Invalid Folder ID"; +$text["invalid_group_id"] = "Invalid Group ID"; +$text["invalid_link_id"] = "Invalid link identifier"; +$text["invalid_review_status"] = "Invalid Review Status"; +$text["invalid_sequence"] = "Invalid sequence value"; +$text["invalid_status"] = "Invalid Document Status"; +$text["invalid_target_doc_id"] = "Invalid Target Document ID"; +$text["invalid_target_folder"] = "Invalid Target Folder ID"; +$text["invalid_user_id"] = "Invalid User ID"; +$text["invalid_version"] = "Invalid Document Version"; +$text["is_admin"] = "Administrator Privilege"; +$text["js_no_approval_group"] = "Please select a approval group"; +$text["js_no_approval_status"] = "Please select the approval status"; +$text["js_no_comment"] = "†™Æ†£ëˆ¬¬†ÿÄ"; +$text["js_no_email"] = "ˆ­¹…àÑ„»á‡Ü䉢©…¡É‰â´„©µ…£—…¥Ç"; +$text["js_no_file"] = "ˆ½ï‰ü¹†ô焹DžÇö†íê"; +$text["js_no_keywords"] = "†–ш¨ó‰ù£‰́´ˆ¨¤"; +$text["js_no_login"] = "ˆ½ïˆ­¹…àÑ…¹₫ˆÖ–‡¿˜"; +$text["js_no_name"] = "ˆ½ïˆ­¹…àÑ…É́‡¿˜"; +$text["js_no_override_status"] = "Please select the new [override] status"; +$text["js_no_pwd"] = "†é¿‰£Çˆªüˆ­¹…àц鿇Üä…¯å‡ó­"; +$text["js_no_query"] = "ˆ½ïˆ­¹…àц–ш¨ó…຅« "; +$text["js_no_review_group"] = "Please select a review group"; +$text["js_no_review_status"] = "Please select the review status"; +$text["js_pwd_not_conf"] = "…¯å‡ó­…Åè…¯å‡ó­‡ó¦ˆ¬́…຅« „¹́„¹Çˆç³"; +$text["js_select_user"] = "ˆ½ï‰ü¹†ô焹DžÇï„»À‡ö¿ˆÇà"; +$text["js_select_user_or_group"] = "ˆç₫…—æ‰ü¹†ô焹DžÇñ‡´ä†êû„»À‡ö¿ˆÇà"; +$text["keyword_exists"] = "Keyword already exists"; +$text["keywords"] = "‰ù£‰́´ˆ¨¤"; +$text["language"] = "ˆ¬¤ˆ¿Ç"; +$text["last_update"] = "†¢³†û—†ùц£–"; +$text["last_updated_by"] = "Last updated by"; +$text["latest_version"] = "Latest Version"; +$text["linked_documents"] = "‡¢¹‰ù£†¬ö†íê"; +$text["local_file"] = "†£¼…£—†¬ö†íê"; +$text["lock_document"] = "‰Äû…«Ü"; +$text["lock_message"] = "†£¼†¬ö†íê…¸™ˆó½[username]‰Äû…«ÜƒÇé
    …âà†¼è‰ÖÉ„»À‡ö¿ˆÇà…ů„©Ñ„À«†ö ‰Äû…«Ü(ˆªï‰áü…—¾)ƒÇé"; +$text["lock_status"] = "‰Äû…«Ü‡ïdžàï"; +$text["locking_document"] = "†¬ö†íê‰Äû…«Ü..."; +$text["logged_in_as"] = "‡Ö©…àÑ"; +$text["login"] = "‡Ö©…àÑ"; +$text["login_error_text"] = "Error signing in. User ID or password incorrect."; +$text["login_error_title"] = "Sign in error"; +$text["login_not_found"] = "…¹₫ˆÖ–„¹́…¡ÿ…£¿"; +$text["login_not_given"] = "No username has been supplied"; +$text["login_ok"] = "Sign in successful"; +$text["logout"] = "‡Ö©…ç¦"; +$text["mime_type"] = "Mime‰í¤…¤ï"; +$text["move"] = "Move"; +$text["move_document"] = "‡º©…ị̈†¬ö†íê"; +$text["move_folder"] = "‡º©…ị̈ˆ₫ç†ûÖ…ñ¾"; +$text["moving_document"] = "†¡ú…£¿‡º©…ị̈†¬ö†íê..."; +$text["moving_folder"] = "†¡ú…£¿‡º©…ị̈ˆ₫ç†ûÖ…ñ¾..."; +$text["msg_document_expired"] = "†¬ö†íê\"[documentname]\" (ˆ¸¯…¾æ­Ü \"[path]\") …¸™‡µô…£¿[expires]†Öé‰üĆ£–"; +$text["msg_document_updated"] = "†¬ö†íê\"[documentname]\" (ˆ¸¯…¾æ­Ü \"[path]\") †ÿ¯…£¿[updated]†Öé…©¦‡½ï†êû†¢³†û—‡Üä"; +$text["my_account"] = "†êæ‡Üä…¹₫ˆÖ–"; +$text["my_documents"] = "My Documents"; +$text["name"] = "…É́‡¿˜"; +$text["new_default_keyword_category"] = "†û—…ó¤‰í¤…êÑ"; +$text["new_default_keywords"] = "†û—…ó¤‰ù£‰́´…¡ù"; +$text["new_equals_old_state"] = "Warning: Proposed status and existing status are identical. No action required."; +$text["new_user_image"] = "†û—‡àº‡ëç"; +$text["no"] = "…ɪ"; +$text["no_action"] = "No action required"; +$text["no_action_required"] = "n/a"; +$text["no_active_user_docs"] = "There are currently no documents owned by the user that require review or approval."; +$text["no_approvers"] = "No approvers assigned."; +$text["no_default_keywords"] = "†™Æ†£ë…ů‡ö¿‡Üä‰ù£‰́´…¡ù"; +$text["no_docs_to_approve"] = "There are currently no documents that require approval."; +$text["no_docs_to_review"] = "There are currently no documents that require review."; +$text["no_document_links"] = "†™Æ†£ë‡¢¹‰ù£‡Üä‰Çú‡´É"; +$text["no_documents"] = "†™Æ†£ë†¬ö†íê"; +$text["no_group_members"] = "†¡ñ‡¾ñ‡´ä†™Æ†£ë†êÉ…ôí"; +$text["no_groups"] = "†™Æ†£ë„»À‡ö¿ˆÇà‡¾ñ‡´ä"; +$text["no_previous_versions"] = "No other versions found"; +$text["no_reviewers"] = "No reviewers assigned."; +$text["no_subfolders"] = "†™Æ†£ë…¡Éˆ₫ç†ûÖ…ñ¾"; +$text["no_update_cause_locked"] = "†é¿„¹́ˆâ»†¢³†û—†¡ñ†¬ö†íê­îˆ½ïˆêç‰Äû…«Ü„¦¦ˆü¯‡ ½ƒÇé"; +$text["no_user_image"] = "†™Æ†ë¾…ꗇງëç"; +$text["not_approver"] = "User is not currently assigned as an approver of this document revision."; +$text["not_reviewer"] = "User is not currently assigned as a reviewer of this document revision."; +$text["notify_subject"] = "†¬ö†íꇫí‡Éå‡₫©‡´˜„¹¡†£ë†û—‡Üä†êû‰üĆ£–‡Ü䆬ö†íê"; +$text["obsolete"] = "Obsolete"; +$text["old_folder"] = "old folder"; +$text["only_jpg_user_images"] = "‡àº‡ëç…Ŭ†ÄÑ…Åù .JPG(JPEG) †á­…­Å"; +$text["op_finished"] = "†êÉ…è–"; +$text["operation_not_allowed"] = "†é¿‡Ü䆼è‰ÖÉ„¹́…ñá"; +$text["override_content_status"] = "Override Status"; +$text["override_content_status_complete"] = "Override Status Complete"; +$text["override_privilege_insufficient"] = "Access denied. Privileges insufficient to override the status of this document."; +$text["overview"] = "Overview"; +$text["owner"] = "†ëdž£ë„¦¦"; +$text["password"] = "…¯å‡ó­"; +$text["pending_approval"] = "Documents pending approval"; +$text["pending_review"] = "Documents pending review"; +$text["personal_default_keywords"] = "…Ç¦‰ù£‰́´…¡ù"; +$text["previous_versions"] = "Previous Versions"; +$text["rejected"] = "Rejected"; +$text["released"] = "Released"; +$text["remove_document_link"] = "…ꬉÖñ‰Çú‡´É"; +$text["remove_member"] = "…ꬉÖñ†êÉ…ôí"; +$text["removed_approver"] = "has been removed from the list of approvers."; +$text["removed_reviewer"] = "has been removed from the list of reviewers."; +$text["removing_default_keyword_category"] = "…ꬉÖñ‰í¤…êÑ..."; +$text["removing_default_keywords"] = "…ꬉÖñ‰ù£‰́´…¡ù„¹¡..."; +$text["removing_document"] = "…ꬉÖñ†¬ö†íê..."; +$text["removing_document_link"] = "…ꬉÖñˆê燢¹‰ù£†¬ö†íê‡Üä‰Çú‡´É..."; +$text["removing_folder"] = "…ꬉÖñˆ₫ç†ûÖ…ñ¾..."; +$text["removing_group"] = "…¾¤‡₫©‡´˜„¹¡…ꬉÖñ†¡ñ‡¾ñ‡´ä..."; +$text["removing_member"] = "…¾¤‡¾ñ‡´ä„¹¡…ꬉÖñ†êÉ…ôí..."; +$text["removing_user"] = "…¾¤‡₫©‡´˜„¹¡…ꬉÖñ„»À‡ö¿ˆÇà..."; +$text["removing_version"] = "‡º©‰Öñ‡ëꆣ¼ [version] „¹¡..."; +$text["review_document"] = "Review Document"; +$text["review_document_complete"] = "Review Document: Complete"; +$text["review_document_complete_records_updated"] = "Document review completed and records updated"; +$text["review_group"] = "Review Group"; +$text["review_status"] = "Review Status"; +$text["review_summary"] = "Review Summary"; +$text["review_update_failed"] = "Error updating review status. Update failed."; +$text["reviewer_added"] = "added as a reviewer"; +$text["reviewer_already_assigned"] = "is already assigned as a reviewer"; +$text["reviewer_already_removed"] = "has already been removed from review process or has already submitted a review"; +$text["reviewer_no_privilege"] = "is not sufficiently privileged to review this document"; +$text["reviewer_removed"] = "removed from review process"; +$text["reviewers"] = "Reviewers"; +$text["rm_default_keyword_category"] = "…ꬉÖñˆ¨™‰í¤…êÑ"; +$text["rm_default_keywords"] = "…ꬉÖñ‰ù£‰́´…¡ù"; +$text["rm_document"] = "…ꬉÖñ†¬ö†íê"; +$text["rm_folder"] = "…ꬉÖñˆ₫ç†ûÖ…ñ¾"; +$text["rm_group"] = "…ꬉÖñ†¡ñ‡¾ñ‡´ä"; +$text["rm_user"] = "…ꬉÖñ†¡ñ„»À‡ö¿ˆÇà"; +$text["rm_version"] = "‡º©‰Öñ‡ëꆣ¼"; +$text["root_folder"] = "†á ˆ₫ç†ûÖ…ñ¾"; +$text["save"] = "…ä™…¡ÿ"; +$text["search"] = "†É£‡³ó"; +$text["search_in"] = "†É£…—䅣́"; +$text["search_in_all"] = "†ëdž£ëˆ₫ç†ûÖ…ñ¾"; +$text["search_in_current"] = "…Ŭ†£ë([foldername]) …îà…ɽ…¡Éˆ₫ç†ûÖ…ñ¾"; +$text["search_mode"] = "†É£…—텭Å"; +$text["search_mode_and"] = "†ëdž£ë‡Ü䈨¤"; +$text["search_mode_or"] = "ˆç₫…—憣넹DžÇ¤"; +$text["search_no_results"] = "†™Æ†£ë†¬ö†íꇼª…Éꆖш¨ó†ó¥„©µƒÇé"; +$text["search_query"] = "†É£…—ï"; +$text["search_report"] = "†£ë [count] …Çö†íꇼª…Éꆖш¨ó†ó¥„©µ\ƒÇé"; +$text["search_result_pending_approval"] = "status 'pending approval'"; +$text["search_result_pending_review"] = "status 'pending review'"; +$text["search_results"] = "†É£‡³ó‡´É†¤£"; +$text["search_results_access_filtered"] = "Search results may contain content to which access has been denied."; +$text["search_time"] = "†–ш¨óˆÇù†Öé­Ü [time] ‡ºÆƒÇé"; +$text["select_one"] = "ˆ½ï‰ü¹…ൄ¹Ç"; +$text["selected_document"] = "‰ü¹†ôç‡Ü䆬ö†íê"; +$text["selected_folder"] = "‰ü¹†ôç‡Üäˆ₫ç†ûÖ…ñ¾"; +$text["selection"] = "Selection"; +$text["seq_after"] = "…£¿\"[prevname]\"„ ï…¾î"; +$text["seq_end"] = "†£Ç…¾î„¹Ç…Çï"; +$text["seq_keep"] = "‡¢«…ë́„»́‡»«"; +$text["seq_start"] = "‡¼¼„¹Ç…Çï"; +$text["sequence"] = "…èá…àщáå…¦Å"; +$text["set_default_access"] = "Set Default Access Mode"; +$text["set_expiry"] = "Set Expiry"; +$text["set_owner"] = "ˆ¿¡…«Ü†ëdž£ë„¦¦"; +$text["set_reviewers_approvers"] = "Assign Reviewers and Approvers"; +$text["setting_expires"] = "ˆ¿¡…«Ü‰Ç¾†Öé..."; +$text["setting_owner"] = "ˆ¿¡…«Ü†ëdž£ë„¦¦..."; +$text["setting_user_image"] = "
    ‡é¦„»À‡ö¿ˆÇàˆ¿¡…«Ü‡àº‡ëç..."; +$text["show_all_versions"] = "Show All Revisions"; +$text["show_current_versions"] = "Show Current"; +$text["start"] = "‰ûï…ºï"; +$text["status"] = "Status"; +$text["status_approval_rejected"] = "Draft rejected"; +$text["status_approved"] = "Approved"; +$text["status_approver_removed"] = "Approver removed from process"; +$text["status_change_summary"] = "Document revision changed from status '[oldstatus]' to status '[newstatus]'."; +$text["status_changed_by"] = "Status changed by"; +$text["status_not_approved"] = "Not approved"; +$text["status_not_reviewed"] = "Not reviewed"; +$text["status_reviewed"] = "Reviewed"; +$text["status_reviewer_rejected"] = "Draft rejected"; +$text["status_reviewer_removed"] = "Reviewer removed from process"; +$text["status_unknown"] = "Unknown"; +$text["subfolder_list"] = "…¡Éˆ₫ç†ûÖ…ñ¾"; +$text["submit_approval"] = "Submit approval"; +$text["submit_login"] = "Sign in"; +$text["submit_review"] = "Submit review"; +$text["theme"] = "„»ê†Ö¯"; +$text["unable_to_add"] = "Unable to add"; +$text["unable_to_remove"] = "Unable to remove"; +$text["under_folder"] = "…£¿ˆ₫ç†ûÖ…ñ¾ˆúí"; +$text["unknown_command"] = "Command not recognized."; +$text["unknown_group"] = "Unknown group id"; +$text["unknown_keyword_category"] = "Unknown category"; +$text["unknown_owner"] = "Unknown owner id"; +$text["unknown_user"] = "Unknown user id"; +$text["unlock_cause_access_mode_all"] = "…¢á‡é¦†é¿†£ë…¡ÿ…Åû†¼è‰ÖÉ\"all\"­î†é¿„©́‡äµ…ů„©Ñ†¢³†û—ƒÇ醢³†û—…¾î‰Äû…«Ü…—çˆç¬…ị̈ˆºú‰ÖñƒÇé"; +$text["unlock_cause_locking_user"] = "…¢á‡é¦†é¿„ –†ÿ¯‰Äû…«Ü„¦¦„ ï„¹Ç­î†é¿„©́‡äµ…ů„©Ñ†¢³†û—ƒÇ醢³†û—…¾î‰Äû…«Ü…—çˆç¬…ị̈ˆºú‰ÖñƒÇé"; +$text["unlock_document"] = "†£¬‰Äû…«Ü"; +$text["unlocking_denied"] = "†é¿‡Ü䆼è‰ÖÉ„¹́ˆµ₫„©Ñˆºú‰Äû†¬ö†íê"; +$text["unlocking_document"] = "†¬ö†íꈺú‰Äû..."; +$text["update"] = "Update"; +$text["update_approvers"] = "Update List of Approvers"; +$text["update_document"] = "†¢³†û—"; +$text["update_info"] = "Update Information"; +$text["update_locked_msg"] = "†¡ñ†¬ö†íêˆỌ̈†û­‰Äû…«Ü‡ïdžàïƒÇé"; +$text["update_reviewers"] = "Update List of Reviewers"; +$text["update_reviewers_approvers"] = "Update List of Reviewers and Approvers"; +$text["updated_by"] = "Updated by"; +$text["updating_document"] = "†¬ö†íꆢ³†û—..."; +$text["upload_date"] = "„¹è…é₫†ùц£–"; +$text["uploaded"] = "Uploaded"; +$text["uploaded_by"] = "†¬ö†íê†ÅÉ„¾¢ˆÇà"; +$text["uploading_failed"] = "„¹è…é₫…ñ˜†̣ù­îˆ½ïˆê燫í‡Éå…ôíˆü¯‡ ½ƒÇé"; +$text["use_default_keywords"] = "„»À‡ö¿‰áÉ…àꅫ܇¾¨‡Üä‰ù£‰́´…¡ù"; +$text["user"] = "„»À‡ö¿ˆÇà"; +$text["user_already_approved"] = "User has already submitted an approval of this document version"; +$text["user_already_reviewed"] = "User has already submitted a review of this document version"; +$text["user_approval_not_required"] = "No document approval required of user at this time."; +$text["user_exists"] = "User already exists."; +$text["user_image"] = "‡àº‡ëç"; +$text["user_info"] = "User Information"; +$text["user_list"] = "„»À‡ö¿ˆÇà…êùˆí¿"; +$text["user_login"] = "…¹₫ˆÖ–"; +$text["user_management"] = "„»À‡ö¿ˆÇà"; +$text["user_name"] = "…à¿…É́"; +$text["user_removed_approver"] = "User has been removed from the list of individual approvers."; +$text["user_removed_reviewer"] = "User has been removed from the list of individual reviewers."; +$text["user_review_not_required"] = "No document review required of user at this time."; +$text["users"] = "„»À‡ö¿ˆÇà"; +$text["version"] = "‡ëꆣ¼"; +$text["version_info"] = "Version Information"; +$text["version_under_approval"] = "Version under approval"; +$text["version_under_review"] = "Version under review"; +$text["view_document"] = "View Document"; +$text["view_online"] = "‡¸Ü„¹è‡Çňª»"; +$text["warning"] = "Warning"; +$text["wrong_pwd"] = "…¯å‡ó­‰î¯ˆ¬ñ­îˆ½ï‰ḉˆ¨ªƒÇé"; +$text["yes"] = "†ÿ¯"; +$text["already_subscribed"] = "Target is already subscribed."; +// New as of 1.7.1. Require updated translation. +$text["documents"] = "Documents"; +$text["folders"] = "Folders"; +$text["no_folders"] = "No folders"; +$text["notification_summary"] = "Notification Summary"; +// New as of 1.7.2 +$text["all_pages"] = "All"; +$text["results_page"] = "Results Page"; +// New +$text["sign_out"] = "sign out"; +$text["signed_in_as"] = "Signed in as"; +$text["assign_reviewers"] = "Assign Reviewers"; +$text["assign_approvers"] = "Assign Approvers"; +$text["override_status"] = "Override Status"; +$text["change_status"] = "Change Status"; +$text["change_assignments"] = "Change Assignments"; +$text["no_user_docs"] = "There are currently no documents owned by the user"; +$text["disclaimer"] = "This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the english and international laws."; + +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archive creation"; +$text["files_deletion"] = "Files deletion"; +$text["folder"] = "Folder"; + +$text["unknown_id"] = "unknown id"; +$text["help"] = "Help"; + +$text["versioning_info"] = "Versioning info"; +$text["versioning_file_creation_warning"] = "With this operation you can create a file containing the versioning information of an entire DMS folder. After the creation every file will be saved inside the document folder."; +$text["archive_creation_warning"] = "With this operation you can create achive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup."; +$text["files_deletion_warning"] = "With this option you can delete all files of entire DMS folders. The versioning information will remain visible."; + +$text["backup_list"] = "Existings backup list"; +$text["backup_remove"] = "Remove backup file"; +$text["confirm_rm_backup"] = "Do you really want to remove the file \"[arkname]\"?
    Be careful: This action cannot be undone."; + +$text["document_deleted"] = "Document deleted"; +$text["linked_files"] = "Attachments"; +$text["invalid_file_id"] = "Invalid file ID"; +$text["rm_file"] = "Remove file"; +$text["confirm_rm_file"] = "Do you really want to remove file \"[name]\" of document \"[documentname]\"?
    Be careful: This action cannot be undone."; + +$text["edit_comment"] = "Edit comment"; + +// new from 1.9 + +$text["is_hidden"] = "Hide from users list"; +$text["log_management"] = "Log files management"; +$text["confirm_rm_log"] = "Do you really want to remove log file \"[logname]\"?
    Be careful: This action cannot be undone."; +$text["include_subdirectories"] = "Include subdirectories"; +$text["include_documents"] = "Include documents"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Toggle manager"; + +// new from 2.0 + +$text["calendar"] = "Calendar"; +$text["week_view"] = "Week view"; +$text["month_view"] = "Month view"; +$text["year_view"] = "Year View"; +$text["add_event"] = "Add event"; +$text["edit_event"] = "Edit event"; + +$text["january"] = "January"; +$text["february"] = "February"; +$text["march"] = "March"; +$text["april"] = "April"; +$text["may"] = "May"; +$text["june"] = "June"; +$text["july"] = "July"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "October"; +$text["november"] = "November"; +$text["december"] = "December"; + +$text["sunday"] = "Sunday"; +$text["monday"] = "Monday"; +$text["tuesday"] = "Tuesday"; +$text["wednesday"] = "Wednesday"; +$text["thursday"] = "Thursday"; +$text["friday"] = "Friday"; +$text["saturday"] = "Saturday"; + +$text["from"] = "From"; +$text["to"] = "To"; + +$text["event_details"] = "Event details"; +$text["confirm_rm_event"] = "Do you really want to remove event \"[name]\"?
    Be careful: This action cannot be undone."; + +$text["dump_creation"] = "DB dump creation"; +$text["dump_creation_warning"] = "With this operation you can create a dump file of your database content. After the creation the dump file will be saved in the data folder of your server."; +$text["dump_list"] = "Existings dump files"; +$text["dump_remove"] = "Remove dump file"; +$text["confirm_rm_dump"] = "Do you really want to remove the file \"[dumpname]\"?
    Be careful: This action cannot be undone."; + +$text["confirm_rm_user"] = "Do you really want to remove the user \"[username]\"?
    Be careful: This action cannot be undone."; +$text["confirm_rm_group"] = "Do you really want to remove the group \"[groupname]\"?
    Be careful: This action cannot be undone."; + +$text["human_readable"] = "Human readable archive"; + +$text["email_header"] = "This is an automatic message from the DMS server."; +$text["email_footer"] = "You can always change your e-mail settings using 'My Account' functions"; + +$text["add_multiple_files"] = "Add multiple files (will use filename as document name)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Maximum upload size for each file"; + +?> diff --git a/languages/Czech/help.htm b/languages/Czech/help.htm new file mode 100644 index 000000000..b7fa69458 --- /dev/null +++ b/languages/Czech/help.htm @@ -0,0 +1,7 @@ +

    TODO

    + + + + + + diff --git a/languages/Czech/lang.inc b/languages/Czech/lang.inc new file mode 100644 index 000000000..b533ec278 --- /dev/null +++ b/languages/Czech/lang.inc @@ -0,0 +1,575 @@ +BuÄte opatrnĂ­: Tuto Äinnost nenĂ­ možnĂ© vrĂ¡tit zpÄ›t."; +$text["confirm_rm_folder"] = "SkuteÄnÄ› chcete odstranit \"[foldername]\" a jeho obsah?
    BuÄte opatrnĂ­: Tuto Äinnost nenĂ© možnĂ© vrĂ¡tit zpÄ›t."; +$text["confirm_rm_version"] = "SkuteÄnÄ› chcete odstranit verzi [version] dokumentu \"[documentname]\"?
    BuÄte opatrnĂ­: Tuto Äinnost nenĂ­ možnĂ© vrĂ¡tit zpÄ›t."; +$text["content"] = "Obsah"; +$text["continue"] = "PokraÄovat"; +$text["creating_new_default_keyword_category"] = "PÅ™idĂ¡vĂ¡ se kategorie..."; +$text["creation_date"] = "VytvoÅ™eno"; +$text["current_version"] = "AktuĂ¡lnĂ­ verze"; +$text["default_access"] = "StandardnĂ­ režim pÅ™Ă­stupu"; +$text["default_keyword_category"] = "Kategorie"; +$text["default_keyword_category_name"] = "NĂ¡zev"; +$text["default_keywords"] = "DostupnĂ¡ klĂ­ÄovĂ¡ slova"; +$text["delete"] = "Smazat"; +$text["delete_last_version"] = "Dokument mĂ¡ pouze jednu revizi. Maže se celĂ½ zĂ¡znam dokumentu..."; +$text["deleting_document_notify"] = "Odstraňuje se prvek ze seznamu upozornÄ›nĂ­..."; +$text["deleting_folder_notify"] = "Odstraňuje se prvek ze seznamu upozornÄ›nĂ­..."; +$text["details"] = "Podrobnosti"; +$text["details_version"] = "Podrobnosti verze: [version]"; +$text["document"] = "Dokument"; +$text["document_access_again"] = "Znova upravit pÅ™Ă­stup k dokumentu"; +$text["document_add_access"] = "PÅ™idĂ¡vĂ¡ se prvek do seznamu Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["document_already_locked"] = "Tento dokument je už zamÄenĂ½"; +$text["document_del_access"] = "Odstraňuje se prvek ze seznamu Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["document_edit_access"] = "MÄ›nĂ­ se režim pÅ™Ă­stupu..."; +$text["document_infos"] = "Informace o dokumentu"; +$text["document_is_not_locked"] = "Tento dokument nenĂ­ zamÄenĂ½"; +$text["document_link_by"] = "Odkazuje sem"; +$text["document_link_public"] = "VeÅ™ejnĂ½"; +$text["document_list"] = "Dokumenty"; +$text["document_notify_again"] = "Znova upravit seznam upozornÄ›nĂ­"; +$text["document_overview"] = "PÅ™ehled dokumentu"; +$text["document_set_default_access"] = "Nastavuje se standardnĂ­ pÅ™Ă­stup k dokumentu..."; +$text["document_set_inherit"] = "Odstraňuje se seznam Å™Ă­zenĂ­ pÅ™Ă­stupu. Dokument bude pÅ™Ă­stup dÄ›dit..."; +$text["document_set_not_inherit_copy"] = "KopĂ­ruje se seznam Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["document_set_not_inherit_empty"] = "Odstraňuje se zdÄ›dÄ›nĂ½ pÅ™Ă­stup. ZaklĂ¡dĂ¡ se novĂ½ seznam Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["document_status"] = "Stav dokumentu"; +$text["document_title"] = "Dokument '[documentname]'"; +$text["document_versions"] = "VÅ¡echny verze"; +$text["documents_in_process"] = "Dokumenty ve zpracovĂ¡nĂ­"; +$text["documents_owned_by_user"] = "Dokumenty tohoto uživatele"; +$text["documents_to_approve"] = "Dokumenty ÄekajĂ­cĂ­ na schvĂ¡lenĂ­ uživatele"; +$text["documents_to_review"] = "Dokumenty ÄekajĂ­cĂ­ na kontrolu uživatele"; +$text["documents_user_requiring_attention"] = "Dokumenty, kterĂ© uživatel vlastnĂ­ a vyžadujĂ­ pozornost"; +$text["does_not_expire"] = "Platnost nikdy nevyprÅ¡Ă­"; +$text["does_not_inherit_access_msg"] = "ZdÄ›dit pÅ™Ă­stup"; +$text["download"] = "StĂ¡hnout"; +$text["draft_pending_approval"] = "NĂ¡vrh - ÄekĂ¡ na schvĂ¡lenĂ­"; +$text["draft_pending_review"] = "NĂ¡vrh - ÄekĂ¡ na kontrolu"; +$text["edit"] = "upravit"; +$text["edit_default_keyword_category"] = "Upravit kategorie"; +$text["edit_default_keywords"] = "Upravit klĂ­ÄovĂ¡ slova"; +$text["edit_document"] = "Upravit dokument"; +$text["edit_document_access"] = "Upravit pÅ™Ă­stup"; +$text["edit_document_notify"] = "Seznam upozornÄ›nĂ­"; +$text["edit_document_props"] = "Upravit dokument"; +$text["edit_document_props_again"] = "Znova upravit dokument"; +$text["edit_existing_access"] = "Upravit seznam Å™Ă­zenĂ­ pÅ™Ă­stupu"; +$text["edit_existing_notify"] = "Upravit seznam upozornÄ›nĂ­"; +$text["edit_folder"] = "Upravit adresĂ¡Å™"; +$text["edit_folder_access"] = "Upravit pÅ™Ă­stup"; +$text["edit_folder_notify"] = "Seznam upozornÄ›nĂ­"; +$text["edit_folder_props"] = "Upravit adresĂ¡Å™"; +$text["edit_folder_props_again"] = "Znova upravit adresĂ¡Å™"; +$text["edit_group"] = "Upravit skupinu"; +$text["edit_inherit_access"] = "ZdÄ›dit pÅ™Ă­stup"; +$text["edit_personal_default_keywords"] = "Upravit osobnĂ­ klĂ­ÄovĂ¡ slova"; +$text["edit_user"] = "Upravit uživatele"; +$text["edit_user_details"] = "Upravit podrobnosti uživatele"; +$text["editing_default_keyword_category"] = "MÄ›nĂ­ se kategorie..."; +$text["editing_default_keywords"] = "MÄ›nĂ­ se klĂ­ÄovĂ¡ slova..."; +$text["editing_document_props"] = "Upravuje se dokument..."; +$text["editing_folder_props"] = "Upravuje se adresĂ¡Å™..."; +$text["editing_group"] = "Upravuje se skupina..."; +$text["editing_user"] = "Upravuje se uživatel..."; +$text["editing_user_data"] = "UpravujĂ­ se nastavenĂ­ uživatele..."; +$text["email"] = "Email"; +$text["email_err_group"] = "Chyba pÅ™i posĂ­lĂ¡nĂ­ emailu jednĂ©mu nebo vĂ­ce Älenům tĂ©to skupiny."; +$text["email_err_user"] = "Chyba pÅ™i posĂ­lĂ¡nĂ­ emailu uživateli."; +$text["email_sent"] = "Email odeslĂ¡n"; +$text["empty_access_list"] = "Seznam Å™Ă­zenĂ­ pÅ™Ă­stupu je prĂ¡zdnĂ½"; +$text["empty_notify_list"] = "Å½Ă¡dnĂ© položky"; +$text["error_adding_session"] = "PÅ™i vytvĂ¡Å™enĂ­ relace se vyskytla chyba."; +$text["error_occured"] = "Vyskytla se chyba"; +$text["error_removing_old_sessions"] = "Vyskytla se chyba pÅ™i odstraňovĂ¡nĂ­ starĂ½ch relacĂ­"; +$text["error_updating_revision"] = "Chyba pÅ™i aktualizaci stavu revize dokumentu."; +$text["exp_date"] = "Platnost vyprÅ¡Ă­"; +$text["expired"] = "Platnost vyprÅ¡ela"; +$text["expires"] = "Platnost vyprÅ¡Ă­"; +$text["file"] = "Soubor"; +$text["file_info"] = "Informace o souboru"; +$text["file_size"] = "Velikost souboru"; +$text["folder_access_again"] = "Znova upravit pÅ™Ă­stup k adresĂ¡Å™i"; +$text["folder_add_access"] = "PÅ™idĂ¡vĂ¡ se prvek do seznamu Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["folder_contents"] = "AdresĂ¡Å™e"; +$text["folder_del_access"] = "Odstraňuje se prvek ze seznamu Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["folder_edit_access"] = "Upravuje se pÅ™Ă­stup..."; +$text["folder_infos"] = "Informace o adresĂ¡Å™i"; +$text["folder_notify_again"] = "Znova upravit seznam upozornÄ›nĂ­"; +$text["folder_overview"] = "PÅ™ehled adresĂ¡Å™e"; +$text["folder_path"] = "Cesta"; +$text["folder_set_default_access"] = "nastavuje se standardnĂ­ režim pÅ™Ă­stupu k adresĂ¡Å™i..."; +$text["folder_set_inherit"] = "Odstraňuje se seznam Å™Ă­zenĂ­ pÅ™Ă­stupu. AdresĂ¡Å™ zdÄ›dĂ­ Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["folder_set_not_inherit_copy"] = "KopĂ­ruje se seznam Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["folder_set_not_inherit_empty"] = "Odstraňuje se zdÄ›dÄ›nĂ½ pÅ™Ă­stup. ZaklĂ¡dĂ¡ se novĂ½ seznam Å™Ă­zenĂ­ pÅ™Ă­stupu..."; +$text["folder_title"] = "AdresĂ¡Å™ '[foldername]'"; +$text["folders_and_documents_statistic"] = "PÅ™ehled adresĂ¡Å™Å¯ a dokumentů"; +$text["foldertree"] = "Strom adresĂ¡Å™Å¯"; +$text["from_approval_process"] = "z procesu schvalovĂ¡nĂ­"; +$text["from_review_process"] = "z procesu kontroly"; +$text["global_default_keywords"] = "GlobĂ¡lnĂ­ klĂ­ÄovĂ¡ slova"; +$text["goto"] = "PÅ™ejĂ­t na"; +$text["group"] = "Skupina"; +$text["group_already_approved"] = "Ve jmĂ©nu skupiny už bylo odeslĂ¡no schvĂ¡lenĂ­"; +$text["group_already_reviewed"] = "Ve jmĂ©nu skupiny už byla odoslĂ¡na kontrola"; +$text["group_approvers"] = "SchvalovatelĂ© skupiny"; +$text["group_email_sent"] = "Email odeslĂ¡n Älenům skupiny"; +$text["group_exists"] = "Skupina už existuje."; +$text["group_management"] = "Skupiny"; +$text["group_members"] = "ÄŒlenovĂ© skupiny"; +$text["group_reviewers"] = "KontroloÅ™i skupiny"; +$text["group_unable_to_add"] = "Nebylo možnĂ© pÅ™idat skupinu"; +$text["group_unable_to_remove"] = "Nebylo možnĂ© odstranit skupinu"; +$text["groups"] = "Skupiny"; +$text["guest_login"] = "PÅ™ihlĂ¡sit se jako host"; +$text["guest_login_disabled"] = "PÅ™ihlĂ¡Å¡enĂ­ jako host je vypnutĂ©."; +$text["individual_approvers"] = "JednotlivĂ­ schvalovatelĂ©"; +$text["individual_reviewers"] = "JednotlivĂ­ kontroloÅ™i"; +$text["individuals"] = "Jednotlivci"; +$text["inherits_access_msg"] = "PÅ™Ă­stup se dÄ›dĂ­.

    ZkopĂ­rovat zdÄ›dÄ›nĂ½ seznam Å™Ă­zenĂ­ pÅ™Ă­stupu
    Založit novĂ½ seznam Å™Ă­zenĂ­ pÅ™Ă­stupu"; +$text["internal_error"] = "VnitÅ™nĂ­ chyba"; +$text["internal_error_exit"] = "VnitÅ™nĂ­ chyba. Nebylo možnĂ© dokonÄit požadavek. UkonÄuje se."; +$text["invalid_access_mode"] = "NeplatnĂ½ režim pÅ™Ă­stupu"; +$text["invalid_action"] = "NeplatnĂ¡ Äinnost"; +$text["invalid_approval_status"] = "NeplatnĂ½ stav schvĂ¡lenĂ­"; +$text["invalid_create_date_end"] = "NeplatnĂ© koncovĂ© datum vytvoÅ™enĂ­."; +$text["invalid_create_date_start"] = "NeplatnĂ© poÄĂ¡teÄnĂ­ datum vytvoÅ™enĂ­."; +$text["invalid_doc_id"] = "NeplatnĂ½ ID dokumentu"; +$text["invalid_folder_id"] = "NeplatnĂ© ID adresĂ¡Å™e"; +$text["invalid_group_id"] = "NeplatnĂ© ID skupiny"; +$text["invalid_link_id"] = "NeplatnĂ© ID odkazu"; +$text["invalid_review_status"] = "NeplatnĂ½ stav kontroly"; +$text["invalid_sequence"] = "NeplatnĂ¡ hodnota posloupnosti"; +$text["invalid_status"] = "NeplatnĂ½ stav dokumentu"; +$text["invalid_target_doc_id"] = "NeplatnĂ© cĂ­lovĂ© ID dokumentu"; +$text["invalid_target_folder"] = "NeplatnĂ© cĂ­lovĂ© ID adresĂ¡Å™e"; +$text["invalid_user_id"] = "NeplatnĂ© ID uživatele"; +$text["invalid_version"] = "NeplatnĂ¡ verze dokumentu"; +$text["is_admin"] = "OprĂ¡vnÄ›nĂ­ sprĂ¡vce"; +$text["js_no_approval_group"] = "ProsĂ­m, vyberte skupinu pro schvĂ¡lenĂ­"; +$text["js_no_approval_status"] = "ProsĂ­m, vyberte stav schvĂ¡lenĂ­"; +$text["js_no_comment"] = "Å½Ă¡dnĂ½ komentĂ¡Å™"; +$text["js_no_email"] = "NapiÅ¡te svou emailovou adresu"; +$text["js_no_file"] = "ProsĂ­m, vyberte soubor"; +$text["js_no_keywords"] = "Zadejte nÄ›jakĂ¡ klĂ­ÄovĂ¡ slova"; +$text["js_no_login"] = "ProsĂ­m, napiÅ¡te jmĂ©no uživatele"; +$text["js_no_name"] = "ProsĂ­m, napiÅ¡te jmĂ©no"; +$text["js_no_override_status"] = "ProsĂ­m, vyberte novĂ½ stav [pÅ™epĂ­Å¡e se]"; +$text["js_no_pwd"] = "Budete muset napsat svĂ© heslo"; +$text["js_no_query"] = "NapiÅ¡te požadavek"; +$text["js_no_review_group"] = "ProsĂ­m, vyberte skupinu pro kontrolu"; +$text["js_no_review_status"] = "ProsĂ­m, vyberte stav kontroly"; +$text["js_pwd_not_conf"] = "Heslo a potvrzenĂ­ hesla se neshodujĂ­"; +$text["js_select_user"] = "ProsĂ­m, vyberte uživatele"; +$text["js_select_user_or_group"] = "Vyberte aspoň uživatele nebo skupinu"; +$text["keyword_exists"] = "KlĂ­ÄovĂ© slovo už existuje"; +$text["keywords"] = "KlĂ­ÄovĂ¡ slova"; +$text["language"] = "Jazyk"; +$text["last_update"] = "PoslednĂ­ aktualizace"; +$text["last_updated_by"] = "Naposledy aktualizoval"; +$text["latest_version"] = "PoslednĂ­ verze"; +$text["linked_documents"] = "SouvisejĂ­cĂ­ dokumenty"; +$text["local_file"] = "LokĂ¡lnĂ­ soubor"; +$text["lock_document"] = "Zamknout"; +$text["lock_message"] = "Tento dokument zamknul [username].
    Pouze oprĂ¡vnÄ›nĂ­ uživatelĂ© ho mohou odemknout (viz konec strĂ¡nky)."; +$text["lock_status"] = "Stav"; +$text["locking_document"] = "ZamykĂ¡ se dokument..."; +$text["logged_in_as"] = "PÅ™ihlĂ¡Å¡en"; +$text["login"] = "PÅ™ihlĂ¡sit se"; +$text["login_error_text"] = "Chyba pÅ™i pÅ™ihlaÅ¡ovĂ¡nĂ­. ID uživatele nebo heslo je nesprĂ¡vnĂ©."; +$text["login_error_title"] = "Chyba pÅ™i pÅ™ihlaÅ¡ovĂ¡nĂ­"; +$text["login_not_found"] = "Toto uživatelskĂ© jmĂ©no neexistuje"; +$text["login_not_given"] = "Nebylo zadanĂ© uživatelskĂ© jmĂ©no"; +$text["login_ok"] = "PÅ™ihlĂ¡Å¡enĂ­ probÄ›hlo ĂºspěšnÄ›"; +$text["logout"] = "OdhlĂ¡Å¡enĂ­"; +$text["mime_type"] = "Mime-Type"; +$text["move"] = "PÅ™esunout"; +$text["move_document"] = "PÅ™esunout dokument"; +$text["move_folder"] = "PÅ™esunout adresĂ¡Å™"; +$text["moving_document"] = "PÅ™esouvĂ¡ se dokument..."; +$text["moving_folder"] = "PÅ™esouvĂ¡ se adresĂ¡Å™..."; +$text["msg_document_expired"] = "Platnost dokumentu \"[documentname]\" (Cesta: \"[path]\") vyprÅ¡ela [expires]"; +$text["msg_document_updated"] = "Dokument \"[documentname]\" (Cesta: \"[path]\") byl vytvoÅ™en nebo aktualizovĂ¡n [updated]"; +$text["my_account"] = "Můj ĂºÄet"; +$text["my_documents"] = "Moje dokumenty"; +$text["name"] = "JmĂ©no"; +$text["new_default_keyword_category"] = "PÅ™idat kategorii"; +$text["new_default_keywords"] = "PÅ™idat klĂ­ÄovĂ¡ slova"; +$text["new_equals_old_state"] = "UpozornÄ›nĂ­: NavrhovanĂ½ stav a souÄasnĂ½ stav jsou shodnĂ©. Nic se nevykonĂ¡."; +$text["new_user_image"] = "NovĂ½ obrĂ¡zek"; +$text["no"] = "Ne"; +$text["no_action"] = "Nic se nevykonĂ¡"; +$text["no_action_required"] = "n/a"; +$text["no_active_user_docs"] = "MomentĂ¡lnÄ› neexistujĂ­ Å¾Ă¡dnĂ© dokumenty tohoto uživatele, kterĂ© vyžadujĂ­ kontrolu nebo schvĂ¡lenĂ­."; +$text["no_approvers"] = "Nebyli pÅ™idÄ›leni Å¾Ă¡dnĂ­ schvalovatelĂ©."; +$text["no_default_keywords"] = "Nejsou dostupnĂ¡ Å¾Ă¡dnĂ¡ klĂ­ÄovĂ¡ slova."; +$text["no_docs_to_approve"] = "MomentĂ¡lnÄ› neexistujĂ­ Å¾Ă¡dnĂ© dokumenty, kterĂ© vyžadujĂ­ schvĂ¡lenĂ­."; +$text["no_docs_to_review"] = "MomentĂ¡lnÄ› neexistujĂ­ Å¾Ă¡dnĂ© dokumenty, kterĂ© vyžadujĂ­ kontrolu."; +$text["no_document_links"] = "Å½Ă¡dnĂ© souvisejĂ­cĂ­ dokumenty"; +$text["no_documents"] = "Å½Ă¡dnĂ© dokumenty"; +$text["no_group_members"] = "Tato skupina nemĂ¡ Å¾Ă¡dnĂ© Äleny"; +$text["no_groups"] = "Å½Ă¡dnĂ© skupiny"; +$text["no_previous_versions"] = "Nebyly nalezeny Å¾Ă¡dnĂ© jinĂ© verze"; +$text["no_reviewers"] = "Nebyli pÅ™idÄ›leni Å¾Ă¡dnĂ­ kontroloÅ™i."; +$text["no_subfolders"] = "Å½Ă¡dnĂ© podadresĂ¡Å™e"; +$text["no_update_cause_locked"] = "Proto nemůžete aktualizovat tento dokument. ProsĂ­m, kontaktujte uživatele, kterĂ½ ho zamknul."; +$text["no_user_image"] = "nebyl nalezen Å¾Ă¡dnĂ½ obrĂ¡zek"; +$text["not_approver"] = "Uživatel momentĂ¡lnÄ› nenĂ­ pÅ™idÄ›lenĂ½ jako schvalovatel tĂ©to revize dokumentu."; +$text["not_reviewer"] = "Uživatel momentĂ¡lnÄ› nenĂ­ pÅ™idÄ›lenĂ½ jako kontrolor tĂ©to revize dokumentu."; +$text["notify_subject"] = "NovĂ© nebo expirovanĂ© dokumenty ve vaÅ¡em systĂ©mu"; +$text["obsolete"] = "ZastaralĂ©"; +$text["old_folder"] = "starĂ½ adresĂ¡Å™"; +$text["only_jpg_user_images"] = "Pro obrĂ¡zky uživatelů je možnĂ© pouÅ¾Ă­t pouze obrĂ¡zky .jpg"; +$text["op_finished"] = "hotovo"; +$text["operation_not_allowed"] = "na to nemĂ¡te dostateÄnĂ© oprĂ¡vnÄ›nĂ­"; +$text["override_content_status"] = "PÅ™epsat stav"; +$text["override_content_status_complete"] = "PÅ™epsĂ¡nĂ­ stavu dokonÄenĂ©"; +$text["override_privilege_insufficient"] = "PÅ™Ă­stup zamĂ­tnut. NedostateÄnĂ© oprĂ¡vnÄ›nĂ­ pro pÅ™epsĂ¡nĂ­ stavu tohoto dokumentu."; +$text["overview"] = "PÅ™ehled"; +$text["owner"] = "VlastnĂ­k"; +$text["password"] = "Heslo"; +$text["pending_approval"] = "Dokumenty ÄekajĂ­cĂ­ na schvĂ¡lenĂ­"; +$text["pending_review"] = "Dokumenty ÄekajĂ­cĂ­ na kontrolu"; +$text["personal_default_keywords"] = "OsobnĂ­ klĂ­ÄovĂ¡ slova"; +$text["previous_versions"] = "PÅ™edeÅ¡lĂ© verze"; +$text["rejected"] = "OdmĂ­tnuty"; +$text["released"] = "VydĂ¡ny"; +$text["remove_document_link"] = "Odstranit odkaz"; +$text["remove_member"] = "Odstranit Älena"; +$text["removed_approver"] = "byl odstranÄ›n ze seznamu schvalovatelů."; +$text["removed_reviewer"] = "byl odstranÄ›n ze seznamu kontrolorů."; +$text["removing_default_keyword_category"] = "Maže se kategorie..."; +$text["removing_default_keywords"] = "Mažou se klĂ­ÄovĂ¡ slova..."; +$text["removing_document"] = "Odstraňuje se dokument..."; +$text["removing_document_link"] = "Odstraňuje se odkaz na souvisejĂ­cĂ­ dokument..."; +$text["removing_folder"] = "Odstraňuje se adresĂ¡Å™..."; +$text["removing_group"] = "Odstraňuje se skupina ze systĂ©mu..."; +$text["removing_member"] = "Odstraňuje se Älen ze skupiny..."; +$text["removing_user"] = "Odstraňuje se uživatel ze systĂ©mu..."; +$text["removing_version"] = "Odstraňuje se verze [version]..."; +$text["review_document"] = "Zkontrolovat dokument"; +$text["review_document_complete"] = "Kontrola dokumentu: DokonÄena"; +$text["review_document_complete_records_updated"] = "Kontrola dokumentu byla dokonÄena a zĂ¡znamy aktualizovanĂ©"; +$text["review_group"] = "Skupina kontroly"; +$text["review_status"] = "Stav kontroly"; +$text["review_summary"] = "ShrnutĂ­ kontroly"; +$text["review_update_failed"] = "Chyba pÅ™i aktualizaci stavu kontroly. Aktualizace selhala."; +$text["reviewer_added"] = "pÅ™idanĂ½ jako kontrolor"; +$text["reviewer_already_assigned"] = "je už pověřen jako kontrolor"; +$text["reviewer_already_removed"] = "už byl odstranÄ›n z procesu kontroly nebo poslal kontrolu"; +$text["reviewer_no_privilege"] = "nemĂ¡ dostateÄnĂ© oprĂ¡vnÄ›nĂ­ na kontrolu tohoto dokumentu"; +$text["reviewer_removed"] = "odstranÄ›n z procesu kontroly"; +$text["reviewers"] = "KontroloÅ™i"; +$text["rm_default_keyword_category"] = "Smazat kategorii"; +$text["rm_default_keywords"] = "Smazat klĂ­ÄovĂ¡ slova"; +$text["rm_document"] = "Odstranit dokument"; +$text["rm_folder"] = "Odstranit adresĂ¡Å™"; +$text["rm_group"] = "Odstranit tuto skupinu"; +$text["rm_user"] = "Odstranit tohoto uživatele"; +$text["rm_version"] = "Odstranit verzi"; +$text["root_folder"] = "KoÅ™enovĂ½ adresĂ¡Å™"; +$text["save"] = "Uložit"; +$text["search"] = "Hledat"; +$text["search_in"] = "ProhledĂ¡vat"; +$text["search_in_all"] = "vÅ¡echny adresĂ¡Å™e"; +$text["search_in_current"] = "pouze tento ([foldername]) vÄetnÄ› podadresĂ¡Å™Å¯"; +$text["search_mode"] = "Režim"; +$text["search_mode_and"] = "vÅ¡echna slova"; +$text["search_mode_or"] = "alespoň jedno ze slov"; +$text["search_no_results"] = "VaÅ¡emu dotazu nevyhovujĂ­ Å¾Ă¡dnĂ© dokumenty"; +$text["search_query"] = "Hledat"; +$text["search_report"] = "NalezenĂ½ch [count] dokumentů odpovĂ­dajĂ­cĂ­ch dotazu"; +$text["search_result_pending_approval"] = "stav 'ÄekĂ¡ na schvĂ¡lenĂ­'"; +$text["search_result_pending_review"] = "stav 'ÄekĂ¡ na kontrolu'"; +$text["search_results"] = "VĂ½sledky hledĂ¡nĂ­"; +$text["search_results_access_filtered"] = "VĂ½sledky hledĂ¡nĂ­ můžou obsahovat obsah, ke kterĂ©mu byl zamĂ­tnut pÅ™Ă­stup."; +$text["search_time"] = "UplynulĂ½ Äas: [time] sek"; +$text["select_one"] = "Vyberte jeden"; +$text["selected_document"] = "VybranĂ½ dokument"; +$text["selected_folder"] = "VybranĂ½ adresĂ¡Å™"; +$text["selection"] = "VĂ½bÄ›r"; +$text["seq_after"] = "Po \"[prevname]\""; +$text["seq_end"] = "Na konec"; +$text["seq_keep"] = "Ponechat pozici"; +$text["seq_start"] = "PrvnĂ­ pozice"; +$text["sequence"] = "Posloupnost"; +$text["set_default_access"] = "Nastavit standardnĂ­ režim pÅ™Ă­stupu"; +$text["set_expiry"] = "Nastavit expiraci"; +$text["set_owner"] = "Nastavit vlastnĂ­ka"; +$text["set_reviewers_approvers"] = "Pověřit kontrolory a schvalovatele"; +$text["setting_expires"] = "Nastavuje se expirace..."; +$text["setting_owner"] = "Nastavuje se vlastnĂ­k..."; +$text["setting_user_image"] = "
    Nastavuje se obrĂ¡zek uživatele..."; +$text["show_all_versions"] = "Zobrazit vÅ¡echny revize"; +$text["show_current_versions"] = "Zobrazit aktuĂ¡lnĂ­"; +$text["start"] = "ZaÄĂ¡tek"; +$text["status"] = "Stav"; +$text["status_approval_rejected"] = "NĂ¡vrh zamĂ­tnut"; +$text["status_approved"] = "SchvĂ¡len"; +$text["status_approver_removed"] = "Schvalovatel odstranÄ›n z procesu"; +$text["status_change_summary"] = "Revize dokumentu se zmÄ›nila ze stavu '[oldstatus]' na stav '[newstatus]'."; +$text["status_changed_by"] = "Stav zmÄ›nil "; +$text["status_not_approved"] = "NeschvĂ¡lenĂ½"; +$text["status_not_reviewed"] = "NezkontrolovanĂ½"; +$text["status_reviewed"] = "ZkontrolovanĂ½"; +$text["status_reviewer_rejected"] = "NĂ¡vrh zamĂ­tnut"; +$text["status_reviewer_removed"] = "Kontrolor odstranÄ›n z procesu"; +$text["status_unknown"] = "NeznĂ¡mĂ½"; +$text["subfolder_list"] = "PodadresĂ¡Å™e"; +$text["submit_approval"] = "Poslat schvĂ¡lenĂ­"; +$text["submit_login"] = "PÅ™ihlĂ¡sit se"; +$text["submit_review"] = "Poslat kontrolu"; +$text["theme"] = "Vzhled"; +$text["unable_to_add"] = "Nebylo možnĂ© pÅ™idat"; +$text["unable_to_remove"] = "Nebylo možnĂ© odstranit"; +$text["under_folder"] = "V adresĂ¡Å™i"; +$text["unknown_command"] = "PÅ™Ă­kaz nebyl rozpoznĂ¡n."; +$text["unknown_group"] = "NeznĂ¡mĂ© ID skupiny"; +$text["unknown_keyword_category"] = "NeznĂ¡mĂ¡ kategorie"; +$text["unknown_owner"] = "NeznĂ¡mĂ© ID vlastnĂ­ka"; +$text["unknown_user"] = "NeznĂ¡mĂ© ID uživatele"; +$text["unlock_cause_access_mode_all"] = "Můžete ho poÅ™Ă¡d aktualizovat, protože mĂ¡te režim pÅ™Ă­stupu \"all\". ZĂ¡mek bude automaticky odstranÄ›n."; +$text["unlock_cause_locking_user"] = "Můžete ho poÅ™Ă¡d aktualizovat, protože jste ten, kdo ho zamknul. ZĂ¡mek bude automaticky odstranÄ›n."; +$text["unlock_document"] = "Odemknout"; +$text["unlocking_denied"] = "NemĂ¡te dostateÄnĂ© oprĂ¡vnÄ›nĂ­ na odemknutĂ­ tohoto dokumentu"; +$text["unlocking_document"] = "OdemykĂ¡ se dokument..."; +$text["update"] = "Aktualizovat"; +$text["update_approvers"] = "Aktualizovat seznam schvalovatelů"; +$text["update_document"] = "Aktualizovat"; +$text["update_info"] = "Aktualizovat informace"; +$text["update_locked_msg"] = "Tento dokument je zamÄenĂ½."; +$text["update_reviewers"] = "Aktualizovat seznam kontrolorů"; +$text["update_reviewers_approvers"] = "Aktualizovat seznam kontrolorů a schvalovatelů"; +$text["updated_by"] = "Aktualizoval"; +$text["updating_document"] = "Aktualizuje se dokument..."; +$text["upload_date"] = "Datum nahrĂ¡nĂ­"; +$text["uploaded"] = "NahrĂ¡l"; +$text["uploaded_by"] = "NahrĂ¡l"; +$text["uploading_failed"] = "NahrĂ¡nĂ­ selhalo. ProsĂ­m, kontaktujte sprĂ¡vce."; +$text["use_default_keywords"] = "PouÅ¾Ă­t pÅ™eddefinovanĂ¡ klĂ­ÄovĂ¡ slova"; +$text["user"] = "Uživatel"; +$text["user_already_approved"] = "Uživatel už poslal schvĂ¡lenĂ­ tĂ©to verze dokumentu"; +$text["user_already_reviewed"] = "Uživatel už poslal kontrolu tĂ©to verze dokumentu"; +$text["user_approval_not_required"] = "MomentĂ¡lnÄ› se od uživatele nevyžaduje schvĂ¡lenĂ­ dokumetu."; +$text["user_exists"] = "Uživatel už existuje."; +$text["user_image"] = "ObrĂ¡zek"; +$text["user_info"] = "Informace o uživateli"; +$text["user_list"] = "Seznam uživatelů"; +$text["user_login"] = "ID uživatele"; +$text["user_management"] = "UživatelĂ©"; +$text["user_name"] = "PlnĂ© jmĂ©no"; +$text["user_removed_approver"] = "Uživatel byl odstranÄ›n ze seznamu jednotlivĂ½ch schvalovatelů."; +$text["user_removed_reviewer"] = "Uživatel byl odstranÄ›n ze seznamu jednotlivĂ½ch kontrolorů."; +$text["user_review_not_required"] = "MomentĂ¡lnÄ› se od uživatele nevyžaduje kontrola dokumentu."; +$text["users"] = "Uživatel"; +$text["version"] = "Verze"; +$text["version_info"] = "Informace o verzi"; +$text["version_under_approval"] = "Verze se schvaluje"; +$text["version_under_review"] = "Verze se kontroluje"; +$text["view_document"] = "Zobrazit dokument"; +$text["view_online"] = "Zobrazit online"; +$text["warning"] = "UpozornÄ›nĂ­"; +$text["wrong_pwd"] = "VaÅ¡e heslo je nesprĂ¡vnĂ©. Zkuste to znova."; +$text["yes"] = "Ano"; + +// New as of 1.7.2 +$text["all_pages"] = "All"; +$text["results_page"] = "Results Page"; +// New +$text["sign_out"] = "sign out"; +$text["signed_in_as"] = "Signed in as"; +$text["assign_reviewers"] = "Assign Reviewers"; +$text["assign_approvers"] = "Assign Approvers"; +$text["override_status"] = "Override Status"; +$text["change_status"] = "Change Status"; +$text["change_assignments"] = "Change Assignments"; +$text["no_user_docs"] = "There are currently no documents owned by the user"; +$text["disclaimer"] = "This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the english and international laws."; + +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archive creation"; +$text["files_deletion"] = "Files deletion"; +$text["folder"] = "Folder"; + +$text["unknown_id"] = "unknown id"; +$text["help"] = "Help"; + +$text["versioning_info"] = "Versioning info"; +$text["versioning_file_creation_warning"] = "With this operation you can create a file containing the versioning information of an entire DMS folder. After the creation every file will be saved inside the document folder."; +$text["archive_creation_warning"] = "With this operation you can create achive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup."; +$text["files_deletion_warning"] = "With this option you can delete all files of entire DMS folders. The versioning information will remain visible."; + +$text["backup_list"] = "Existings backup list"; +$text["backup_remove"] = "Remove backup file"; +$text["confirm_rm_backup"] = "Do you really want to remove the file \"[arkname]\"?
    Be careful: This action cannot be undone."; + +$text["document_deleted"] = "Document deleted"; +$text["linked_files"] = "Attachments"; +$text["invalid_file_id"] = "Invalid file ID"; +$text["rm_file"] = "Remove file"; +$text["confirm_rm_file"] = "Do you really want to remove file \"[name]\" of document \"[documentname]\"?
    Be careful: This action cannot be undone."; + +$text["edit_comment"] = "Edit comment"; + +// new from 1.9 + +$text["is_hidden"] = "Hide from users list"; +$text["log_management"] = "Log files management"; +$text["confirm_rm_log"] = "Do you really want to remove log file \"[logname]\"?
    Be careful: This action cannot be undone."; +$text["include_subdirectories"] = "Include subdirectories"; +$text["include_documents"] = "Include documents"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Toggle manager"; + +// new from 2.0 + +$text["calendar"] = "Calendar"; +$text["week_view"] = "Week view"; +$text["month_view"] = "Month view"; +$text["year_view"] = "Year View"; +$text["add_event"] = "Add event"; +$text["edit_event"] = "Edit event"; + +$text["january"] = "January"; +$text["february"] = "February"; +$text["march"] = "March"; +$text["april"] = "April"; +$text["may"] = "May"; +$text["june"] = "June"; +$text["july"] = "July"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "October"; +$text["november"] = "November"; +$text["december"] = "December"; + +$text["sunday"] = "Sunday"; +$text["monday"] = "Monday"; +$text["tuesday"] = "Tuesday"; +$text["wednesday"] = "Wednesday"; +$text["thursday"] = "Thursday"; +$text["friday"] = "Friday"; +$text["saturday"] = "Saturday"; + +$text["from"] = "From"; +$text["to"] = "To"; + +$text["event_details"] = "Event details"; +$text["confirm_rm_event"] = "Do you really want to remove event \"[name]\"?
    Be careful: This action cannot be undone."; + +$text["dump_creation"] = "DB dump creation"; +$text["dump_creation_warning"] = "With this operation you can create a dump file of your database content. After the creation the dump file will be saved in the data folder of your server."; +$text["dump_list"] = "Existings dump files"; +$text["dump_remove"] = "Remove dump file"; +$text["confirm_rm_dump"] = "Do you really want to remove the file \"[dumpname]\"?
    Be careful: This action cannot be undone."; + +$text["confirm_rm_user"] = "Do you really want to remove the user \"[username]\"?
    Be careful: This action cannot be undone."; +$text["confirm_rm_group"] = "Do you really want to remove the group \"[groupname]\"?
    Be careful: This action cannot be undone."; + +$text["human_readable"] = "Human readable archive"; + +$text["email_header"] = "This is an automatic message from the DMS server."; +$text["email_footer"] = "You can always change your e-mail settings using 'My Account' functions"; + +$text["add_multiple_files"] = "Add multiple files (will use filename as document name)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Maximum upload size for each file"; + +?> diff --git a/languages/English/help.htm b/languages/English/help.htm new file mode 100644 index 000000000..2da16f739 --- /dev/null +++ b/languages/English/help.htm @@ -0,0 +1,184 @@ +

    General Notes

    + +

    +A DMS (Document Management System) is designed to allow documents share +controlling the workflow, access permissions and organization in general. +

    + +

    +Using the first level menu the user can access the various information stored in the system: +

      +
    • Content: allows you to browse documents in a file manager style. +
    • My documents: has several entries to access documents of interest: +
        +
      • Documents in process: lists of documents awaiting review or approval by the user, +documents owned by the user who await approval or revision, documents locked by the user. +
      • All documents: list of all documents owned by the user. +
      • Review summary: list all the documents that were reviewed or awaiting review by the user. +
      • Approval summary: list all the documents that were approved or awaiting approval by the user. +
      +
    +

    + +

    +This DMS also provides a calendar that serves as virtual bulletin board to share notes, +appointments, deadlines and commitments. +

    + + +

    Permissions

    + +

    +Authorized users can set if and how other users will access to various folders +and documents submitted. +

    + +

    Permission levels

    +

    +The possible access-levels are: +

      +
    • Total permits: the user can perform any operation. +
    • Reading and writing: the user can update records and add content to the folders. +
    • Read only: the user can view the contents of folders and download documents. +
    • No Access: the user cannot view the contents of the folders or individual documents. +
    +

    + +

    +By default administrators have total permissions on each document and folder +on the system. Similarly, the document owner has total permits on his documents. +

    + +

    +Only administrator users can change the owner of a document. +

    + +

    Permissions management

    +

    +For each folder or document permissions are managed through two different devices +

      +
    • The default permissions are valid in the absence of further specific +
    • The list of permissions allows you to specify exceptions to the default permissions +
    +

    + +

    Access inheritance

    +

    +The permissions of folders and documents can be set as hereditary. +In this case the files and folders inherit the same permissions of the folder +that contains them. +

    + + +

    Documents workflow

    + +

    +The system automatically handles the workflow for each document and stores +changes, versioning, comments made, etc. +

    + +

    Validation cycle

    +

    +The normal workflow requires, when loading a new document or a +new version, to indicate some users or groups of users as reviewers and/or approvers. +Users that are listed as reviewers and approvers are +required to explain their approval to the document. When this operation +is completed, thus all listed users have made their +review/approval, the state of the document will set to 'released'. +

    + +

    +The reviewer/approver can deny its approval to the document. +In this case the document state is set to 'rejected'. +

    + +

    +A doc that are not set reviewers and approvals take immediately the state of 'released'. +

    + +

    +As approvers/reviewers one can indicate groups of users. In this case the +review/approval should be made by any of the users belonging to the group. +

    + +

    +The document owner may at any time amend the list of reviewers/approvers. +

    + +

    Documents status

    +

    +Possible states for a document are: +

      +
    • Draft pending approval: one or more of the approvals referred to have not yet expressed their approval. +
    • Draft pending review: one or more of the listed reviewer have not yet expressed their review. +
    • Released: the document has successfully completed its validation cycle. +
    • Rejected: the document has discontinued its validation cycle. +
    • Expired: you have exceeded the target date for completion of the validation of the document. +
    • Obsolete: the status of a released document can be changed to obsolete. This +is intended as an alternative to the cancellation of the document. Obsolete state +is reversible. +
    +

    + +

    Expiration

    +

    +For each document in production can be set a due date. +Once passed the day set are no longer possible revisions or approvals +and the document goes into an 'expired' state. +

    + +

    +The deadline is considered only for the latest version of the document +and has effect only on document processing. +

    + + +

    Other features

    + +

    Lock function

    +

    +Lock function is designed to indicate to other users that a certain document +is in process. Users having total permission on the document can +however reverse the lock and proceed to a modification of the document. +

    + +

    Notifications

    +

    +Each user can request notification on documents and folders. +Adding a file or folder in your list of notifications you will receive +reporting of transactions by other users. +

    + +

    +Only the Manager of a group can decide whether or not to enter the group list +reporting on documents and folders. Once inserted, the notifications come +all members of the group. +

    + +

    Keywords and search

    +

    +Each document allows the inclusion of a description and some keywords. +These informations are used for research function. +

    +

    +In personal account menu each user can store a set of keywords grouped by categories, +in order to speed filling during the loading of documents. +

    + +

    +Pressing the search button without entering any word you access the advanced research page. +

    + + +

    Calendar

    + +

    +There are three views: by week, month, year. Events are displayed in order of their +insertion in the calendar. +

    + +

    +Once inserted, the events are public and visible to everyone. Only the administrator +and who has entered the event can modify it later. +

    + diff --git a/languages/English/lang.inc b/languages/English/lang.inc new file mode 100644 index 000000000..210c2076e --- /dev/null +++ b/languages/English/lang.inc @@ -0,0 +1,564 @@ +Be careful: This action cannot be undone."; +$text["confirm_rm_folder"] = "Do you really want to remove the folder \"[foldername]\" and its content?
    Be careful: This action cannot be undone."; +$text["confirm_rm_version"] = "Do you really want to remove version [version] of document \"[documentname]\"?
    Be careful: This action cannot be undone."; +$text["content"] = "Content"; +$text["continue"] = "Continue"; +$text["creation_date"] = "Created"; +$text["current_version"] = "Current version"; +$text["default_access"] = "Default Access Mode"; +$text["default_keyword_category"] = "Category"; +$text["default_keyword_category_name"] = "Name"; +$text["default_keywords"] = "Available keywords"; +$text["delete"] = "Delete"; +$text["details"] = "Details"; +$text["details_version"] = "Details for version: [version]"; +$text["document"] = "Document"; +$text["document_access_again"] = "Edit document access again"; +$text["document_already_locked"] = "This document is aleady locked"; +$text["document_infos"] = "Document Information"; +$text["document_is_not_locked"] = "This document is not locked"; +$text["document_link_by"] = "Linked by"; +$text["document_link_public"] = "Public"; +$text["document_list"] = "Documents"; +$text["document_notify_again"] = "Edit notify-list again"; +$text["document_overview"] = "Document Overview"; +$text["document_status"] = "Document Status"; +$text["document_title"] = "Document '[documentname]'"; +$text["document_versions"] = "All versions"; +$text["documents"] = "Documents"; +$text["documents_in_process"] = "Documents In Process"; +$text["documents_owned_by_user"] = "Documents owned by you"; +$text["documents_to_approve"] = "Documents awaiting your approval"; +$text["documents_to_review"] = "Documents awaiting your Review"; +$text["documents_user_requiring_attention"] = "Documents owned by you that require attention"; +$text["does_not_expire"] = "Does not expire"; +$text["does_not_inherit_access_msg"] = "Inherit access"; +$text["download"] = "Download"; +$text["draft_pending_approval"] = "Draft - pending approval"; +$text["draft_pending_review"] = "Draft - pending review"; +$text["edit"] = "Edit"; +$text["edit_default_keyword_category"] = "Edit categories"; +$text["edit_default_keywords"] = "Edit keywords"; +$text["edit_document"] = "Edit document"; +$text["edit_document_access"] = "Edit Access"; +$text["edit_document_notify"] = "Document Notification List"; +$text["edit_document_props"] = "Edit document"; +$text["edit_document_props_again"] = "Edit document again"; +$text["edit_existing_access"] = "Edit Access List"; +$text["edit_existing_notify"] = "Edit notification list"; +$text["edit_folder"] = "Edit folder"; +$text["edit_folder_access"] = "Edit access"; +$text["edit_folder_notify"] = "Folder Notification List"; +$text["edit_folder_props"] = "Edit folder"; +$text["edit_folder_props_again"] = "Edit folder again"; +$text["edit_group"] = "Edit group"; +$text["edit_inherit_access"] = "Inherit access"; +$text["edit_personal_default_keywords"] = "Edit personal keywords"; +$text["edit_user"] = "Edit user"; +$text["edit_user_details"] = "Edit User Details"; +$text["email"] = "Email"; +$text["email_err_group"] = "Error sending email to one or more members of group [group]"; +$text["email_err_user"] = "Error sending email to user [user]"; +$text["email_sent"] = "Email sent"; +$text["empty_access_list"] = "Access list is empty"; +$text["empty_notify_list"] = "No entries"; +$text["error_adding_session"] = "Error occured while creating session."; +$text["error_occured"] = "An error has occured"; +$text["error_removing_old_sessions"] = "Error occured while removing old sessions"; +$text["error_updating_revision"] = "Error updating status of document revision."; +$text["exp_date"] = "Expires"; +$text["expired"] = "Expired"; +$text["expires"] = "Expires"; +$text["file"] = "File"; +$text["file_info"] = "File Information"; +$text["file_size"] = "Filesize"; +$text["folder_access_again"] = "Edit folder access again"; +$text["folder_contents"] = "Folder Contents"; +$text["folder_infos"] = "Folder Information"; +$text["folder_notify_again"] = "Edit notify-list again"; +$text["folder_overview"] = "Folder Overview"; +$text["folder_path"] = "Path"; +$text["folder_title"] = "Folder '[foldername]'"; +$text["folders"] = "Folders"; +$text["folders_and_documents_statistic"] = "Contents overview"; +$text["foldertree"] = "Foldertree"; +$text["from_approval_process"] = "from approval process"; +$text["from_review_process"] = "from review process"; +$text["global_default_keywords"] = "Global keywords"; +$text["goto"] = "Go to"; +$text["group"] = "Group"; +$text["group_already_approved"] = "An approval has already been submitted on behalf of group"; +$text["group_already_reviewed"] = "A review has already been submitted on behalf of group"; +$text["group_approvers"] = "Group Approvers"; +$text["group_email_sent"] = "Email sent to group members"; +$text["group_exists"] = "Group already exists."; +$text["group_management"] = "Groups management"; +$text["group_members"] = "Group members"; +$text["group_reviewers"] = "Group Reviewers"; +$text["group_unable_to_add"] = "Unable to add group"; +$text["group_unable_to_remove"] = "Unable to remove group"; +$text["groups"] = "Groups"; +$text["guest_login"] = "Login as guest"; +$text["guest_login_disabled"] = "Guest login is disabled."; +$text["individual_approvers"] = "Individual Approvers"; +$text["individual_reviewers"] = "Individual Reviewers"; +$text["individuals"] = "Individuals"; +$text["inherits_access_msg"] = "Access is being inherited.

    Copy inherited access list
    Start with empty access list"; +$text["internal_error"] = "Internal error"; +$text["internal_error_exit"] = "Internal error. Unable to complete request. Exiting."; +$text["invalid_access_mode"] = "Invalid Access Mode"; +$text["invalid_action"] = "Invalid Action"; +$text["invalid_approval_status"] = "Invalid Approval Status"; +$text["invalid_create_date_end"] = "Invalid end date for creation date range."; +$text["invalid_create_date_start"] = "Invalid start date for creation date range."; +$text["invalid_doc_id"] = "Invalid Document ID"; +$text["invalid_folder_id"] = "Invalid Folder ID"; +$text["invalid_group_id"] = "Invalid Group ID"; +$text["invalid_link_id"] = "Invalid link identifier"; +$text["invalid_review_status"] = "Invalid Review Status"; +$text["invalid_sequence"] = "Invalid sequence value"; +$text["invalid_status"] = "Invalid Document Status"; +$text["invalid_target_doc_id"] = "Invalid Target Document ID"; +$text["invalid_target_folder"] = "Invalid Target Folder ID"; +$text["invalid_user_id"] = "Invalid User ID"; +$text["invalid_version"] = "Invalid Document Version"; +$text["is_admin"] = "Administrator Privilege"; +$text["js_no_approval_group"] = "Please select a approval group"; +$text["js_no_approval_status"] = "Please select the approval status"; +$text["js_no_comment"] = "There is no comment"; +$text["js_no_email"] = "Type in your Email-address"; +$text["js_no_file"] = "Please select a file"; +$text["js_no_keywords"] = "Specify some keywords"; +$text["js_no_login"] = "Please type in a username"; +$text["js_no_name"] = "Please type in a name"; +$text["js_no_override_status"] = "Please select the new [override] status"; +$text["js_no_pwd"] = "You need to type in your password"; +$text["js_no_query"] = "Type in a query"; +$text["js_no_review_group"] = "Please select a review group"; +$text["js_no_review_status"] = "Please select the review status"; +$text["js_pwd_not_conf"] = "Password and passwords-confirmation are not equal"; +$text["js_select_user"] = "Please select an user"; +$text["js_select_user_or_group"] = "Select at least a user or a group"; +$text["keyword_exists"] = "Keyword already exists"; +$text["keywords"] = "Keywords"; +$text["language"] = "Language"; +$text["last_update"] = "Last Update"; +$text["last_updated_by"] = "Last updated by"; +$text["latest_version"] = "Latest Version"; +$text["linked_documents"] = "Related Documents"; +$text["local_file"] = "Local file"; +$text["lock_document"] = "Lock"; +$text["lock_message"] = "This document is locked by [username]. Only authorized users can unlock this document."; +$text["lock_status"] = "Status"; +$text["logged_in_as"] = "Logged in"; +$text["login"] = "Sign in"; +$text["login_error_text"] = "Error signing in. User ID or password incorrect."; +$text["login_error_title"] = "Sign in error"; +$text["login_not_found"] = "This username does not exist"; +$text["login_not_given"] = "No username has been supplied"; +$text["login_ok"] = "Sign in successful"; +$text["logout"] = "Logout"; +$text["mime_type"] = "Mime-Type"; +$text["move"] = "Move"; +$text["move_document"] = "Move document"; +$text["move_folder"] = "Move Folder"; +$text["msg_document_expired"] = "The document \"[documentname]\" (Path: \"[path]\") has expired on [expires]"; +$text["msg_document_updated"] = "The document \"[documentname]\" (Path: \"[path]\") was created or updated on [updated]"; +$text["my_account"] = "My Account"; +$text["my_documents"] = "My Documents"; +$text["name"] = "Name"; +$text["new_default_keyword_category"] = "Add category"; +$text["new_default_keywords"] = "Add keywords"; +$text["new_equals_old_state"] = "Warning: Proposed status and existing status are identical. No action required."; +$text["new_user_image"] = "New image"; +$text["no"] = "No"; +$text["no_action"] = "No action required"; +$text["no_action_required"] = "n/a"; +$text["no_active_user_docs"] = "There are currently no documents owned by the user that require review or approval."; +$text["no_approvers"] = "No approvers assigned."; +$text["no_default_keywords"] = "No keywords available"; +$text["no_docs_to_approve"] = "There are currently no documents that require approval."; +$text["no_docs_to_review"] = "There are currently no documents that require review."; +$text["no_document_links"] = "No related documents"; +$text["no_documents"] = "No documents"; +$text["no_folders"] = "No folders"; +$text["no_group_members"] = "This group has no members"; +$text["no_groups"] = "No groups"; +$text["no_previous_versions"] = "No other versions found"; +$text["no_reviewers"] = "No reviewers assigned."; +$text["no_subfolders"] = "No subfolders"; +$text["no_update_cause_locked"] = "You can therefore not update this document. Please contanct the locking user."; +$text["no_user_image"] = "No image found"; +$text["not_approver"] = "User is not currently assigned as an approver of this document revision."; +$text["not_reviewer"] = "User is not currently assigned as a reviewer of this document revision."; +$text["notification_summary"] = "Notification Summary"; +$text["notify_subject"] = "New or expired documents in your DMS"; +$text["obsolete"] = "Obsolete"; +$text["old_folder"] = "old folder"; +$text["only_jpg_user_images"] = "Only .jpg-images may be used as user-images"; +$text["op_finished"] = " done"; +$text["operation_not_allowed"] = "You don't have enough rights to do that"; +$text["override_content_status"] = "Override Status"; +$text["override_content_status_complete"] = "Override Status Complete"; +$text["override_privilege_insufficient"] = "Access denied. Privileges insufficient to override the status of this document."; +$text["overview"] = "Overview"; +$text["owner"] = "Owner"; +$text["password"] = "Password"; +$text["pending_approval"] = "Documents pending approval"; +$text["pending_review"] = "Documents pending review"; +$text["personal_default_keywords"] = "Personal keywords"; +$text["previous_versions"] = "Previous Versions"; +$text["rejected"] = "Rejected"; +$text["released"] = "Released"; +$text["remove_document_link"] = "Remove link"; +$text["remove_member"] = "Remove member"; +$text["removed_approver"] = "has been removed from the list of approvers."; +$text["removed_reviewer"] = "has been removed from the list of reviewers."; +$text["results_page"] = "Results Page"; +$text["review_document"] = "Review Document"; +$text["review_document_complete"] = "Review Document: Complete"; +$text["review_document_complete_records_updated"] = "Document review completed and records updated"; +$text["review_group"] = "Review Group"; +$text["review_status"] = "Review Status"; +$text["review_summary"] = "Review Summary"; +$text["review_update_failed"] = "Error updating review status. Update failed."; +$text["reviewer_added"] = "added as a reviewer"; +$text["reviewer_already_assigned"] = "is already assigned as a reviewer"; +$text["reviewer_already_removed"] = "has already been removed from review process or has already submitted a review"; +$text["reviewer_no_privilege"] = "is not sufficiently privileged to review this document"; +$text["reviewer_removed"] = "removed from review process"; +$text["reviewers"] = "Reviewers"; +$text["rm_default_keyword_category"] = "Delete category"; +$text["rm_default_keywords"] = "Delete keywords"; +$text["rm_document"] = "Remove document"; +$text["rm_folder"] = "Remove folder"; +$text["rm_group"] = "Remove this group"; +$text["rm_user"] = "Remove this user"; +$text["rm_version"] = "Remove version"; +$text["root_folder"] = "Root folder"; +$text["save"] = "Save"; +$text["search"] = "Search"; +$text["search_in"] = "Search in"; +$text["search_in_all"] = "all Folders"; +$text["search_in_current"] = "only this ([foldername]) including subfolders"; +$text["search_mode"] = "Mode"; +$text["search_mode_and"] = "all words"; +$text["search_mode_or"] = "at least one word"; +$text["search_no_results"] = "There are no documents that match your search"; +$text["search_query"] = "Search for"; +$text["search_report"] = "Found [count] documents"; +$text["search_result_pending_approval"] = "status 'pending approval'"; +$text["search_result_pending_review"] = "status 'pending review'"; +$text["search_results"] = "Search results"; +$text["search_results_access_filtered"] = "Search results may contain content to which access has been denied."; +$text["search_time"] = "Elapsed time: [time] sec."; +$text["select_one"] = "Select one"; +$text["selected_document"] = "Selected document"; +$text["selected_folder"] = "Selected folder"; +$text["selection"] = "Selection"; +$text["seq_after"] = "After \"[prevname]\""; +$text["seq_end"] = "At the end"; +$text["seq_keep"] = "Keep Position"; +$text["seq_start"] = "First position"; +$text["sequence"] = "Sequence"; +$text["set_default_access"] = "Set Default Access Mode"; +$text["set_expiry"] = "Set Expiry"; +$text["set_owner"] = "Set Owner"; +$text["set_reviewers_approvers"] = "Assign Reviewers and Approvers"; +$text["show_all_versions"] = "Show All Revisions"; +$text["show_current_versions"] = "Show Current"; +$text["start"] = "Start"; +$text["status"] = "Status"; +$text["status_approval_rejected"] = "Draft rejected"; +$text["status_approved"] = "Approved"; +$text["status_approver_removed"] = "Approver removed from process"; +$text["status_change_summary"] = "Document revision changed from status '[oldstatus]' to status '[newstatus]'."; +$text["status_changed_by"] = "Status changed by"; +$text["status_not_approved"] = "Not approved"; +$text["status_not_reviewed"] = "Not reviewed"; +$text["status_reviewed"] = "Reviewed"; +$text["status_reviewer_rejected"] = "Draft rejected"; +$text["status_reviewer_removed"] = "Reviewer removed from process"; +$text["status_unknown"] = "Unknown"; +$text["subfolder_list"] = "Subfolders"; +$text["submit_approval"] = "Submit approval"; +$text["submit_login"] = "Sign in"; +$text["submit_review"] = "Submit review"; +$text["theme"] = "Theme"; +$text["unable_to_add"] = "Unable to add"; +$text["unable_to_remove"] = "Unable to remove"; +$text["under_folder"] = "In folder"; +$text["unknown_command"] = "Command not recognized."; +$text["unknown_group"] = "Unknown group id"; +$text["unknown_keyword_category"] = "Unknown category"; +$text["unknown_owner"] = "Unknown owner id"; +$text["unknown_user"] = "Unknown user id"; +$text["unlock_cause_access_mode_all"] = "You can still update it because you have access-mode \"all\". Locking will automatically be removed."; +$text["unlock_cause_locking_user"] = "You can still update it because you are also the one that locked it. Locking will automatically be removed."; +$text["unlock_document"] = "Unlock"; +$text["unlocking_denied"] = "You dont't have enough rights to unlock this document"; +$text["update"] = "Update"; +$text["update_approvers"] = "Update List of Approvers"; +$text["update_document"] = "Update"; +$text["update_info"] = "Update Information"; +$text["update_locked_msg"] = "This document is locked."; +$text["update_reviewers"] = "Update List of Reviewers"; +$text["update_reviewers_approvers"] = "Update List of Reviewers and Approvers"; +$text["updated_by"] = "Updated by"; +$text["upload_date"] = "Upload-Date"; +$text["uploaded"] = "Uploaded"; +$text["uploaded_by"] = "Uploaded by"; +$text["uploading_failed"] = "Upload failed. Please contact the administrator."; +$text["use_default_keywords"] = "Use predefined keywords"; +$text["user"] = "User"; +$text["user_already_approved"] = "User has already submitted an approval of this document version"; +$text["user_already_reviewed"] = "User has already submitted a review of this document version"; +$text["user_approval_not_required"] = "No document approval required of user at this time."; +$text["user_exists"] = "User already exists."; +$text["user_image"] = "Image"; +$text["user_info"] = "User Information"; +$text["user_list"] = "List of Users"; +$text["user_login"] = "User ID"; +$text["user_management"] = "Users management"; +$text["user_name"] = "Full name"; +$text["user_removed_approver"] = "User has been removed from the list of individual approvers."; +$text["user_removed_reviewer"] = "User has been removed from the list of individual reviewers."; +$text["user_review_not_required"] = "No document review required of user at this time."; +$text["users"] = "Users"; +$text["version"] = "Version"; +$text["version_info"] = "Version Information"; +$text["version_under_approval"] = "Version under approval"; +$text["version_under_review"] = "Version under review"; +$text["view_document"] = "View Document"; +$text["view_online"] = "View online"; +$text["warning"] = "Warning"; +$text["wrong_pwd"] = "Your password is incorrect. Try Again."; +$text["yes"] = "Yes"; + +$text["sign_out"] = "sign out"; +$text["signed_in_as"] = "Signed in as"; +$text["assign_reviewers"] = "Assign Reviewers"; +$text["assign_approvers"] = "Assign Approvers"; +$text["override_status"] = "Override Status"; +$text["change_status"] = "Change Status"; +$text["change_assignments"] = "Change Assignments"; +$text["no_user_docs"] = "There are currently no documents owned by the user"; +$text["disclaimer"] = "This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the national and international laws."; +$text["error_updating_status"] = "Errore during the status update"; +$text["unknown_id"] = "unknown id"; +$text["help"] = "Help"; + +$text["group_approval_summary"] = "Group approval summary"; +$text["group_review_summary"] = "Group review summary"; +$text["documents_locked_by_you"] = "Documents locked by you"; + +$text["document_renamed_email"] = "Document renamed"; +$text["folder_renamed_email"] = "Folder renamed"; +$text["comment_changed_email"] = "Comment changed"; +$text["document_moved_email"] = "Document moved"; +$text["folder_moved_email"] = "Folder moved"; +$text["ownership_changed_email"] = "Owner changed"; +$text["access_permission_changed_email"] = "Permission changed"; +$text["expiry_changed_email"] = "Expiry date changed"; +$text["notify_added_email"] = "You've been added to notify list"; +$text["notify_deleted_email"] = "You've been removed from notify list"; +$text["document_updated_email"] = "Document updated"; +$text["document_deleted_email"] = "Document deleted"; +$text["folder_deleted_email"] = "Folder deleted"; +$text["version_deleted_email"] = "Version deleted"; +$text["document_status_changed_email"] = "Document status changed"; +$text["review_request_email"] = "Review request"; +$text["approval_request_email"] = "Approval request"; +$text["review_deletion_email"] = "Review request deleted"; +$text["approval_deletion_email"] = "Approval request deleted"; +$text["new_subfolder_email"] = "New folder"; +$text["new_document_email"] = "New document"; +$text["approval_submit_email"] = "Submitted approval"; +$text["review_submit_email"] = "Submitted review"; +$text["automatic_status_update"] = "Automatic status change"; +$text["old"] = "Old"; +$text["new"] = "New"; +$text["folder"] = "Folder"; + +$text["new_file_email"] = "New attachment"; +$text["removed_file_email"] = "Removed attachment"; + +$text["document_deleted"] = "Document deleted"; +$text["linked_files"] = "Attachments"; +$text["invalid_file_id"] = "Invalid file ID"; +$text["rm_file"] = "Remove file"; +$text["confirm_rm_file"] = "Do you really want to remove file \"[name]\" of document \"[documentname]\"?
    Be careful: This action cannot be undone."; + +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archive creation"; +$text["files_deletion"] = "Files deletion"; + +$text["versioning_info"] = "Versioning info"; +$text["versioning_file_creation_warning"] = "With this operation you can create a file containing the versioning information of an entire DMS folder. After the creation every file will be saved inside the document folder."; +$text["archive_creation_warning"] = "With this operation you can create achive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup."; +$text["files_deletion_warning"] = "With this option you can delete all files of entire DMS folders. The versioning information will remain visible."; + +$text["confirm_rm_folder_files"] = "Do you really want to remove all the files of the folder \"[foldername]\" and of its subfolders?
    Be careful: This action cannot be undone."; + +$text["files"] = "Files"; +$text["storage_size"] = "Storage size"; + +$text["backup_list"] = "Existings backup list"; +$text["backup_remove"] = "Remove backup file"; +$text["confirm_rm_backup"] = "Do you really want to remove the file \"[arkname]\"?
    Be careful: This action cannot be undone."; + +$text["edit_comment"] = "Edit comment"; + +// new from 1.9 + +$text["is_hidden"] = "Hide from users list"; +$text["log_management"] = "Log files management"; +$text["confirm_rm_log"] = "Do you really want to remove log file \"[logname]\"?
    Be careful: This action cannot be undone."; +$text["include_subdirectories"] = "Include subdirectories"; +$text["include_documents"] = "Include documents"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Toggle manager"; + +// new from 2.0 + +$text["calendar"] = "Calendar"; +$text["week_view"] = "Week view"; +$text["month_view"] = "Month view"; +$text["year_view"] = "Year View"; +$text["add_event"] = "Add event"; +$text["edit_event"] = "Edit event"; + +$text["january"] = "January"; +$text["february"] = "February"; +$text["march"] = "March"; +$text["april"] = "April"; +$text["may"] = "May"; +$text["june"] = "June"; +$text["july"] = "July"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "October"; +$text["november"] = "November"; +$text["december"] = "December"; + +$text["sunday"] = "Sunday"; +$text["monday"] = "Monday"; +$text["tuesday"] = "Tuesday"; +$text["wednesday"] = "Wednesday"; +$text["thursday"] = "Thursday"; +$text["friday"] = "Friday"; +$text["saturday"] = "Saturday"; + +$text["from"] = "From"; +$text["to"] = "To"; + +$text["event_details"] = "Event details"; +$text["confirm_rm_event"] = "Do you really want to remove event \"[name]\"?
    Be careful: This action cannot be undone."; + +$text["dump_creation"] = "DB dump creation"; +$text["dump_creation_warning"] = "With this operation you can create a dump file of your database content. After the creation the dump file will be saved in the data folder of your server."; +$text["dump_list"] = "Existings dump files"; +$text["dump_remove"] = "Remove dump file"; +$text["confirm_rm_dump"] = "Do you really want to remove the file \"[dumpname]\"?
    Be careful: This action cannot be undone."; + +$text["confirm_rm_user"] = "Do you really want to remove the user \"[username]\"?
    Be careful: This action cannot be undone."; +$text["confirm_rm_group"] = "Do you really want to remove the group \"[groupname]\"?
    Be careful: This action cannot be undone."; + +$text["human_readable"] = "Human readable archive"; + +$text["email_header"] = "This is an automatic message from the DMS server."; +$text["email_footer"] = "You can always change your e-mail settings using 'My Account' functions"; + +$text["add_multiple_files"] = "Add multiple files (will use filename as document name)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Maximum upload size for each file"; + +?> diff --git a/languages/Francais/help.htm b/languages/Francais/help.htm new file mode 100644 index 000000000..b7fa69458 --- /dev/null +++ b/languages/Francais/help.htm @@ -0,0 +1,7 @@ +

    TODO

    + + + + + + diff --git a/languages/Francais/lang.inc b/languages/Francais/lang.inc new file mode 100644 index 000000000..09ab8b877 --- /dev/null +++ b/languages/Francais/lang.inc @@ -0,0 +1,126 @@ +Attention : cette action ne peut être annulée."; $text["confirm_rm_folder"] = "Voulez-vous réellement effacer \"[foldername]\" et son contenu ?
    Attention : cette action ne peut être annulée."; $text["confirm_rm_version"] = "Voulez-vous réellement effacer la [version] du document \"[documentname]\"?
    Attention : cette action ne peut être annulée."; $text["content"] = "Contenu"; $text["continue"] = "Continuer"; $text["creating_new_default_keyword_category"] = "Ajout de catégorie..."; $text["creation_date"] = "Créé"; $text["current_version"] = "Version actuelle"; $text["default_access"] = "Mode d'accès par défaut"; $text["default_keyword_category_name"] = "Nom"; $text["default_keyword_category"] = "Catégories"; $text["default_keywords"] = "Mots-clefs valables"; $text["delete_last_version"] = "Document n'a qu'une version. Effaçage de l'enregsitrement au complet..."; $text["delete"] = "Effacer"; $text["deleting_document_notify"] = "Retrait d'élément à la liste de notification..."; $text["deleting_folder_notify"] = "Retrait d'élément à la liste de notification..."; $text["details"] = "Détails"; $text["details_version"] = "Détails de la version: [version]"; $text["document_access_again"] = "Editer l'accès au document à nouveau"; $text["document_add_access"] = "Ajourt d'un élément à la liste d'accès..."; $text["document_already_locked"] = "Ce document est déjà verrouillé"; $text["document_del_access"] = "Retrait de l'élément de la liste d'accès..."; $text["document_edit_access"] = "Changement du mode d'accès..."; $text["document_infos"] = "Information de Document"; $text["document_is_not_locked"] = "Ce document n'est pas verrouillé"; $text["document_link_by"] = "Liés par"; $text["document_link_public"] = "Public"; $text["document_list"] = "Documents"; $text["document_notify_again"] = "Editer la liste de notification à nouveau"; $text["document_overview"] = "Aperçu de Document"; $text["document_set_default_access"] = "Paramétrage du mode d'accès par défaut pour document..."; $text["document_set_inherit"] = "Retrait de l'ACL. Les documents hériteront des accès..."; $text["document_set_not_inherit_copy"] = "Copie de la liste d'accès..."; $text["document_set_not_inherit_empty"] = "Retrait de l'accès hérité. Début avec une ACL vide..."; $text["document_status"] = "Statut de Document"; $text["document_title"] = "Document '[documentname]'"; $text["document_versions"] = "Toutes versions"; $text["document"] = "Document"; $text["documents_in_process"] = "Documents en cours"; $text["documents_owned_by_user"] = "Documents détenus par l'utilisateur"; $text["documents_to_approve"] = "Documents attendant l'approbation de l'utilisateur"; $text["documents_to_review"] = "Documents attendant la révision de l'utilisateur"; $text["documents_user_requiring_attention"] = "Documents détenu par l'utilisateur qui nécessite attention"; $text["does_not_expire"] = "N'expire pas"; $text["does_not_inherit_access_msg"] = "Accès hérité"; $text["download"] = "Téléchargement"; $text["draft_pending_approval"] = "Ébauche - sous approbation"; $text["draft_pending_review"] = "Ébauche - sous révision"; $text["edit_default_keyword_category"] = "Editer les catégories"; $text["edit_default_keywords"] = "Editer les mots-clefs"; $text["edit_document_access"] = "Editer l'accès"; $text["edit_document_notify"] = "Liste de Notification"; $text["edit_document_props_again"] = "Editer document à nouveau"; $text["edit_document_props"] = "Editer document"; $text["edit_document"] = "Editer document"; $text["edit_existing_access"] = "Editer la liste d'accès"; $text["edit_existing_notify"] = "Editer la liste de notification"; $text["edit_folder_access"] = "Editer l'accès"; $text["edit_folder_notify"] = "Liste de Notification"; $text["edit_folder_props_again"] = "Editer dossier à nouveau"; $text["edit_folder_props"] = "Editer dossier"; $text["edit_folder"] = "Editer dossier"; $text["edit_group"] = "Editer groupe"; $text["edit_inherit_access"] = "Accés hérité"; $text["edit_personal_default_keywords"] = "Editer les mots-clefs personnels"; $text["edit_user_details"] = "Editer les détails d'utilisateur"; $text["edit_user"] = "Editer un utilisateur"; $text["edit"] = "éditer"; $text["editing_default_keyword_category"] = "Changement de catégorie..."; $text["editing_default_keywords"] = "Changement de mots-clefs..."; $text["editing_document_props"] = "Edition de document..."; $text["editing_folder_props"] = "Edition de dossier..."; $text["editing_group"] = "Edition de groupe..."; $text["editing_user_data"] = "Edition des réglages de l'utilisateur..."; $text["editing_user"] = "Edition de l'utilisateur..."; $text["email_err_group"] = "Erreur lors de l'envoi d'e-mail à un membre ou plus de ce groupe."; $text["email_err_user"] = "Erreur lors de l'envoi d'e-mail à un utilisateur."; $text["email_sent"] = "E-mail envoyé"; $text["email"] = "E-mail"; $text["empty_access_list"] = "La liste d'accès est vide"; $text["empty_notify_list"] = "Aucune entrée"; $text["error_adding_session"] = "Erreur lors de la création de la session."; $text["error_occured"] = "Une erreur s'est produite"; $text["error_removing_old_sessions"] = "Erreur lors du retrait des vieilles sessions"; $text["error_updating_revision"] = "Erreur lors de la mise à jour du statut de révision du document."; $text["exp_date"] = "Date d'expiration"; $text["expired"] = "Expiré"; $text["expires"] = "Expire"; $text["file_info"] = "Information du fichier"; $text["file_size"] = "Taille"; $text["file"] = "Fichier"; $text["folder_access_again"] = "Éditer à nouveau l'accès au dossier"; $text["folder_add_access"] = "Ajout d'élément à la liste d'accès..."; $text["folder_contents"] = "Dossiers"; $text["folder_del_access"] = "Retrait de l'élément de la liste d'accès..."; $text["folder_edit_access"] = "Edition de l'accès..."; $text["folder_infos"] = "Information du dossier"; $text["folder_notify_again"] = "Éditer la liste de notification à nouveau"; $text["folder_overview"] = "Aperçu de dossier"; $text["folder_path"] = "Chemin"; $text["folder_set_default_access"] = "Paramétrage du mode d'accès par défaut pour dossier..."; $text["folder_set_inherit"] = "Retrait de l'ACL. Les dossiers hériteront des accès..."; $text["folder_set_not_inherit_copy"] = "Copie de la liste d'accès..."; $text["folder_set_not_inherit_empty"] = "Retrait de l'accès hérité. Début avec une ACL vide..."; $text["folder_title"] = "Dossier '[foldername]'"; $text["folders_and_documents_statistic"] = "Aperçu des dossiers et documents"; $text["foldertree"] = "Arborescence"; $text["from_approval_process"] = "A partir du processus d'approbation"; $text["from_review_process"] = "A partir du processus de révision"; $text["global_default_keywords"] = "Mots-clefs globaux"; $text["goto"] = "Aller vers"; $text["group_already_approved"] = "Une approbatiion a déjà été proposée au nom du groupe"; $text["group_already_reviewed"] = "Une révision a déjà été proposée au nom du groupe"; $text["group_approvers"] = "approbateurs de groupes"; $text["group_email_sent"] = "E-mail envoyé aux membres du groupe"; $text["group_exists"] = "Ce groupe existe déjà."; $text["group_management"] = "Groupes"; $text["group_members"] = "Membres de groupes"; $text["group_reviewers"] = "Correcteurs de groupes"; $text["group_unable_to_add"] = "Impossible d'ajouter un groupe"; $text["group_unable_to_remove"] = "Impossible de retirer un groupe"; $text["group"] = "Groupe"; $text["groups"] = "Groupes"; $text["guest_login_disabled"] = "Connexion d'invité désactivée."; $text["guest_login"] = "Connecter comme invité"; $text["individual_approvers"] = "Approbateurs individuels"; $text["individual_reviewers"] = "Correcteurs individuels"; $text["individuals"] = "Individuels"; $text["inherits_access_msg"] = "L'accès est hérité.

    Copier la liste des accès hérités
    Commencer avec une liste d'accès vide"; $text["internal_error_exit"] = "Erreur interne. Impossible d'achever la demande. Sortie du programme."; $text["internal_error"] = "Erreur interne"; $text["invalid_access_mode"] = "mode d'accès invalide"; $text["invalid_action"] = "Action invalide"; $text["invalid_approval_status"] = "Statut d'approbation invalide"; $text["invalid_create_date_end"] = "Date de fin invalide pour la plage de dates de création."; $text["invalid_create_date_start"] = "Date de départ invalide pour la plage de dates de création."; $text["invalid_doc_id"] = "identifiant de document invalide"; $text["invalid_folder_id"] = "Identifiant de dossier invalide"; $text["invalid_group_id"] = "Identifiant de groupe invalide"; $text["invalid_link_id"] = "Identifiant de lien invalide"; $text["invalid_review_status"] = "Statut de révision invalide"; $text["invalid_sequence"] = "Valeur de séquence invalide"; $text["invalid_status"] = "Statut de document invalide"; $text["invalid_target_doc_id"] = "Identifiant de document cible invalide"; $text["invalid_target_folder"] = "Identifiant de dossier cible invalide"; $text["invalid_user_id"] = "Identifiant invalide"; $text["invalid_version"] = "Version de document invalid"; $text["is_admin"] = "Privilege Administrateur"; $text["js_no_approval_group"] = "SVP Sélectionnez un groupe d'approbation"; $text["js_no_approval_status"] = "SVP Sélectionnez le statut d'approbation"; $text["js_no_comment"] = "Il n'y a pas de commentaires"; $text["js_no_email"] = "Saisissez votre adresse e-mail"; $text["js_no_file"] = "SVP Sélectionnez un fichier"; $text["js_no_keywords"] = "Spécifiez quelques mots-clefs"; $text["js_no_login"] = "SVP Saisissez un identifiant"; $text["js_no_name"] = "SVP Saisissez un nom"; $text["js_no_override_status"] = "SVP Sélectionner le nouveau [override] statut"; $text["js_no_pwd"] = "Vous devez saisir votre mot de passe"; $text["js_no_query"] = "Saisir dans une requête"; $text["js_no_review_group"] = "SVP Sélectionner un groupe de révision"; $text["js_no_review_status"] = "SVP Sélectionner le statut de révision"; $text["js_pwd_not_conf"] = "Mot de passe et Confirmation de mot de passe non identiques"; $text["js_select_user_or_group"] = "Sélectionner au moins un utilisateur ou un groupe"; $text["js_select_user"] = "SVP Sélectionnez un utilisateur"; $text["keyword_exists"] = "Mot-clef déjà existant"; $text["keywords"] = "Mots-clefs"; $text["language"] = "Langage"; $text["last_update"] = "dernière mise à jour"; $text["last_updated_by"] = "Dernière mise à jour par"; $text["latest_version"] = "Dernière Version"; $text["linked_documents"] = "Documents liés"; $text["local_file"] = "Fichier local"; $text["lock_document"] = "Verrouillage"; $text["lock_message"] = "Ce document a été verrouillé par [username].
    seuls les utilisateurs autorisés peuvent déverrouiller ce document (voir fin de page)."; $text["lock_status"] = "Statut"; $text["locking_document"] = "Verrouillage de document..."; $text["logged_in_as"] = "Connecté"; $text["login_error_text"] = "Erreur à la connexion. Identifiant ou mot de passe incorrect."; $text["login_error_title"] = "Erreur de connexion"; $text["login_not_found"] = "Cet identifiant n'existe pas"; $text["login_not_given"] = "Identifiant non fourni"; $text["login_ok"] = "Connexion établie"; $text["login"] = "Connexion"; $text["logout"] = "Déconnexion"; $text["mime_type"] = "Mime-Type"; $text["move_document"] = "déplacer un document"; $text["move_folder"] = "Déplacer un dossier"; $text["move"] = "Déplacement"; $text["moving_document"] = "Déplacement de document..."; $text["moving_folder"] = "Déplacement de dossier..."; $text["msg_document_expired"] = "Le document \"[documentname]\" (Path: \"[path]\") a expiré le [expires]"; $text["msg_document_updated"] = "Le document \"[documentname]\" (Path: \"[path]\") a été créé ou mis à jour le [updated]"; $text["my_account"] = "Mon Compte"; $text["my_documents"] = "Mes Documents"; $text["name"] = "Nom"; $text["new_default_keyword_category"] = "Ajouter une catégorie"; $text["new_default_keywords"] = "Ajouter des mots-clefs"; $text["new_equals_old_state"] = "Attention : Le statut proposé et le statut existant sont identiques. Aucune action n'est nécessaire."; $text["new_user_image"] = "Nouvelle image"; $text["no_action_required"] = "n/a"; $text["no_action"] = "Aucune action n'est nécessaire"; $text["no_active_user_docs"] = "Il n'y a aucun document détenu par l'utilisateur qui nécessite une révision ou une approbation."; $text["no_approvers"] = "Aucun approbateur assigné."; $text["no_default_keywords"] = "Aucun mot-clef valable"; $text["no_docs_to_approve"] = "Aucun document ne nécessite actuellement une approbation."; $text["no_docs_to_review"] = "Aucun document ne nécessite actuellement une révision."; $text["no_document_links"] = "Aucun document lié"; $text["no_documents"] = "Aucun document"; $text["no_group_members"] = "Ce groupe ne contient pas de membre"; $text["no_groups"] = "Aucun groupe"; $text["no_previous_versions"] = "Aucune autre version trouvé"; $text["no_reviewers"] = "Aucun correcteur assigné."; $text["no_subfolders"] = "Aucun sous-dossier"; $text["no_update_cause_locked"] = "Vous ne pouvez actuellement pas mettre à jour ce document. Contactez l'utilisateur qui l'a verrouillé."; $text["no_user_image"] = "Aucune image trouvée"; $text["no"] = "Non"; $text["not_approver"] = "Utilisateur non actuellement déclaré comme approbateur de la version de ce document.."; $text["not_reviewer"] = "Utilisateur non actuellement déclaré comme correcteur de la version de ce document."; $text["notify_subject"] = "Nouveau ou document expiré dans MyDMS"; $text["obsolete"] = "Obsolete"; $text["old_folder"] = "ancien dossier"; $text["only_jpg_user_images"] = "Images d'utilisateur en .jpg seulement"; $text["op_finished"] = "Fait"; $text["operation_not_allowed"] = "Vous n'avez pas les droits pour faire cela"; $text["override_content_status_complete"] = "Forcage du statut achevée"; $text["override_content_status"] = "Forcer le statut"; $text["override_privilege_insufficient"] = "Accès refusé. Privilèges insuffisants pour passer outre le statut de ce fichier."; $text["overview"] = "Survol"; $text["owner"] = "Propriétaire"; $text["password"] = "Mot de passe"; $text["pending_approval"] = "Documents sous approbation"; $text["pending_review"] = "Documents sous révision"; $text["personal_default_keywords"] = "Mots-clefs personnels"; $text["previous_versions"] = "Versions précédentes"; $text["rejected"] = "Rejeté"; $text["released"] = "Réalisé"; $text["remove_document_link"] = "Effacer lien"; $text["remove_member"] = "Effacer membre"; $text["removed_approver"] = "a été retiré de la liste des approbateurs."; $text["removed_reviewer"] = "a été retiré de la liste des correcteurs."; $text["removing_default_keyword_category"] = "Effacement de la catégorie..."; $text["removing_default_keywords"] = "Effacement des mots-clefs..."; $text["removing_document_link"] = "Retrait du lien vers une document lié..."; $text["removing_document"] = "Effacement du document..."; $text["removing_folder"] = "Effacement du dossier..."; $text["removing_group"] = "Effacement du groupe..."; $text["removing_member"] = "Effacement du membre du groupe..."; $text["removing_user"] = "Effacement de l'utilisateur..."; $text["removing_version"] = "Effacement de la révision [version]..."; $text["review_document_complete_records_updated"] = "Révision de document achevée et enregistrement mis à jour"; $text["review_document_complete"] = "Révision de document: Achevée"; $text["review_document"] = "Révision de document"; $text["review_group"] = "Groupe de révision"; $text["review_status"] = "Statut de révision"; $text["review_summary"] = "Sommaire de révision"; $text["review_update_failed"] = "Erreur lors de la mise à jour de la révision. Mise à jour échouée."; $text["reviewer_added"] = "ajouté en tant que correcteur"; $text["reviewer_already_assigned"] = "est déjà déclaré en tant que correcteur"; $text["reviewer_already_removed"] = "a déjà été retiré du processus de révision ou a déjà soumis une révision"; $text["reviewer_no_privilege"] = "n'a pas assez de privilèges pour effectuer des révisions"; $text["reviewer_removed"] = "Retiré du processus de révision"; $text["reviewers"] = "Correcteurs"; $text["rm_default_keyword_category"] = "Effacer catégorie"; $text["rm_default_keywords"] = "Effacer mots-clefs"; $text["rm_document"] = "Effacer document"; $text["rm_folder"] = "Effacer dossier"; $text["rm_group"] = "Retirer ce groupe"; $text["rm_user"] = "Retirer cet utilisateur"; $text["rm_version"] = "Retirer version"; $text["root_folder"] = "Dossier racine"; $text["save"] = "Enregistrer"; $text["search_in_all"] = "Tous les dossiers"; $text["search_in_current"] = "Seulement dans ([foldername]) sous-dossiers inclus"; $text["search_in"] = "Rechercher dans"; $text["search_mode_and"] = "tous les mots"; $text["search_mode_or"] = "au moins un mot"; $text["search_mode"] = "Mode"; $text["search_no_results"] = "Il n'y a pas de documents correspondant à la recherche"; $text["search_query"] = "Recherche de"; $text["search_report"] = "Trouvé [count] documents"; $text["search_result_pending_approval"] = "status 'Sous approbation'"; $text["search_result_pending_review"] = "statut 'Sous révision'"; $text["search_results_access_filtered"] = "Les résultats de la recherche propose du contenu dont l'accès est refusé."; $text["search_results"] = "Résultats de recherche"; $text["search_time"] = "Temps écoulé: [time] sec."; $text["search"] = "Chercher"; $text["select_one"] = "Selectionner un item"; $text["selected_document"] = "Document sélectionné"; $text["selected_folder"] = "Dossier sélectionné"; $text["selection"] = "Sélection"; $text["seq_after"] = "Après \"[prevname]\""; $text["seq_end"] = "À la fin"; $text["seq_keep"] = "Conserver la position"; $text["seq_start"] = "Première position"; $text["sequence"] = "Séquence"; $text["set_default_access"] = "Réglage du mode d'accès par défaut"; $text["set_expiry"] = "Réglage de l'expiration"; $text["set_owner"] = "Réglage du propriétaire"; $text["set_reviewers_approvers"] = "Assignation des correcteurs et approbateurs"; $text["setting_expires"] = "Paramétrage d'expiration..."; $text["setting_owner"] = "Paramétrage d'utilisateur..."; $text["setting_user_image"] = "
    Configuration d'image pour un utilisateur..."; $text["show_all_versions"] = "Montrer toutes les versions"; $text["show_current_versions"] = "Montrer versions actuelles"; $text["start"] = "Démarrer"; $text["status_approval_rejected"] = "Approbation rejeté"; $text["status_approved"] = "Approuvé"; $text["status_approver_removed"] = "Approbateur retiré du processus"; $text["status_change_summary"] = "Révision de document changé du statut '[oldstatus]' à statut '[newstatus]'."; $text["status_changed_by"] = "Statut changé par"; $text["status_not_approved"] = "Non approuvé"; $text["status_not_reviewed"] = "Non révisé"; $text["status_reviewed"] = "Révisé"; $text["status_reviewer_rejected"] = "Révision rejeté"; $text["status_reviewer_removed"] = "Correcteur retiré du processus"; $text["status_unknown"] = "Inconnu"; $text["status"] = "Statut"; $text["subfolder_list"] = "Sous-dossiers"; $text["submit_approval"] = "Soumettre approbation"; $text["submit_login"] = "S'identifier in"; $text["submit_review"] = "Soumettre la révision"; $text["theme"] = "Theme"; $text["unable_to_add"] = "Impossible à ajouter"; $text["unable_to_remove"] = "Impossible à retirer"; $text["under_folder"] = "Dans le Dossier"; $text["unknown_command"] = "Commande non reconnue."; $text["unknown_group"] = "Identifiant de groupe inconnu"; $text["unknown_keyword_category"] = "Catégorie inconnue"; $text["unknown_owner"] = "Identifiant de propriétaire inconnu"; $text["unknown_user"] = "Identifiant d'utilisateur inconnu"; $text["unlock_cause_access_mode_all"] = "Vous pouvez encore le mettre à jour, car vous avez le mode d'accès \"tout\". Le verrouillage sera automatiquement annulé."; $text["unlock_cause_locking_user"] = "Vous pouvez encore le déverrouiller, car vous êtes le seul à l'avoir verrouillé. Le verrouillage sera automatiquement annulé."; $text["unlock_document"] = "Déverrouillage"; $text["unlocking_denied"] = "Vous ne possédez pas les droits pour déverrouiller ce document"; $text["unlocking_document"] = "Déverrouillage du document..."; $text["update_approvers"] = "Mise à jour de la liste d'Approbateurs"; $text["update_document"] = "Mise à jour"; $text["update_info"] = "Information de mise à jour"; $text["update_locked_msg"] = "Ce document est verrouillé."; $text["update_reviewers_approvers"] = "Mise à jour de la liste de Correcteurs et d'Approbateurs"; $text["update_reviewers"] = "Mise à jour de la liste de Correcteurs"; $text["update"] = "Mise à jour"; $text["updated_by"] = "Mis à jour par"; $text["updating_document"] = "Mise à jour du document..."; $text["upload_date"] = "Date de dépose"; $text["uploaded_by"] = "Déposé par"; $text["uploaded"] = "Déposé sur le serveur"; $text["uploading_failed"] = "Dépose du document échoué. SVP Contactez le responsable."; $text["use_default_keywords"] = "Utiliser les mots-clefs prédéfinis"; $text["user_already_approved"] = "Un utilisateur a déjà proposé une approbation de cette version de document"; $text["user_already_reviewed"] = "Un utilisateur a déjà proposé une révision de cette version de document"; $text["user_approval_not_required"] = "Aucune approbation du document nécessaire de utilisateur pour le moment."; $text["user_exists"] = "Utilisateur déjà existant."; $text["user_image"] = "Image"; $text["user_info"] = "Information Utilisateur"; $text["user_list"] = "Liste d'utilisateurs"; $text["user_login"] = "Identifiant utilisateur"; $text["user_management"] = "Utilisateurs"; $text["user_name"] = "Nom utilisateur"; $text["user_removed_approver"] = "Utilisateur a été retiré de la liste d'approbateurs individuels."; $text["user_removed_reviewer"] = "Utilisateur a été retiré de la liste de correcteurs individuels."; $text["user_review_not_required"] = "Pas de révision nécessaire d'utilisateur pour le moment."; $text["user"] = "Utilisateur"; $text["users"] = "Utilisateurs"; $text["version_info"] = "Information de Version"; $text["version_under_approval"] = "Version sous approbation"; $text["version_under_review"] = "Version sous révision"; $text["version"] = "Version"; $text["view_document"] = "Voir le Document"; $text["view_online"] = "Vue en ligne"; $text["warning"] = "Attention"; $text["wrong_pwd"] = "Votre mot de passe est incorrect. Essayez à nouveau."; $text["yes"] = "Oui"; +// New as of 1.7.1. Require updated translation. +$text["documents"] = "Documents"; $text["folders"] = "Folders"; $text["no_folders"] = "No folders"; $text["notification_summary"] = "Notification Summary"; +// New as of 1.7.2 +$text["all_pages"] = "All"; $text["help"] = "Help"; +$text["linked_files"] = "Attachments"; + +$text["edit_comment"] = "Edit comment"; +$text["versioning_info"] = "Versioning info"; +$text["documents_locked_by_you"] = "Documents locked by you"; +$text["group_approval_summary"] = "Group approval summary"; +$text["group_review_summary"] = "Group review summary"; +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archive creation"; +$text["files_deletion"] = "Files deletion"; +$text["folder"] = "Folder"; +$text["unknown_id"] = "unknown id"; + +$text["results_page"] = "Results Page"; +// New +$text["sign_out"] = "sign out"; +$text["signed_in_as"] = "Signed in as"; +$text["assign_reviewers"] = "Assign Reviewers"; +$text["assign_approvers"] = "Assign Approvers"; +$text["override_status"] = "Override Status"; +$text["change_status"] = "Change Status"; +$text["change_assignments"] = "Change Assignments"; +$text["no_user_docs"] = "There are currently no documents owned by the user"; +$text["disclaimer"] = "This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the english and international laws."; + +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archive creation"; +$text["files_deletion"] = "Files deletion"; +$text["folder"] = "Folder"; + +$text["unknown_id"] = "unknown id"; +$text["help"] = "Help"; + +$text["versioning_info"] = "Versioning info"; +$text["versioning_file_creation_warning"] = "With this operation you can create a file containing the versioning information of an entire DMS folder. After the creation every file will be saved inside the document folder."; +$text["archive_creation_warning"] = "With this operation you can create achive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup."; +$text["files_deletion_warning"] = "With this option you can delete all files of entire DMS folders. The versioning information will remain visible."; + +$text["backup_list"] = "Existings backup list"; +$text["backup_remove"] = "Remove backup file"; +$text["confirm_rm_backup"] = "Do you really want to remove the file \"[arkname]\"?
    Be careful: This action cannot be undone."; + +$text["document_deleted"] = "Document deleted"; +$text["linked_files"] = "Attachments"; +$text["invalid_file_id"] = "Invalid file ID"; +$text["rm_file"] = "Remove file"; +$text["confirm_rm_file"] = "Do you really want to remove file \"[name]\" of document \"[documentname]\"?
    Be careful: This action cannot be undone."; + +$text["edit_comment"] = "Edit comment"; + +// new from 1.9 + +$text["is_hidden"] = "Hide from users list"; +$text["log_management"] = "Log files management"; +$text["confirm_rm_log"] = "Do you really want to remove log file \"[logname]\"?
    Be careful: This action cannot be undone."; +$text["include_subdirectories"] = "Include subdirectories"; +$text["include_documents"] = "Include documents"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Toggle manager"; + +// new from 2.0 + +$text["calendar"] = "Calendar"; +$text["week_view"] = "Week view"; +$text["month_view"] = "Month view"; +$text["year_view"] = "Year View"; +$text["add_event"] = "Add event"; +$text["edit_event"] = "Edit event"; + +$text["january"] = "January"; +$text["february"] = "February"; +$text["march"] = "March"; +$text["april"] = "April"; +$text["may"] = "May"; +$text["june"] = "June"; +$text["july"] = "July"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "October"; +$text["november"] = "November"; +$text["december"] = "December"; + +$text["sunday"] = "Sunday"; +$text["monday"] = "Monday"; +$text["tuesday"] = "Tuesday"; +$text["wednesday"] = "Wednesday"; +$text["thursday"] = "Thursday"; +$text["friday"] = "Friday"; +$text["saturday"] = "Saturday"; + +$text["from"] = "From"; +$text["to"] = "To"; + +$text["event_details"] = "Event details"; +$text["confirm_rm_event"] = "Do you really want to remove event \"[name]\"?
    Be careful: This action cannot be undone."; + +$text["dump_creation"] = "DB dump creation"; +$text["dump_creation_warning"] = "With this operation you can create a dump file of your database content. After the creation the dump file will be saved in the data folder of your server."; +$text["dump_list"] = "Existings dump files"; +$text["dump_remove"] = "Remove dump file"; +$text["confirm_rm_dump"] = "Do you really want to remove the file \"[dumpname]\"?
    Be careful: This action cannot be undone."; + +$text["confirm_rm_user"] = "Do you really want to remove the user \"[username]\"?
    Be careful: This action cannot be undone."; +$text["confirm_rm_group"] = "Do you really want to remove the group \"[groupname]\"?
    Be careful: This action cannot be undone."; + +$text["human_readable"] = "Human readable archive"; + +$text["email_header"] = "This is an automatic message from the DMS server."; +$text["email_footer"] = "You can always change your e-mail settings using 'My Account' functions"; + +$text["add_multiple_files"] = "Add multiple files (will use filename as document name)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Maximum upload size for each file"; + +?> diff --git a/languages/German/help.htm b/languages/German/help.htm new file mode 100644 index 000000000..b7fa69458 --- /dev/null +++ b/languages/German/help.htm @@ -0,0 +1,7 @@ +

    TODO

    + + + + + + diff --git a/languages/German/lang.inc b/languages/German/lang.inc new file mode 100644 index 000000000..dffb97d32 --- /dev/null +++ b/languages/German/lang.inc @@ -0,0 +1,597 @@ +aktuellen Version"; +$text["comment"] = "Kommentar"; +$text["confirm_pwd"] = "Passwort-Bestätigung"; +$text["confirm_rm_document"] = "Wollen Sie das Dokument \"[documentname]\" wirklich löschen?
    Achtung: Dieser Vorgang kann nicht rückgängig gemacht werden."; +$text["confirm_rm_folder"] = "Wollen Sie den Ordner \"[foldername]\" mitsamt seines Inhalts wirklich löschen?
    Achtung: Dieser Vorgang kann nicht rückgängig gemacht werden."; +$text["confirm_rm_version"] = "Wollen Sie die Version [version] des Dokumentes \"[documentname]\" wirklich löschen?
    Achtung: Dieser Vorgang kann nicht rückgängig gemacht werden."; +$text["content"] = "Inhalt"; +$text["continue"] = "fortführen"; +$text["creating_new_default_keyword_category"] = "Erstelle neue Kategorie..."; +$text["creation_date"] = "Erstellt am"; +$text["current_version"] = "Aktuelle Version"; +$text["default_access"] = "Standardberechtigung"; +$text["default_keyword_category_name"] = "Kategorien-Name"; +$text["default_keyword_category"] = "Kategorien"; +$text["default_keywords"] = "Vorlagen"; +$text["delete_last_version"] = "Dokument hat nur eine Neuausgabe. Gesamte Dokumentaufzeichnung löschen..."; +$text["delete"] = "Löschen"; +$text["deleting_document_notify"] = "Entferne Benachrichtigung..."; +$text["deleting_folder_notify"] = "Lösche Benachrichtigung..."; +$text["details"] = "Details"; +$text["details_version"] = "Details für Version:[version]"; +$text["document_access_again"] = "Rechte erneut bearbeiten"; +$text["document_add_access"] = "Füge Berechtigung hinzu..."; +$text["document_already_locked"] = "Dieses Dokument ist bereits gesperrt"; +$text["document_del_access"] = "Entferne Berechtigung..."; +$text["document_edit_access"] = "Bearbeite Berechtigung..."; +$text["document_infos"] = "Informationen"; +$text["document_is_not_locked"] = "Dieses Dokument ist nicht gesperrt"; +$text["document_link_by"] = "Verweis erstellt von"; +$text["document_link_public"] = "Für alle sichtbar"; +$text["document_list"] = "Dokumente"; +$text["document_notify_again"] = "Benachrichtigungen anzeigen"; +$text["document_overview"] = "Dokumentübersicht"; +$text["document_set_default_access"] = "Setze Standard-Berechtigung..."; +$text["document_set_inherit"] = "Umstellen auf Rechte-Vererbung..."; +$text["document_set_not_inherit_copy"] = "Kopiere Berechtigungen..."; +$text["document_set_not_inherit_empty"] = "Entferne Rechte-Vererbung (leere ACL)..."; +$text["document_status"] = "Dokumenten Status"; +$text["document_title"] = "Dokument '[documentname]'"; +$text["document_versions"] = "Alle Versionen"; +$text["document"] = "Dokument"; +$text["documents_in_process"] = "Dokumente in Bearbeitung"; +$text["documents_locked_by_you"] = "Von mir gesperrte Dokumente"; +$text["documents_owned_by_user"] = "Dokumente gehören einem Benutzer"; +$text["documents_to_approve"] = "Freigabe erforderlich"; +$text["documents_to_review"] = "Prüfung erforderlich"; +$text["documents_user_requiring_attention"] = "Diese Dokumente sollte ich mal nachsehen"; +$text["does_not_expire"] = "Keine Gültigkeit"; +$text["does_not_inherit_access_msg"] = "Berechtigungen wieder erben"; +$text["download"] = "Download"; +$text["draft_pending_approval"] = "Entwurf - bevorstehende Freigabe"; +$text["draft_pending_review"] = "Entwurf - bevorstehende Prüfung"; +$text["edit_comment"] = "Kommentar bearbeiten"; +$text["edit_default_keyword_category"] = "Kategorien bearbeiten"; +$text["edit_default_keywords"] = "Stichwort-Vorlage bearbeiten"; +$text["edit_document_access"] = "Zugriffsrechte bearbeiten"; +$text["edit_document_notify"] = "Benachrichtigungen"; +$text["edit_document_props_again"] = "Erneut bearbeiten"; +$text["edit_document_props"] = "Bearbeiten"; +$text["edit_document"] = "Dokument bearbeiten"; +$text["edit_existing_access"] = "Bestehende Berechtigungen bearbeiten"; +$text["edit_existing_notify"] = "Liste bearbeiten"; +$text["edit_folder_access"] = "Zugriffsrechte bearbeiten"; +$text["edit_folder_notify"] = "Ordner Benachrichtigungen bearbeiten"; +$text["edit_folder_props_again"] = "Ordner nochmals bearbeiten"; +$text["edit_folder_props"] = "Ordner bearbeiten"; +$text["edit_folder"] = "Ordner bearbeiten"; +$text["edit_group"] = "Gruppe bearbeiten"; +$text["edit_inherit_access"] = "Berechtigungen erben"; +$text["edit_personal_default_keywords"] = "Persönliche Stichwortvorlagen bearbeiten"; +$text["edit_user_details"] = "Benutzerdetails bearbeiten"; +$text["edit_user"] = "Benutzer bearbeiten"; +$text["edit"] = "bearbeiten"; +$text["editing_default_keyword_category"] = "Ändere Kategorie..."; +$text["editing_default_keywords"] = "Ändere Stichwort-Vorlage..."; +$text["editing_document_props"] = "Bearbeite Dokument-Eigenschaften..."; +$text["editing_folder_props"] = "Bearbeite Ordner-Eigenschaften..."; +$text["editing_group"] = "Bearbeite Gruppe..."; +$text["editing_user_data"] = "Bearbeite Benutzerdaten..."; +$text["editing_user"] = "Bearbeite Benutzer..."; +$text["email_err_group"] = "Fehler: Email konnte an einen oder mehrere Mitgliedern dieser Gruppe nicht geschickt werden."; +$text["email_err_user"] = "Fehler: Email konnte nicht an Benutzer gesendet werden."; +$text["email_sent"] = "Email gesendet"; +$text["email"] = "Email"; +$text["empty_access_list"] = "Keine Berechtigungen gesetzt"; +$text["empty_notify_list"] = "Keine Benachrichtigungen"; +$text["error_adding_session"] = "Ein Fehler ist bei dem Erstellen der Sitzung aufgetreten"; +$text["error_occured"] = "Ein Fehler ist aufgetreten.
    Bitte Administrator benachrichtigen.

    "; +$text["error_removing_old_sessions"] = "Ein Fehler ist bei dem Entfernen der alten Sitzung aufgetreten"; +$text["error_updating_revision"] = "Fehler bei der Aktualisierung des Dokumentenstatus"; +$text["exp_date"] = "gültig bis"; +$text["expired"] = "abgelaufen"; +$text["expires"] = "Gültigkeit"; +$text["file_info"] = "Datei Information"; +$text["file_size"] = "Dateigröße"; +$text["file"] = "Datei"; +$text["files"] = "Dateien"; +$text["files_deletion"] = "Datei Löschungen"; +$text["files_deletion_warning"] = "Hiermit können Sie alle Dateien eines DMS-Vezeichnisses löschen. Die Versionierungs-Informationen bleiben sichtbar."; +$text["folder"] = "Ordner"; +$text["folder_access_again"] = "Berechtigungen erneut bearbeiten"; +$text["folder_add_access"] = "Füge Berechtigung hinzu..."; +$text["folder_contents"] = "Ordner enthält"; +$text["folder_del_access"] = "Berechtigung übernehmen..."; +$text["folder_edit_access"] = "Ändere Berechtigung..."; +$text["folder_infos"] = "Informationen"; +$text["folder_notify_again"] = "Benachrichtigungen anzeigen"; +$text["folder_overview"] = "Ordnerübersicht"; +$text["folder_path"] = "Pfad"; +$text["folder_set_default_access"] = "Setze Standard-Berechtigung für Ordner..."; +$text["folder_set_inherit"] = "Umstellen auf Rechte-Vererbung..."; +$text["folder_set_not_inherit_copy"] = "Kopiere Berechtigungen..."; +$text["folder_set_not_inherit_empty"] = "Entferne Rechte-Vererbung (leere ACL)..."; +$text["folder_title"] = "LetoDMS - Ordner: [foldername]"; +$text["folders_and_documents_statistic"] = "Ordner- und Dokumenten-Übersicht"; +$text["foldertree"] = "Ordnerstruktur"; +$text["from_approval_process"] = "vom Freigabesprozess"; +$text["from_review_process"] = "vom Überprüfungsprozess"; +$text["global_default_keywords"] = "Globale Kategorien"; +$text["goto"] = "Gehe zu"; +$text["group_already_approved"] = "Eine Freigabe ist bereits im Namen der Gruppe eingereicht worden"; +$text["group_already_reviewed"] = "Eine Prüfung ist bereits im Namen der Gruppe eingereicht worden"; +$text["group_approvers"] = "Gruppe: Freigebender"; +$text["group_approval_summary"] = "Freigabe-Gruppen"; +$text["group_email_sent"] = "Email wurde an Gruppenteilnehmer gesendet"; +$text["group_exists"] = "Gruppe existiert bereits"; +$text["group_management"] = "Gruppenverwaltung"; +$text["group_members"] = "Gruppenmitglieder"; +$text["group_reviewers"] = "Prüfungsgruppen"; +$text["group_review_summary"] = "Prüfergruppen"; +$text["group_unable_to_add"] = "Gruppe kann nicht hinzugefügt werden"; +$text["group_unable_to_remove"] = "Gruppe kann nicht entfernt werden"; +$text["group"] = "Gruppe"; +$text["groups"] = "Gruppen"; +$text["guest_login_disabled"] = "Anmeldung als Gast ist gesperrt."; +$text["guest_login"] = "Als Gast anmelden"; +$text["help"] = "Hilfe"; +$text["individual_approvers"] = "individueller Freigebender"; +$text["individual_reviewers"] = "individueller Prüfer"; +$text["individuals"] = "Einzelpersonen"; +$text["inherits_access_msg"] = "Im Momemt werden die Rechte geerbt

    Berechtigungen kopieren
    Leere ACL"; +$text["internal_error_exit"] = "Interner Fehler: nicht imstande, Antrag durchzuführen. Herausnehmen. verlassen."; +$text["internal_error"] = "Interner Fehler"; +$text["invalid_access_mode"] = "Unzulässige Zugangsart"; +$text["invalid_action"] = "Unzulässige Aktion"; +$text["invalid_approval_status"] = "Unzulässiger Freigabestatus"; +$text["invalid_create_date_end"] = "Unzulässiges Enddatum für Erstellung des Datumsbereichs."; +$text["invalid_create_date_start"] = "Unzulässiges Startdatum für Erstellung des Datumsbereichs."; +$text["invalid_doc_id"] = "Unzulässige Dokumentenidentifikation"; +$text["invalid_folder_id"] = "Unzulässige Ordneridentifikation"; +$text["invalid_group_id"] = "Unzulässige Gruppenidentifikation"; +$text["invalid_link_id"] = "Unzulässige Linkbezeichnung"; +$text["invalid_review_status"] = "Unzulässiger Überprüfungssstatus"; +$text["invalid_sequence"] = "Unzulässige Reihenfolge der Werte"; +$text["invalid_status"] = "Unzulässiger Dokumentenstatus"; +$text["invalid_target_doc_id"] = "Unzulässige Ziel-Dokument Identifikation"; +$text["invalid_target_folder"] = "Unzulässige Ziel-Ordner Identifikation"; +$text["invalid_user_id"] = "Unzulässige Benutzernummer"; +$text["invalid_version"] = "Unzulässige Dokumenten-Version"; +$text["is_admin"] = "Verwalter(Administrator)-Privileg"; +$text["js_no_approval_group"] = "Wählen Sie bitte eine Freigabe-Gruppe aus"; +$text["js_no_approval_status"] = "Wählen Sie bitte einen Freigabe-Status aus"; +$text["js_no_comment"] = "Geben Sie einen Kommentar an"; +$text["js_no_email"] = "Geben Sie eine Email-Adresse an"; +$text["js_no_file"] = "Bitte wählen Sie eine Datei"; +$text["js_no_keywords"] = "Geben Sie einige Stichwörter an"; +$text["js_no_login"] = "Geben Sie einen Benutzernamen ein"; +$text["js_no_name"] = "Sie haben den Namen vergessen"; +$text["js_no_override_status"] = "Bitte wählen Sie einen neuen Status aus"; +$text["js_no_pwd"] = "Sie müssen ein Passwort eingeben"; +$text["js_no_query"] = "Geben Sie einen Suchbegriff ein"; +$text["js_no_review_group"] = "Bitte wählen Sie eine Prüfer-Gruppe"; +$text["js_no_review_status"] = "Bitte wählen Sie einen Prüfungs-Status"; +$text["js_pwd_not_conf"] = "Passwort und -Bestätigung stimmen nicht überein"; +$text["js_select_user_or_group"] = "Wählen Sie mindestens einen Benutzer oder eine Gruppe aus"; +$text["js_select_user"] = "Bitte einen Benutzer auswählen"; +$text["keyword_exists"] = "Stichwort besteht bereits"; +$text["keywords"] = "Stichworte"; +$text["language"] = "Sprache"; +$text["last_update"] = "Letzte Aktualisierung"; +$text["last_updated_by"] = "Letzte Aktualisierung durch"; +$text["latest_version"] = "neuste Version"; +$text["linked_documents"] = "verknüpfte Dokumente"; +$text["linked_files"] = "verknüpfte Dateien"; +$text["local_file"] = "Lokale Datei"; +$text["lock_document"] = "Sperren"; +$text["lock_message"] = "Diese Datei wurde von Benutzer [username] gesperrt.
    Die Sperrung kann von authorisierten Benutzern hier aufgehoben werden (siehe Ende der Seite)."; +$text["lock_status"] = "Status"; +$text["locking_document"] = "Richte Sperre ein..."; +$text["logged_in_as"] = "Angemeldet als"; +$text["login_error_text"] = "Fehler bei der Anmeldung. Benutzernummer oder Passwort falsch."; +$text["login_error_title"] = "Fehler bei der Anmeldung"; +$text["login_not_found"] = "Fehler: Benutzername nicht gefunden"; +$text["login_not_given"] = "Es wurde kein Benutzername eingegeben"; +$text["login_ok"] = "Anmeldung erfolgreich"; +$text["login"] = "Anmeldung"; +$text["logout"] = "Abmelden"; +$text["mime_type"] = "Mime-Typ"; +$text["move_document"] = "Dokument verschieben"; +$text["move_folder"] = "Ordner verschieben"; +$text["move"] = "verschieben"; +$text["moving_document"] = "Verschiebe Dokument..."; +$text["moving_folder"] = "Verschiebe Ordner..."; +$text["msg_document_expired"] = "Das Dokument \"[documentname]\" (Pfad: \"[path]\") ist nur gültig bis zum [expires]"; +$text["msg_document_updated"] = "Das Dokument \"[documentname]\" (Pfad: \"[path]\") wurde am [updated] neu erstellt oder erneurt"; +$text["my_account"] = "Mein Profil"; +$text["my_documents"] = "Meine Dokumente"; +$text["name"] = "Name"; +$text["new_default_keyword_category"] = "Neue Kategorie"; +$text["new_default_keywords"] = "Neue Vorlage"; +$text["new_equals_old_state"] = "Warnung: Vorgeschlagener Status und vorhandener Status sind identisch. Keine Aktion erforderlich."; +$text["new_user_image"] = "Neues Bild"; +$text["no_action_required"] = "n/a"; +$text["no_action"] = "Keine Aktion erforderlich."; +$text["no_active_user_docs"] = "Benutzer besitzt z.Z. keine Dokumente, die einer Prüfung oder Freigabe erfordern."; +$text["no_approvers"] = "Keine Freigebenden zugewiesen."; +$text["no_default_keywords"] = "Keine Vorlagen vorhanden"; +$text["no_docs_to_approve"] = "Es gibt z.Z. keine Dokumente, die eine Freigabe erfordern."; +$text["no_docs_to_review"] = "Es gibt z.Z. keine Dokumente, die eine Prüfung erfordern."; +$text["no_document_links"] = "Keine verwandten Dokumente"; +$text["no_documents"] = "Keine Dokumente"; +$text["no_group_members"] = "Diese Gruppe hat keine Mitglieder"; +$text["no_groups"] = "keine Gruppen"; +$text["no_previous_versions"] = "Keine anderen Versionen gefunden"; +$text["no_reviewers"] = "Keine Prüfer zugewiesen."; +$text["no_subfolders"] = "Keine Unterordner"; +$text["no_update_cause_locked"] = "Sie können daher im Moment diese Datei nicht aktualisieren. Wenden Sie sich an den Benutzer, der die Sperrung eingerichtet hat"; +$text["no_user_image"] = "Kein Bild vorhanden"; +$text["no"] = "Nein"; +$text["not_approver"] = "Benutzer ist dieser Dokumentenänderung z.Z. nicht als Freigebender zugewiesen."; +$text["not_reviewer"] = "Benutzer ist dieser Dokumentenänderung z.Z. nicht als Prüfer zugewiesen."; +$text["notify_added_email"] = "Benachrichtigung per Mail wurde eingerichtet"; +$text["notify_subject"] = "Neue oder veraltete Inhalte im DMS"; +$text["obsolete"] = "veraltet"; +$text["old_folder"] = "alter Ordner"; +$text["only_jpg_user_images"] = "Es sind nur JPG-Bilder erlaubt"; +$text["op_finished"] = "fertig.

    "; +$text["operation_not_allowed"] = "Sie besitzen nicht die nötigen Zugriffsrechte"; +$text["override_content_status_complete"] = "Erneuerungsstatus vollständig"; +$text["override_content_status"] = "Erneuerungsstatus"; +$text["override_privilege_insufficient"] = "Zugriff verweigerte. Unzureichende Privilegien, den Status dieses Dokumentes zu erneueren."; +$text["overview"] = "Überblick"; +$text["owner"] = "Besitzer"; +$text["password"] = "Passwort"; +$text["pending_approval"] = "Ausstehende Freigabe der Dokumente"; +$text["pending_review"] = "Ausstehende Prüfung der Dokumente"; +$text["personal_default_keywords"] = "Persönliche Kategorien"; +$text["previous_versions"] = "Vorhergehende Versionen"; +$text["rejected"] = "abgelehnt"; +$text["released"] = "freigegeben"; +$text["remove_document_link"] = "Verweis entfernen"; +$text["remove_member"] = "Entfernen"; +$text["removed_approver"] = "ist von der Freigeber-Liste entfernt worden."; +$text["removed_reviewer"] = "ist von der Prüfer-Liste entfernt worden."; +$text["removing_default_keyword_category"] = "Entferne Kategorie..."; +$text["removing_default_keywords"] = "Entferne Stichwort-Vorlage..."; +$text["removing_document_link"] = "Entferne Verweis auf verwandtes Dokument..."; +$text["removing_document"] = "Entferne Dokument..."; +$text["removing_folder"] = "Entferne Ordner..."; +$text["removing_group"] = "Lösche Gruppe..."; +$text["removing_member"] = "Entferne Benutzer aus Gruppe..."; +$text["removing_user"] = "Lösche Benutzer..."; +$text["removing_version"] = "Entferne Version [version]..."; +$text["review_document_complete_records_updated"] = "Dokumentenprüfung vollständig durchgeführt und Aufzeichnungen aktualisiert"; +$text["review_document_complete"] = "Dokumentenprüfung: Vollständig"; +$text["review_document"] = "Dokument prüfen"; +$text["review_group"] = "Gruppe: prüfen"; +$text["review_status"] = "Status: prüfen"; +$text["review_summary"] = "Übersicht Prüfungen"; +$text["review_update_failed"] = "Störung bei Aktualisierung des Prüfstatus. Aktualisierung gescheitert."; +$text["reviewer_added"] = "Prüfer hinzugefügt"; +$text["reviewer_already_assigned"] = "Prüfer bereits zugewiesen"; +$text["reviewer_already_removed"] = "Prüfer wurde bereits aus dem Prüfvorgang entfernt oder hat die Prüfung bereits abgeschlossen"; +$text["reviewer_no_privilege"] = "Prüfer ist nicht privilegiert dieses Dokument zu prüfen"; +$text["reviewer_removed"] = "wurde aus Prüfvorgang entfernt"; +$text["reviewers"] = "Prüfer"; +$text["rm_default_keyword_category"] = "Kategorie löschen"; +$text["rm_default_keywords"] = "Stichwort-Vorlage löschen"; +$text["rm_document"] = "Löschen"; +$text["rm_folder"] = "Ordner löschen"; +$text["rm_group"] = "Diese Gruppe löschen"; +$text["rm_user"] = "Diesen Benutzer löschen"; +$text["rm_version"] = "Version löschen"; +$text["root_folder"] = "Übersicht"; +$text["save"] = "Speichern"; +$text["search_in_all"] = "allen Ordnern"; +$text["search_in_current"] = "diesem Ordner ([foldername])"; +$text["search_in"] = "Suchen in"; +$text["search_mode_and"] = "alle Begriffe"; +$text["search_mode_or"] = "min. ein Begriff"; +$text["search_mode"] = "Suchmodus"; +$text["search_no_results"] = "Die Suche lieferte leider keine Treffer."; +$text["search_query"] = "Suchbegriffe"; +$text["search_report"] = "Die Suche lieferte [count] Treffer"; +$text["search_result_pending_approval"] = "Status 'ausstehende Freigabe'"; +$text["search_result_pending_review"] = "Status 'bevorstehende Prüfung'"; +$text["search_results_access_filtered"] = "Suchresultate können Inhalte enthalten, zu welchen der Zugang verweigert wurde."; +$text["search_results"] = "Suchergebnis"; +$text["search_time"] = "Dauer: [time] sek."; +$text["search"] = "Suchen"; +$text["select_one"] = "Bitte wählen"; +$text["selected_document"] = "Aktuelles Dokument"; +$text["selected_folder"] = "Aktueller Ordner"; +$text["selection"] = "Auswahl"; +$text["seq_after"] = "Nach \"[prevname]\""; +$text["seq_end"] = "Ans Ende"; +$text["seq_keep"] = "Beibehalten"; +$text["seq_start"] = "An den Anfang"; +$text["sequence"] = "Reihenfolge"; +$text["set_default_access"] = "als Standardzugriff festlegen"; +$text["set_expiry"] = "Gültigkeit festlegen"; +$text["set_owner"] = "Besitzer festlegen"; +$text["set_reviewers_approvers"] = "Freigebender und Prüfer zuweisen"; +$text["setting_expires"] = "Setze neue Gültigkeit..."; +$text["setting_owner"] = "Ändere Besitzer..."; +$text["setting_user_image"] = "Setze Benutzer-Bild..."; +$text["show_all_versions"] = "Alle Versionen anzeigen"; +$text["show_current_versions"] = "aktuelle Version anzeigen"; +$text["start"] = "Starten"; +$text["status_approval_rejected"] = "Entwurf abgelehnt"; +$text["status_approved"] = "freigegeben"; +$text["status_approver_removed"] = "Freigebender wurde vom Prozess ausgeschlossen"; +$text["status_change_summary"] = "Status der neuen Dokumentenversion geändert von '[oldstatus]' zu '[newstatus]'."; +$text["status_changed_by"] = "Status wurde geändert von"; +$text["status_not_approved"] = "keine Freigabe"; +$text["status_not_reviewed"] = "nicht geprüft"; +$text["status_reviewed"] = "geprüft"; +$text["status_reviewer_rejected"] = "Entwurf abgelehnt"; +$text["status_reviewer_removed"] = "Prüfer wurde vom Prozess ausgeschlossen"; +$text["status_unknown"] = "unbekannt"; +$text["status"] = "Status"; +$text["storage_size"] = "Speicherverbrauch"; +$text["subfolder_list"] = "Unterordner"; +$text["submit_approval"] = "Freigabe hinzufügen"; +$text["submit_login"] = "Anmelden"; +$text["submit_review"] = "Überprüfung hinzufügen"; +$text["theme"] = "Aussehen"; +$text["unable_to_add"] = "Hinzufügen nicht möglich"; +$text["unable_to_remove"] = "Entfernen nicht möglich"; +$text["under_folder"] = "In Ordner"; +$text["unknown_command"] = "unbekannter Befehl"; +$text["unknown_group"] = "unbekannte Gruppenidentifikation"; +$text["unknown_keyword_category"] = "unbekannte Kategorie"; +$text["unknown_owner"] = "unbekannte Besitzeridentifikation"; +$text["unknown_user"] = "unbekannte Benutzeridentifikation"; +$text["unlock_cause_access_mode_all"] = "Sie verfügen jedoch über unbeschränken Zugriff auf dieses Dokument.
    Daher wird die Sperrung beim Update automatisch aufgehoben"; +$text["unlock_cause_locking_user"] = "Sie sind im Moment mit demselben Benutzer angemeldet.
    Daher wird die Sperrung beim Update automatisch aufgehoben"; +$text["unlock_document"] = "Sperrung aufheben"; +$text["unlocking_denied"] = "Sie verfügen nicht über die nötigen Rechte um die Sperrung aufzuheben"; +$text["unlocking_document"] = "Hebe Sperrung des Dokumentes auf..."; +$text["update_approvers"] = "Liste der Freigebenden aktualisieren"; +$text["update_document"] = "aktualisiere"; +$text["update_info"] = "Informationen zur Aktualisierung"; +$text["update_locked_msg"] = "Dieses Dokument wurde gesperrt

    Die Sperrung wurde von [username] eingerichtet.
    "; +$text["update_reviewers_approvers"] = "aktualisiere Liste der Freigebenden und Prüfer"; +$text["update_reviewers"] = "Liste der Prüfer aktualisieren"; +$text["update"] = "aktualisiere"; +$text["updated_by"] = "aktualisiert von"; +$text["updating_document"] = "Führe Update durch..."; +$text["upload_date"] = "Hochgeladen am"; +$text["uploaded_by"] = "Hochgeladen durch"; +$text["uploaded"] = "Hochgeladen"; +$text["uploading_failed"] = "Das Hochladen der Datei ist fehlgeschlagen.
    Bitte Administrator benachrichtigen

    "; +$text["use_default_keywords"] = "Stichwortvorlagen"; +$text["user_already_approved"] = "Benutzer hat bereits eine Freigabe dieser Dokumentversion eingereicht"; +$text["user_already_reviewed"] = "Benutzer hat bereits einen Bericht über diese Dokumentversion eingereicht"; +$text["user_approval_not_required"] = "Eine Dokumentfreigabe von dem Benutzer ist diesmal nicht erforderlich."; +$text["user_exists"] = "Benutzer besteht bereits."; +$text["user_image"] = "Bild"; +$text["user_info"] = "Benutzerinformation"; +$text["user_list"] = "Benutzerübersicht"; +$text["user_login"] = "Benutzername"; +$text["user_management"] = "Benutzerverwaltung"; +$text["user_name"] = "Vollst. Name"; +$text["user_removed_approver"] = "Benutzer ist von der Liste der einzelnen Freigebenden entfernt worden."; +$text["user_removed_reviewer"] = "Benutzer ist von der Liste der einzelnen Prüfer entfernt worden."; +$text["user_review_not_required"] = "Eine Dokumentüberprüfung von dem Benutzer ist diesmal nicht erforderlich."; +$text["user"] = "Benutzer"; +$text["users"] = "Benutzer"; +$text["version_info"] = "Version Information"; +$text["version_under_approval"] = "Version im Prozess der Freigabe"; +$text["version_under_review"] = "Version im Prozess der Prüfung"; +$text["version"] = "Version"; +$text["versioning_file_creation_warning"] = "Sie erzeugen eine Datei die sämtliche Versions-Informationen eines DMS-Verzeichnisses enthält. Nach Erstellung wird jede Datei im Dokumentenverzeichnis gespeichert."; +$text["versioning_file_creation"] = "Datei-Versionierung"; +$text["view_document"] = "Dokument anzeigen"; +$text["view_online"] = "Online betrachten"; +$text["warning"] = "Warnung"; +$text["wrong_pwd"] = "Fehler: Falsches Passwort"; +$text["yes"] = "Ja"; +// New as of 1.7.1. Require updated translation. +$text["documents"] = "Dokumente"; +$text["folders"] = "Verzeichnisse"; +$text["no_folders"] = "Keine Verzeichnisse"; +$text["notification_summary"] = "Benachrichtigungs-Zusammenfassung"; +// New as of 1.7.2 +$text["all_pages"] = "Alle"; +$text["results_page"] = "Ergebnis-Seite"; + +// New +$text["sign_out"] = "Abmelden"; +$text["signed_in_as"] = "Angemeldet als"; +$text["assign_reviewers"] = "Prüfer zuweisen"; +$text["assign_approvers"] = "Freigebende zuweisen"; +$text["override_status"] = "Status überschreiben"; +$text["change_status"] = "Status ändern"; +$text["change_assignments"] = "Zuweisungen ändern"; +$text["no_user_docs"] = "Der Benutzer hat derzeit keine Dokumente in Besitz"; +$text["disclaimer"] = "Dies ist ein geschützter Bereich. Nur authorisiertes Personal hat Zugriff. Jegliche Verstösse werden nach geltendem Recht (Englisch und International) verfolgt."; + +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archiv erzeugen"; +$text["files_deletion"] = "Dateien löschen"; + +$text["unknown_id"] = "unbekannte id"; +$text["help"] = "Hilfe"; + +$text["versioning_info"] = "Versioning info"; +$text["versioning_file_creation_warning"] = "With this operation you can create a file containing the versioning information of an entire DMS folder. After the creation every file will be saved inside the document folder."; +$text["archive_creation_warning"] = "Mit dieser Operation können Sie ein Archiv mit allen Dokumenten des DMS erzeugen. Nach der Erstellung wird das Archiv im Datenordner Ihres Servers gespeichert.
    Warning: ein menschenlesbares Archiv ist als Server-Backup unbrauchbar."; +$text["files_deletion_warning"] = "Durch diese Operation können Sie all Dokumente des DMS löschen. Die Versions-Information bleibt erhalten."; + +$text["backup_list"] = "Liste vorhandener Backups"; +$text["backup_remove"] = "Backup löschen"; +$text["confirm_rm_backup"] = "Möchten Sie wirklich das Backup \"[arkname]\" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann."; + +$text["document_deleted"] = "Dokument gelöscht"; +$text["linked_files"] = "Anhänge"; +$text["invalid_file_id"] = "Ungültige Datei-ID"; +$text["rm_file"] = "Datei Löschen"; +$text["confirm_rm_file"] = "Möchten Sie wirklich die Datei \"[name]\" des Dokuments \"[documentname]\" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann."; + +$text["edit_comment"] = "Kommentar editieren"; + + +// new from 1.9 + +$text["is_hidden"] = "In der Benutzerliste verbergen"; +$text["log_management"] = "Management der Log-Dateien"; +$text["confirm_rm_log"] = "Möchten Sie wirklich die Log-Datei \"[logname]\" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann."; +$text["include_subdirectories"] = "Unterverzeichnisse miteinbeziehen"; +$text["include_documents"] = "Dokumente miteinbeziehen"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Toggle manager"; + +// new from 1.10 + +$text["calendar"] = "Kalendar"; +$text["week_view"] = "Wochenansicht"; +$text["month_view"] = "Monatsansicht"; +$text["year_view"] = "Jahresansicht"; +$text["add_event"] = "Ereignis hinzufügen"; +$text["edit_event"] = "Ereignis editieren"; + +$text["january"] = "Januar"; +$text["february"] = "Februar"; +$text["march"] = "März"; +$text["april"] = "April"; +$text["may"] = "Mai"; +$text["june"] = "Juni"; +$text["july"] = "Juli"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "Oktober"; +$text["november"] = "November"; +$text["december"] = "Dezember"; + +$text["sunday"] = "Sontag"; +$text["monday"] = "Montag"; +$text["tuesday"] = "Dienstag"; +$text["wednesday"] = "Mitwoch"; +$text["thursday"] = "Donnerstag"; +$text["friday"] = "Freitag"; +$text["saturday"] = "Samstag"; + +$text["from"] = "von"; +$text["to"] = "bis"; + +$text["event_details"] = "Ereignisdetails"; +$text["confirm_rm_event"] = "Möchten Sie wirklich das Ereignis \"[name]\" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann."; + +$text["dump_creation"] = "DB dump erzeugen"; +$text["dump_creation_warning"] = "Mit dieser Operation können Sie einen Dump der Datenbank erzeugen. Nach der Erstellung wird der Dump im Datenordner Ihres Servers gespeichert."; +$text["dump_list"] = "Vorhandene DB dumps"; +$text["dump_remove"] = "DB dump löschen"; +$text["confirm_rm_dump"] = "Möchten Sie wirklich den DB dump \"[dumpname]\" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann."; + +$text["confirm_rm_user"] = "Möchten Sie wirklich den Benutzer \"[username]\" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann."; +$text["confirm_rm_group"] = "Möchten Sie wirklich die Gruppe \"[groupname]\" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann."; + +$text["human_readable"] = "Menschenlesbares Archiv"; + +$text["email_header"] = "Dies ist eine automatische Nachricht des DMS-Servers."; +$text["email_footer"] = "You can always change your e-mail settings using 'My Account' functions"; + +$text["add_multiple_files"] = "Mehrere Dateien hochladen (Dateiname wird als Dokumentenname verwendet)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Maximale Größe einer hochgeladenen Datei"; + +?> diff --git a/languages/Hungarian/help.htm b/languages/Hungarian/help.htm new file mode 100644 index 000000000..b7fa69458 --- /dev/null +++ b/languages/Hungarian/help.htm @@ -0,0 +1,7 @@ +

    TODO

    + + + + + + diff --git a/languages/Hungarian/lang.inc b/languages/Hungarian/lang.inc new file mode 100644 index 000000000..6365d3da6 --- /dev/null +++ b/languages/Hungarian/lang.inc @@ -0,0 +1,579 @@ + Legyen vatos! Ezt a mveletet nem lehet visszavonni."; +$text["confirm_rm_folder"] = "Valban t÷r÷lni akarja a(z) \"[foldername]\" k÷nyvtßrat ‰s annak tartalmßt?
    Legyen vatos! Ezt a mveletet nem lehet visszavonni."; +$text["confirm_rm_version"] = "Valban t÷r÷lni akarja a(z) [version]. verzijßt a(z) \"[documentname]\" dokumentumnak?
    Legyen vatos! Ezt a mveletet nem lehet visszavonni."; +$text["content"] = "Tartalom"; +$text["continue"] = "Continue"; +$text["creating_new_default_keyword_category"] = "Kategria felv‰tele..."; +$text["creation_date"] = "L‰trehozva"; +$text["current_version"] = "Aktußlis verzi"; +$text["default_access"] = "Alapbeßlltßs szerinti jogosultsßg"; +$text["default_keyword_category"] = "Kategrißk"; +$text["default_keyword_category_name"] = "N‰v"; +$text["default_keywords"] = "Rendelkez‰sre ßll kulcsszavak"; +$text["delete"] = "T÷rl‰s"; +$text["delete_last_version"] = "Document has only one revision. Deleting entire document record..."; +$text["deleting_document_notify"] = "Đrtest‰si lista bejegyz‰s t÷rl‰se..."; +$text["deleting_folder_notify"] = "Đrtest‰si lista bejegyz‰s t÷rl‰se folyamatban..."; +$text["details"] = "Details"; +$text["details_version"] = "Details for version: [version]"; +$text["document"] = "Document"; +$text["document_access_again"] = "Dokumentum jogosultsßg ism‰telt mdostßsa"; +$text["document_add_access"] = "Bejegyz‰s felv‰tele a hozzßf‰r‰s listßra..."; +$text["document_already_locked"] = "Ez a dokumentum mßr zßrolt"; +$text["document_del_access"] = "Hozzßf‰r‰s lista bejegyz‰s t÷rl‰se..."; +$text["document_edit_access"] = "Hozzßf‰r‰s md vßltoztatßsa..."; +$text["document_infos"] = "Informßci"; +$text["document_is_not_locked"] = "Ez a dokumentum NEM zßrolt"; +$text["document_link_by"] = "Kapcsolatot l‰trehozta:"; +$text["document_link_public"] = "Nyilvßnos"; +$text["document_list"] = "Dokumentumok"; +$text["document_notify_again"] = "Đrtest‰si lista ism‰telt mdostßsa"; +$text["document_overview"] = "Dokumentum tulajdonsßgok"; +$text["document_set_default_access"] = "Alapbeßlltßs szerinti jogosultsßg beßlltßsa a dokumentumra..."; +$text["document_set_inherit"] = "ACL t÷rl‰s. A documentum ÷r÷kteni fogja a jogosultsßgot..."; +$text["document_set_not_inherit_copy"] = "Jogosultsßg lista mßsolßsa folyamatban..."; +$text["document_set_not_inherit_empty"] = "Ùr÷ktett jogosultsßg t÷rl‰se. Indulßs ’res ACL-el..."; +$text["document_status"] = "Document Status"; +$text["document_title"] = "MyDMS - Documentum [dokumentumn‰v]"; +$text["document_versions"] = "Ùsszes verzi"; +$text["documents_in_process"] = "Documents In Process"; +$text["documents_owned_by_user"] = "Documents Owned by User"; +$text["documents_to_approve"] = "Documents Awaiting User's Approval"; +$text["documents_to_review"] = "Documents Awaiting User's Review"; +$text["documents_user_requiring_attention"] = "Documents Owned by User That Require Attention"; +$text["does_not_expire"] = "Soha nem jßr le"; +$text["does_not_inherit_access_msg"] = "Jogosultsßg ÷r÷kt‰se"; +$text["download"] = "Let÷lt‰s"; +$text["draft_pending_approval"] = "Draft - pending approval"; +$text["draft_pending_review"] = "Draft - pending review"; +$text["edit"] = "edit"; +$text["edit_default_keyword_category"] = "Kategrißk mdostßsa"; +$text["edit_default_keywords"] = "Kulcsszavak mdostßsa"; +$text["edit_document"] = "Dokumentum m“veletek"; +$text["edit_document_access"] = "Jogosultsßg mdostßs"; +$text["edit_document_notify"] = "Đrtest‰si lista"; +$text["edit_document_props"] = "Dokumentum mdostßs"; +$text["edit_document_props_again"] = "Dokumentum ism‰telt mdostßsa"; +$text["edit_existing_access"] = "Hozzßf‰r‰s lista mdostßsa"; +$text["edit_existing_notify"] = "Đrtest‰si lista szerkeszt‰se"; +$text["edit_folder"] = "K÷nyvtßr szerkeszt‰s"; +$text["edit_folder_access"] = "Hozzßf‰r‰s mdostßs"; +$text["edit_folder_notify"] = "Đrtest‰si lista"; +$text["edit_folder_props"] = "K÷nyvtßr tulajdonsßgok"; +$text["edit_folder_props_again"] = "A k÷nyvtßr ism‰telt mdostßsa"; +$text["edit_group"] = "Csoport mdostßsa"; +$text["edit_inherit_access"] = "Jogosultsßg ÷r÷kt‰se"; +$text["edit_personal_default_keywords"] = "Szem‰lyes kulcsszavak mdostßsa"; +$text["edit_user"] = "Felhasznßl mdostßsa"; +$text["edit_user_details"] = "Edit User Details"; +$text["editing_default_keyword_category"] = "Kategria mdostßsa..."; +$text["editing_default_keywords"] = "Kulcsszavak mdostßsa..."; +$text["editing_document_props"] = "Dokumentum mdostßs folyamatban..."; +$text["editing_folder_props"] = "K÷nyvtßr mdostßsa..."; +$text["editing_group"] = "Csoport mdostßs..."; +$text["editing_user"] = "Felhasznßl mdostßsa folyamatban..."; +$text["editing_user_data"] = "Felhasznßli beßlltßsok mdostßsa"; +$text["email"] = "Email"; +$text["email_err_group"] = "Error sending email to one or more members of this group."; +$text["email_err_user"] = "Error sending email to user."; +$text["email_sent"] = "Email sent"; +$text["empty_access_list"] = "A hozzßf‰r‰s lista ’res"; +$text["empty_notify_list"] = "›res lista"; +$text["error_adding_session"] = "Error occured while creating session."; +$text["error_occured"] = "Hiba t÷rt‰nt"; +$text["error_removing_old_sessions"] = "Error occured while removing old sessions"; +$text["error_updating_revision"] = "Error updating status of document revision."; +$text["exp_date"] = "Lejßr"; +$text["expired"] = "Expired"; +$text["expires"] = "Lejßrat"; +$text["file"] = "File"; +$text["file_info"] = "File Information"; +$text["file_size"] = "Fßjlm‰ret"; +$text["folder_access_again"] = "K÷nyvtßr jogosultsßg ism‰telt mdostßsa"; +$text["folder_add_access"] = "ơj bejegyz‰s hozzßadßsa a hozzßf‰r‰s listßhoz..."; +$text["folder_contents"] = "Folders"; +$text["folder_del_access"] = "Hozzßf‰r‰s lista elem t÷rl‰se..."; +$text["folder_edit_access"] = "Jogosultsßg mdostßs..."; +$text["folder_infos"] = "Informßci"; +$text["folder_notify_again"] = "Đrtest‰si lista ism‰telt mdostßsa"; +$text["folder_overview"] = "K÷nyvtßr tulajdonsßgok"; +$text["folder_path"] = "El‰r‰si ”t"; +$text["folder_set_default_access"] = "Alap‰rtelmez‰s szerinti hozzßf‰r‰si md beßlltßsa a k÷nyvtßrhoz..."; +$text["folder_set_inherit"] = "ACL t÷rl‰se. A k÷nyvtßr ÷r÷k÷lni fogja a jogosultsßgokat..."; +$text["folder_set_not_inherit_copy"] = "Hozzßf‰r‰s lista mßsolßsa folyamatban..."; +$text["folder_set_not_inherit_empty"] = "Ùr÷ktett jogosultsßg eltßvoltßsa. Indtßs ’res ACL-el..."; +$text["folder_title"] = "MyDMS - K÷nyvtßr [k÷nyvtßrn‰v]"; +$text["folders_and_documents_statistic"] = "K÷nyvtßrak ‰s dokumentumok ßtekint‰se"; +$text["foldertree"] = "K÷nyvtßrfa"; +$text["from_approval_process"] = "from approval process"; +$text["from_review_process"] = "from review process"; +$text["global_default_keywords"] = "Globßlis kulcsszavak"; +$text["goto"] = "Ugrßs"; +$text["group"] = "Csoport"; +$text["group_already_approved"] = "An approval has already been submitted on behalf of group"; +$text["group_already_reviewed"] = "A review has already been submitted on behalf of group"; +$text["group_approvers"] = "Group Approvers"; +$text["group_email_sent"] = "Email sent to group members"; +$text["group_exists"] = "Group already exists."; +$text["group_management"] = "Csoportok"; +$text["group_members"] = "Csoporttagok"; +$text["group_reviewers"] = "Group Reviewers"; +$text["group_unable_to_add"] = "Unable to add group"; +$text["group_unable_to_remove"] = "Unable to remove group"; +$text["groups"] = "Csoportok"; +$text["guest_login"] = "Bel‰p‰s vend‰gk‰nt"; +$text["guest_login_disabled"] = "Guest login is disabled."; +$text["individual_approvers"] = "Individual Approvers"; +$text["individual_reviewers"] = "Individual Reviewers"; +$text["individuals"] = "Individuals"; +$text["inherits_access_msg"] = "Jogosultsßg ÷r÷kt‰se folyamatban.

    Ùr÷ktett hozzßf‰r‰s lista mßsolßsa
    Indulßs ’res hozzßf‰r‰s listßval"; +$text["internal_error"] = "Internal error"; +$text["internal_error_exit"] = "Internal error. Unable to complete request. Exiting."; +$text["invalid_access_mode"] = "Invalid Access Mode"; +$text["invalid_action"] = "Invalid Action"; +$text["invalid_approval_status"] = "Invalid Approval Status"; +$text["invalid_create_date_end"] = "Invalid end date for creation date range."; +$text["invalid_create_date_start"] = "Invalid start date for creation date range."; +$text["invalid_doc_id"] = "Invalid Document ID"; +$text["invalid_folder_id"] = "Invalid Folder ID"; +$text["invalid_group_id"] = "Invalid Group ID"; +$text["invalid_link_id"] = "Invalid link identifier"; +$text["invalid_review_status"] = "Invalid Review Status"; +$text["invalid_sequence"] = "Invalid sequence value"; +$text["invalid_status"] = "Invalid Document Status"; +$text["invalid_target_doc_id"] = "Invalid Target Document ID"; +$text["invalid_target_folder"] = "Invalid Target Folder ID"; +$text["invalid_user_id"] = "Invalid User ID"; +$text["invalid_version"] = "Invalid Document Version"; +$text["is_admin"] = "Administrator Privilege"; +$text["js_no_approval_group"] = "Please select a approval group"; +$text["js_no_approval_status"] = "Please select the approval status"; +$text["js_no_comment"] = "Nincs megjegyz‰s"; +$text["js_no_email"] = "Adja meg az email cm‰t"; +$text["js_no_file"] = "K‰rem vßlasszon egy fßjlt"; +$text["js_no_keywords"] = "Adjon meg kulcsszavakat"; +$text["js_no_login"] = "Adja meg a felhasznßlnevet"; +$text["js_no_name"] = "K‰rem rjon be egy nevet"; +$text["js_no_override_status"] = "Please select the new [override] status"; +$text["js_no_pwd"] = "Be kell rnia a jelszavßt"; +$text["js_no_query"] = "Adjon meg egy k‰rd‰st"; +$text["js_no_review_group"] = "Please select a review group"; +$text["js_no_review_status"] = "Please select the review status"; +$text["js_pwd_not_conf"] = "A megadott jelszavak elt‰rnek"; +$text["js_select_user"] = "Vßlasszon felhasznßlt"; +$text["js_select_user_or_group"] = "Legalßbb egy felhasznßlt vagy egy csoportot adjon meg"; +$text["keyword_exists"] = "Keyword already exists"; +$text["keywords"] = "Kulcsszavak"; +$text["language"] = "Nyelv"; +$text["last_update"] = "Utols mdostßs"; +$text["last_updated_by"] = "Last updated by"; +$text["latest_version"] = "Latest Version"; +$text["linked_documents"] = "Kapcsold dokumentumok"; +$text["local_file"] = "Helyi ßllomßny"; +$text["lock_document"] = "Zßrol"; +$text["lock_message"] = "Ezt a dokumentumot [username] zßrolta.
    Csak arra jogosult felhasznßl t÷z÷lheti a zßrolßst (Lßsd: lap alja)."; +$text["lock_status"] = "Stßtusz"; +$text["locking_document"] = "Dokumentum zßrolßs folyamatban..."; +$text["logged_in_as"] = "Bel‰pett felhasznßl: "; +$text["login"] = "Bel‰p‰s"; +$text["login_error_text"] = "Error signing in. User ID or password incorrect."; +$text["login_error_title"] = "Sign in error"; +$text["login_not_found"] = "Nem l‰tez felhasznßl"; +$text["login_not_given"] = "No username has been supplied"; +$text["login_ok"] = "Sign in successful"; +$text["logout"] = "Kil‰p‰s"; +$text["mime_type"] = "Mime-Tpus"; +$text["move"] = "Move"; +$text["move_document"] = "Dokumentum ßthelyez‰se"; +$text["move_folder"] = "K÷nyvtßr ßthelyez‰se"; +$text["moving_document"] = "Dokumentum ßthelyez‰se..."; +$text["moving_folder"] = "K÷nyvtßr ßthelyez‰se..."; +$text["msg_document_expired"] = "A(z) \"[documentname]\" dokumentum (El‰r‰si ”t: \"[path]\") ‰rv‰nyess‰ge lejßrt [expires] dßtummal"; +$text["msg_document_updated"] = "A(z) \"[documentname]\" dokumentum (El‰r‰si ”t: \"[path]\") l‰trehozßsi, vagy mdostßsi dßtuma: [updated]"; +$text["my_account"] = "Felhasznßli beßlltßsok"; +$text["my_documents"] = "My Documents"; +$text["name"] = "N‰v"; +$text["new_default_keyword_category"] = "ơj kategria"; +$text["new_default_keywords"] = "Ùsszes kulcssz"; +$text["new_equals_old_state"] = "Warning: Proposed status and existing status are identical. No action required."; +$text["new_user_image"] = "ơj k‰p"; +$text["no"] = "Nem"; +$text["no_action"] = "No action required"; +$text["no_action_required"] = "n/a"; +$text["no_active_user_docs"] = "There are currently no documents owned by the user that require review or approval."; +$text["no_approvers"] = "No approvers assigned."; +$text["no_default_keywords"] = "Nincs rendelkez‰sre ßll kulcssz"; +$text["no_docs_to_approve"] = "There are currently no documents that require approval."; +$text["no_docs_to_review"] = "There are currently no documents that require review."; +$text["no_document_links"] = "Nincs kapcsold dokumentum"; +$text["no_documents"] = "Nincsenek dokumentumok"; +$text["no_group_members"] = "Ennek a csoportnak nincsenek tagjai"; +$text["no_groups"] = "Nincsenek csoportok"; +$text["no_previous_versions"] = "No other versions found"; +$text["no_reviewers"] = "No reviewers assigned."; +$text["no_subfolders"] = "Nincsenek alk÷nyvtßrak"; +$text["no_update_cause_locked"] = "Emiatt Ùn nem mdosthatja a dokumentumot. L‰pjen kapcsolatba a zßrolßst l‰trehoz szem‰llyel."; +$text["no_user_image"] = "Nincs k‰p"; +$text["not_approver"] = "User is not currently assigned as an approver of this document revision."; +$text["not_reviewer"] = "User is not currently assigned as a reviewer of this document revision."; +$text["notify_subject"] = "ơj vagy lejßrt dokumentumok a dokumentumkezel rendszerben"; +$text["obsolete"] = "Obsolete"; +$text["old_folder"] = "old folder"; +$text["only_jpg_user_images"] = "Felhasznßli k‰pk‰nt csak .jpg fßjlok adhatk meg."; +$text["op_finished"] = "k‰sz"; +$text["operation_not_allowed"] = "Nincs jogosultsßgod a m“velet v‰grehajtßsßhoz"; +$text["override_content_status"] = "Override Status"; +$text["override_content_status_complete"] = "Override Status Complete"; +$text["override_privilege_insufficient"] = "Access denied. Privileges insufficient to override the status of this document."; +$text["overview"] = "Overview"; +$text["owner"] = "Tulajdonos"; +$text["password"] = "Jelsz"; +$text["pending_approval"] = "Documents pending approval"; +$text["pending_review"] = "Documents pending review"; +$text["personal_default_keywords"] = "Szem‰lyes kulcsszavak"; +$text["previous_versions"] = "Previous Versions"; +$text["rejected"] = "Rejected"; +$text["released"] = "Released"; +$text["remove_document_link"] = "Kapcsoldßs t÷rl‰se"; +$text["remove_member"] = "Csoport tag t÷rl‰se"; +$text["removed_approver"] = "has been removed from the list of approvers."; +$text["removed_reviewer"] = "has been removed from the list of reviewers."; +$text["removing_default_keyword_category"] = "Kategria t÷rl‰se..."; +$text["removing_default_keywords"] = "Kulcsszavak t÷rl‰se..."; +$text["removing_document"] = "Dokumentum t÷rl‰se..."; +$text["removing_document_link"] = "Kapcsoldßs t÷rl‰se..."; +$text["removing_folder"] = "K÷nyvtßr t÷rl‰se..."; +$text["removing_group"] = "Csoport t÷rl‰se folyamatban..."; +$text["removing_member"] = "Csoporttag t÷rl‰se folyamatban..."; +$text["removing_user"] = "Felhasznßl t÷rl‰se folyamatban..."; +$text["removing_version"] = "[version]. dokumentum verzi t÷rl‰se..."; +$text["review_document"] = "Review Document"; +$text["review_document_complete"] = "Review Document: Complete"; +$text["review_document_complete_records_updated"] = "Document review completed and records updated"; +$text["review_group"] = "Review Group"; +$text["review_status"] = "Review Status"; +$text["review_summary"] = "Review Summary"; +$text["review_update_failed"] = "Error updating review status. Update failed."; +$text["reviewer_added"] = "added as a reviewer"; +$text["reviewer_already_assigned"] = "is already assigned as a reviewer"; +$text["reviewer_already_removed"] = "has already been removed from review process or has already submitted a review"; +$text["reviewer_no_privilege"] = "is not sufficiently privileged to review this document"; +$text["reviewer_removed"] = "removed from review process"; +$text["reviewers"] = "Reviewers"; +$text["rm_default_keyword_category"] = "Kategria t÷rl‰se"; +$text["rm_default_keywords"] = "Kulcsszavak t÷rl‰se"; +$text["rm_document"] = "Dokumentum t÷rl‰se"; +$text["rm_folder"] = "K÷nyvtßr t÷rl‰s"; +$text["rm_group"] = "Csoport t÷rl‰se"; +$text["rm_user"] = "Felhasznßl t÷rl‰se"; +$text["rm_version"] = "Verzi t÷rl‰se"; +$text["root_folder"] = "Gy÷k‰r k÷nyvtßr"; +$text["save"] = "Ment‰s"; +$text["search"] = "Keres‰s"; +$text["search_in"] = "Keres‰s ebben a k÷nyvtßrban"; +$text["search_in_all"] = "Minden k÷nyvtßrban"; +$text["search_in_current"] = "csak ([foldername]) -ban ‰s alk÷nyvtßraiban"; +$text["search_mode"] = "Md"; +$text["search_mode_and"] = "egyez‰s minden szra"; +$text["search_mode_or"] = "egyez‰s legalßbb egy szra"; +$text["search_no_results"] = "Nincs talßlat"; +$text["search_query"] = "Kulcssz"; +$text["search_report"] = "Talßlatok szßma [count] erre a lek‰rdez‰sre"; +$text["search_result_pending_approval"] = "status 'pending approval'"; +$text["search_result_pending_review"] = "status 'pending review'"; +$text["search_results"] = "Talßlatok"; +$text["search_results_access_filtered"] = "Search results may contain content to which access has been denied."; +$text["search_time"] = "Felhasznßlt id: [time] mßsodperc."; +$text["select_one"] = "Vßlasszon egyet"; +$text["selected_document"] = "Kivßlasztott dokumentum"; +$text["selected_folder"] = "Kivßlasztott konyvtßr"; +$text["selection"] = "Selection"; +$text["seq_after"] = "\"[prevname]\" utßn"; +$text["seq_end"] = "V‰g‰re"; +$text["seq_keep"] = "Pozci megtartßsa"; +$text["seq_start"] = "Elej‰re"; +$text["sequence"] = "Sorrend"; +$text["set_default_access"] = "Set Default Access Mode"; +$text["set_expiry"] = "Set Expiry"; +$text["set_owner"] = "Tulajdonos beßlltßsa"; +$text["set_reviewers_approvers"] = "Assign Reviewers and Approvers"; +$text["setting_expires"] = "Lejßrat beßlltßs folyamatban..."; +$text["setting_owner"] = "Tulajdonos beßlltßsa..."; +$text["setting_user_image"] = "
    Felhasznßli k‰p beßlltßsa folyamatban..."; +$text["show_all_versions"] = "Show All Revisions"; +$text["show_current_versions"] = "Show Current"; +$text["start"] = "Kezdet"; +$text["status"] = "Status"; +$text["status_approval_rejected"] = "Draft rejected"; +$text["status_approved"] = "Approved"; +$text["status_approver_removed"] = "Approver removed from process"; +$text["status_change_summary"] = "Document revision changed from status '[oldstatus]' to status '[newstatus]'."; +$text["status_changed_by"] = "Status changed by"; +$text["status_not_approved"] = "Not approved"; +$text["status_not_reviewed"] = "Not reviewed"; +$text["status_reviewed"] = "Reviewed"; +$text["status_reviewer_rejected"] = "Draft rejected"; +$text["status_reviewer_removed"] = "Reviewer removed from process"; +$text["status_unknown"] = "Unknown"; +$text["subfolder_list"] = "Alk÷nyvtßrak"; +$text["submit_approval"] = "Submit approval"; +$text["submit_login"] = "Sign in"; +$text["submit_review"] = "Submit review"; +$text["theme"] = "T‰ma"; +$text["unable_to_add"] = "Unable to add"; +$text["unable_to_remove"] = "Unable to remove"; +$text["under_folder"] = ", c‰lk÷nyvtßr:"; +$text["unknown_command"] = "Command not recognized."; +$text["unknown_group"] = "Unknown group id"; +$text["unknown_keyword_category"] = "Unknown category"; +$text["unknown_owner"] = "Unknown owner id"; +$text["unknown_user"] = "Unknown user id"; +$text["unlock_cause_access_mode_all"] = "Ùn m‰gis mdosthatja, mivel ÷nnek \"teljes\" jogosultsßga van. A zßrolßs automatikusan fel lesz oldva."; +$text["unlock_cause_locking_user"] = "Ùn m‰gis mdosthatja, mivel a zßrolßst Ùn hozta l‰tre. A zßrolßs automatikusan fel lesz oldva."; +$text["unlock_document"] = "Felszabadt"; +$text["unlocking_denied"] = "Ùnnek nincs jogsultsßga a zßrolßs feloldßsßra"; +$text["unlocking_document"] = "Dokumentum feloldßs folyamatban..."; +$text["update"] = "Update"; +$text["update_approvers"] = "Update List of Approvers"; +$text["update_document"] = "Mdost"; +$text["update_info"] = "Update Information"; +$text["update_locked_msg"] = "Zßrolt dokumentum."; +$text["update_reviewers"] = "Update List of Reviewers"; +$text["update_reviewers_approvers"] = "Update List of Reviewers and Approvers"; +$text["updated_by"] = "Updated by"; +$text["updating_document"] = "Dokumentum mdostßs folyamatban..."; +$text["upload_date"] = "Felt÷lt‰s dßtuma"; +$text["uploaded"] = "Uploaded"; +$text["uploaded_by"] = "Felt÷lt÷tte"; +$text["uploading_failed"] = "Sikertelen felt÷lt‰s. K‰rem l‰pjen kapcsolatba a rendszergazdßval."; +$text["use_default_keywords"] = "Elredefinißlt kulcsszavak hasznßlata"; +$text["user"] = "Felhasznßl"; +$text["user_already_approved"] = "User has already submitted an approval of this document version"; +$text["user_already_reviewed"] = "User has already submitted a review of this document version"; +$text["user_approval_not_required"] = "No document approval required of user at this time."; +$text["user_exists"] = "User already exists."; +$text["user_image"] = "K‰p"; +$text["user_info"] = "User Information"; +$text["user_list"] = "Felhasznßlk listßja"; +$text["user_login"] = "Felhasznßl"; +$text["user_management"] = "Felhasznßlk"; +$text["user_name"] = "Teljes n‰v"; +$text["user_removed_approver"] = "User has been removed from the list of individual approvers."; +$text["user_removed_reviewer"] = "User has been removed from the list of individual reviewers."; +$text["user_review_not_required"] = "No document review required of user at this time."; +$text["users"] = "Felhasznßlk"; +$text["version"] = "Verzi"; +$text["version_info"] = "Version Information"; +$text["version_under_approval"] = "Version under approval"; +$text["version_under_review"] = "Version under review"; +$text["view_document"] = "View Document"; +$text["view_online"] = "Megtekint‰s b÷ng‰szben"; +$text["warning"] = "Warning"; +$text["wrong_pwd"] = "Hibßs jelsz. Prbßlja ”jra"; +$text["yes"] = "Igen"; +// New as of 1.7.1. Require updated translation. +$text["documents"] = "Documents"; +$text["folders"] = "Folders"; +$text["no_folders"] = "No folders"; +$text["notification_summary"] = "Notification Summary"; +// New as of 1.7.2 +$text["all_pages"] = "All"; +$text["results_page"] = "Results Page"; +// New +$text["sign_out"] = "sign out"; +$text["signed_in_as"] = "Signed in as"; +$text["assign_reviewers"] = "Assign Reviewers"; +$text["assign_approvers"] = "Assign Approvers"; +$text["override_status"] = "Override Status"; +$text["change_status"] = "Change Status"; +$text["change_assignments"] = "Change Assignments"; +$text["no_user_docs"] = "There are currently no documents owned by the user"; +$text["disclaimer"] = "This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the english and international laws."; + +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archive creation"; +$text["files_deletion"] = "Files deletion"; +$text["folder"] = "Folder"; + +$text["unknown_id"] = "unknown id"; +$text["help"] = "Help"; + +$text["versioning_info"] = "Versioning info"; +$text["versioning_file_creation_warning"] = "With this operation you can create a file containing the versioning information of an entire DMS folder. After the creation every file will be saved inside the document folder."; +$text["archive_creation_warning"] = "With this operation you can create achive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup."; +$text["files_deletion_warning"] = "With this option you can delete all files of entire DMS folders. The versioning information will remain visible."; + +$text["backup_list"] = "Existings backup list"; +$text["backup_remove"] = "Remove backup file"; +$text["confirm_rm_backup"] = "Do you really want to remove the file \"[arkname]\"?
    Be careful: This action cannot be undone."; + +$text["document_deleted"] = "Document deleted"; +$text["linked_files"] = "Attachments"; +$text["invalid_file_id"] = "Invalid file ID"; +$text["rm_file"] = "Remove file"; +$text["confirm_rm_file"] = "Do you really want to remove file \"[name]\" of document \"[documentname]\"?
    Be careful: This action cannot be undone."; + +$text["edit_comment"] = "Edit comment"; + + +// new from 1.9 + +$text["is_hidden"] = "Hide from users list"; +$text["log_management"] = "Log files management"; +$text["confirm_rm_log"] = "Do you really want to remove log file \"[logname]\"?
    Be careful: This action cannot be undone."; +$text["include_subdirectories"] = "Include subdirectories"; +$text["include_documents"] = "Include documents"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Toggle manager"; + +// new from 2.0 + +$text["calendar"] = "Calendar"; +$text["week_view"] = "Week view"; +$text["month_view"] = "Month view"; +$text["year_view"] = "Year View"; +$text["add_event"] = "Add event"; +$text["edit_event"] = "Edit event"; + +$text["january"] = "January"; +$text["february"] = "February"; +$text["march"] = "March"; +$text["april"] = "April"; +$text["may"] = "May"; +$text["june"] = "June"; +$text["july"] = "July"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "October"; +$text["november"] = "November"; +$text["december"] = "December"; + +$text["sunday"] = "Sunday"; +$text["monday"] = "Monday"; +$text["tuesday"] = "Tuesday"; +$text["wednesday"] = "Wednesday"; +$text["thursday"] = "Thursday"; +$text["friday"] = "Friday"; +$text["saturday"] = "Saturday"; + +$text["from"] = "From"; +$text["to"] = "To"; + +$text["event_details"] = "Event details"; +$text["confirm_rm_event"] = "Do you really want to remove event \"[name]\"?
    Be careful: This action cannot be undone."; + +$text["dump_creation"] = "DB dump creation"; +$text["dump_creation_warning"] = "With this operation you can create a dump file of your database content. After the creation the dump file will be saved in the data folder of your server."; +$text["dump_list"] = "Existings dump files"; +$text["dump_remove"] = "Remove dump file"; +$text["confirm_rm_dump"] = "Do you really want to remove the file \"[dumpname]\"?
    Be careful: This action cannot be undone."; + +$text["confirm_rm_user"] = "Do you really want to remove the user \"[username]\"?
    Be careful: This action cannot be undone."; +$text["confirm_rm_group"] = "Do you really want to remove the group \"[groupname]\"?
    Be careful: This action cannot be undone."; + +$text["human_readable"] = "Human readable archive"; + +$text["email_header"] = "This is an automatic message from the DMS server."; +$text["email_footer"] = "You can always change your e-mail settings using 'My Account' functions"; + +$text["add_multiple_files"] = "Add multiple files (will use filename as document name)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Maximum upload size for each file"; + +?> diff --git a/languages/Italian/help.htm b/languages/Italian/help.htm new file mode 100644 index 000000000..fd3297206 --- /dev/null +++ b/languages/Italian/help.htm @@ -0,0 +1,191 @@ +

    Note generali

    + +

    +Un DMS (Document Management System) ha lo scopo di permettere la condivisione di documenti +controllandone il flusso di lavoro, i permessi di accesso e l'organizzazione in generale. +

    + +

    +Tramite il menu di primo livello è possibile accedere ai vari documenti +memorizzati: +

      +
    • Cartelle: permette di sfogliare i documenti come si farebbe con un normale file manager. +
    • Documenti personali: presenta diverse voci per accedere rapidamente ai documenti di interesse personale: +
        +
      • Documenti in lavorazione: lista dei documenti in attesa di revisione o approvazione da parte dell'utente, +dei documenti di proprietà dell'utente che attendono approvazione o revisione e dei documenti attualmente bloccati dall'utente. +
      • Tutti i documenti: lista di tutti i documenti di proprietà dell'utente. +
      • Dettaglio revisioni: lista tutti i documenti già revisionati o in attesa di revisione da parte dell'utente. +
      • Dettaglio approvazioni: lista tutti i documenti già approvati o in attesa di approvazione da parte dell'utente. +
      +
    +

    + +

    +Il presente DMS mette a disposizione anche un calendario che ha la funzione di bacheca virtuale per condividere note, +appuntamenti, scadenze ed impegni. +

    + + +

    Permessi

    + +

    +L'utente autorizzato può stabilire se e come gli altri utenti del sistema +potranno accedere alle varie cartelle e documenti presenti. +

    + +

    Livelli di permesso

    +

    +I livelli di accesso possibili sono: +

      +
    • Permessi totali: l'utente può effettuare qualsiasi operazione. +
    • Lettura e scrittura: l'utente può aggiornare documenti e aggiungere contenuti alle cartelle. +
    • Solo lettura: l'utente può visualizzare il contenuto delle cartelle e scaricare i documenti. +
    • Nessun accesso: non è possibile visualizzare il contenuto delle cartelle o i singoli documenti. +
    +

    + +

    +Per default gli utenti amministratori hanno permessi di massimo livello su ogni documento e +cartella del sistema. Analogamente il proprietario del documento ha permessi totali +sui propri documenti. +

    + +

    +Solo gli utenti amministratori possono cambiare il proprietario di un documento. +

    + +

    Gestione dei permessi

    +

    +Per ogni cartella o documento i permessi sono gestiti tramite due dispositivi +diversi: +

      +
    • I permessi di default valgono in mancanza di ulteriori specifiche. +
    • La lista dei permessi consente di specificare eccezioni ai permessi di default. +
    +

    + +

    Permessi ereditari

    +

    +I permessi di cartelle e documenti possono essere impostati come ereditari. +In tal caso i documenti e le cartelle ereditano i medesimi permessi della cartella che li contiene. +

    + + +

    Flusso di lavoro

    + +

    +Il sistema gestisce automaticamente il flusso di lavoro per ogni documento e memorizza +variazioni, versionamento, commenti effettuati, ecc. +

    + +

    Ciclo di validazione dei documenti

    +

    +Il normale flusso di lavoro prevede che, al caricamento di un nuovo documento o di una +nuova versione, vengano indicati alcuni utenti o gruppi di utenti, a titolo +di revisori e/o approvatori. Gli utenti indicati come revisori e approvatori sono +tenuti ad esplicitare la propria approvazione al documento. Quando tale operazione +viene ultimata, ovvero tutti gli utenti indicati hanno effettuato la propria +revisione/approvazione, il documento passa nello stato di 'rilasciato'. +

    + +

    +L'utente revisore/approvatore può negare la propria approvazione al documento. +In tal caso il documento passa nello stato di 'rifutato'. +

    + +

    +Un documento per il quale non vengano impostate revisioni e approvazioni assume +immediatamente lo stato di 'rilasciato'. +

    + +

    +Come approvatori/revisori è possibile indicare anche gruppi di utenti. In tal caso +si intende che la revisione/approvazione dovrà essere effettuata da uno qualsiasi degli utenti +appartenenti al gruppo. +

    + +

    +L'utente proprietario del documento può in ogni momento modificare la lista dei revisori +e degli approvatori. +

    + +

    Stato dei documenti

    +

    +Gli stati possibili per un documento sono: +

      +
    • Bozza in attesa di approvazione: uno o più degli approvatori indicati non ha ancora espresso la propria approvazione. +
    • Bozza in attesa di revisione: uno o più dei revisori indicati non ha ancora espresso la propria revisione. +
    • Rilasciato: il documento ha terminato positivamente il proprio ciclo di validazione. +
    • Rifiutato: il documento ha interrotto negativamente il proprio ciclo di validazione. +
    • Scaduto: è stata superata la data limite per il completamento del ciclo di validazione del documento. +
    • Obsoleto: lo stato di un documento rilasciato può essere modificato in obsoleto. Tale +modifica è intesa come alternativa alla cancellazione dello stesso documento. Lo stato +di obsoleto è reversibile. +
    +

    + +

    Scadenza

    +

    +Per ogni documento in lavorazione può essere impostata una data di scadenza. +Una volta sorpassato il giorno impostato non sono più possibili revisioni o approvazioni +ed il documento passa nello stato di 'scaduto'. +

    + +

    +La scadenza viene considerata solo per l'ultima versione del documento +ed ha effetto solo sui documenti in lavorazione. +

    + + +

    Altre caratteristiche

    + +

    Funzione di blocco

    +

    +La funzione di blocco ha lo scopo di segnalare agli altri utenti che un certo documento +è in lavorazione. L'utente con permessi totali sul documento può +comunque ignorare il blocco e procedere ad una modifica del documento. +

    + +

    Notifiche

    +

    +Ogni utente può richiedere notifica su documenti e cartelle. +Aggiungendo un documento o una cartella nella propria lista di notifiche si riceverà +segnalazione delle operazioni effettuate da altri utenti. +

    + +

    +Solo il Manager di un gruppo può decidere se inserire o meno il gruppo nella lista +di notifica di documenti e cartelle. Una volta inserito, le notifiche arrivano +a tutti i membri del gruppo. +

    + +

    Parole chiave e ricerca

    +

    +Ogni documento permette l'inserimento di una descrizione e di alcune parole chiave. +Tali informazioni vengono utilizzate per la ricerca documenti. +

    +

    +Nel menù del proprio account personale ogni utente può memorizzare +una serie di parole chiave raggruppate per categorie, in modo da velocizzarne +la compilazione al momento del caricamento dei documenti. +

    + +

    +Premendo il pulsante di ricerca senza inserire alcuna parola si accede alla pagina +di ricerca avanzata. +

    + + +

    Calendario

    + +

    +Sono possibili tre viste: per settimana, per mese, per anno. Gli eventi sono +visualizzati in ordine di inserimento nel calendario. +

    + +

    +Una volta inseriti, gli eventi sono pubblici e visibili a tutti. Solo l'amministratore +e chi ha inserito l'evento possono modificarlo successivamente. +

    + diff --git a/languages/Italian/lang.inc b/languages/Italian/lang.inc new file mode 100644 index 000000000..abe52ae78 --- /dev/null +++ b/languages/Italian/lang.inc @@ -0,0 +1,530 @@ +Attenzione: L'operazione è irreversibile"; +$text["confirm_rm_folder"] = "Vuoi veramente eliminare la cartella \"[foldername]\" e tutto il suo contenuto?
    Attenzione: L'operazione è irreversibile"; +$text["confirm_rm_version"] = "Vuoi veramente eliminare la versione [version] del documento \"[documentname]\"?
    Attenzione: L'operazione è irreversibile"; +$text["content"] = "Cartelle"; +$text["continue"] = "Continua"; +$text["creation_date"] = "Data creazione"; +$text["current_version"] = "Ultima versione"; +$text["default_access"] = "Permesso di default"; +$text["default_keyword_category_name"] = "Nome"; +$text["default_keyword_category"] = "Categoria"; +$text["default_keywords"] = "Parole chiave disponibili"; +$text["delete"] = "Cancella"; +$text["details"] = "Dettagli"; +$text["details_version"] = "Dettagli versione: [version]"; +$text["document_already_locked"] = "Questo documento è già bloccato"; +$text["document_infos"] = "Informazioni documento"; +$text["document_is_not_locked"] = "Questo documento non è bloccato"; +$text["document_link_by"] = "Collegato da"; +$text["document_link_public"] = "Pubblico"; +$text["document_list"] = "Documenti"; +$text["document_overview"] = "Descrizione del documento"; +$text["document_status"] = "Stato del Documento"; +$text["document_title"] = "Documento '[documentname]'"; +$text["document_versions"] = "Tutte le versioni"; +$text["document"] = "Documento"; +$text["documents_in_process"] = "Documenti in lavorazione"; +$text["documents_owned_by_user"] = "Documenti posseduti dall'utente"; +$text["documents_to_approve"] = "Documenti in attesa della tua approvazione"; +$text["documents_to_review"] = "Documenti in attesa della tua revisione"; +$text["documents_user_requiring_attention"] = "Tuoi documenti in attesa di revisione o approvazione"; +$text["does_not_expire"] = "Nessuna scadenza"; +$text["does_not_inherit_access_msg"] = "Imposta permessi ereditari"; +$text["download"] = "Scarica"; +$text["draft_pending_approval"] = "Bozza in approvazione"; +$text["draft_pending_review"] = "Bozza in revisione"; +$text["edit_default_keyword_category"] = "Modifica categoria"; +$text["edit_default_keywords"] = "Modifica parole chiave"; +$text["edit_document_access"] = "Modifica permessi"; +$text["edit_document_notify"] = "Lista di notifica file"; +$text["edit_document_props_again"] = "Modifica nuovamente il documento"; +$text["edit_document_props"] = "Gestione documento"; +$text["edit_document"] = "Modifica documento"; +$text["edit_existing_access"] = "Gestione permessi"; +$text["edit_existing_notify"] = "Gestione lista di notifica"; +$text["edit_folder_access"] = "Modifica permessi"; +$text["edit_folder_notify"] = "Lista di notifica cartelle"; +$text["edit_folder_props_again"] = "Modifica nuovamente la cartella"; +$text["edit_folder_props"] = "Gestione Cartella"; +$text["edit_folder"] = "Modifica cartella"; +$text["edit_group"] = "Modifica gruppo"; +$text["edit_personal_default_keywords"] = "Gestione parole chiave personali"; +$text["edit_user_details"] = "Gestione dettagli utente"; +$text["edit_user"] = "Modifica utente"; +$text["edit"] = "modifica"; +$text["email_err_group"] = "Errore nell'invio di email a uno o più membri del gruppo [group]"; +$text["email_err_user"] = "Errore nell'invio di email all'utente [user]"; +$text["email_sent"] = "Email inviata"; +$text["email"] = "Email"; +$text["empty_access_list"] = "La lista permessi è vuota"; +$text["empty_notify_list"] = "Nessun record"; +$text["error_occured"] = "Si verificato un errore"; +$text["exp_date"] = "Data Scadenza"; +$text["expired"] = "Scaduto"; +$text["expires"] = "Scadenza"; +$text["file_info"] = "Informazioni sul file"; +$text["file_size"] = "Grandezza"; +$text["file"] = "File"; +$text["folder_contents"] = "Contenuto cartella"; +$text["folder_infos"] = "Informazioni cartella"; +$text["folder_notify_again"] = "Modifica nuovamente lista notifica"; +$text["folder_overview"] = "Vista generale cartella"; +$text["folder_path"] = "Percorso"; +$text["folder_title"] = "Cartella '[foldername]'"; +$text["folders_and_documents_statistic"] = "Visualizzazione generale"; +$text["foldertree"] = "Albero cartella"; +$text["from_approval_process"] = "dal processo di approvazione"; +$text["from_review_process"] = "dal processo di revisione"; +$text["global_default_keywords"] = "Categorie parole chiave globali"; +$text["goto"] = "Vai a"; +$text["group_already_approved"] = "Un'approvazione è già stata presentata a nome del gruppo"; +$text["group_already_reviewed"] = "Una revisione è già stata presentata a nome del gruppo"; +$text["group_approvers"] = "Gruppo Approvatori"; +$text["group_email_sent"] = "Email trasmessa ai membri del gruppo"; +$text["group_exists"] = "Il gruppo è già esistente"; +$text["group_management"] = "Amministrazione gruppi"; +$text["group_members"] = "Membri del gruppo"; +$text["group_reviewers"] = "Gruppo Revisori"; +$text["group_unable_to_add"] = "Impossibile aggiungere un gruppo"; +$text["group_unable_to_remove"] = "Impossibile rimuovere un gruppo"; +$text["group"] = "Gruppo"; +$text["groups"] = "Gruppi"; +$text["guest_login_disabled"] = "Login ospite è disabilitato"; +$text["guest_login"] = "Login come ospite"; +$text["individual_approvers"] = "Approvatori singoli"; +$text["individual_reviewers"] = "Revisori singoli"; +$text["individuals"] = "Singoli"; +$text["inherits_access_msg"] = "E' impostato il permesso ereditario.

    Modifica la lista degli accessi ereditati
    Riimposta una lista di permessi vuota"; +$text["internal_error_exit"] = "Errore interno. Impossibile completare la richiesta. Uscire."; +$text["internal_error"] = "Errore interno"; +$text["invalid_access_mode"] = "Permessi non validi"; +$text["invalid_action"] = "Azione non valida"; +$text["invalid_approval_status"] = "Stato di approvazione non valido"; +$text["invalid_create_date_end"] = "Fine data non valida per la creazione di un intervallo temporale"; +$text["invalid_create_date_start"] = "Inizio data non valida per la creazione di un intervallo temporale"; +$text["invalid_doc_id"] = "ID documento non valido"; +$text["invalid_folder_id"] = "ID cartella non valido"; +$text["invalid_group_id"] = "ID gruppo non valido"; +$text["invalid_link_id"] = "ID di collegamento non valido"; +$text["invalid_review_status"] = "Stato revisione non valido"; +$text["invalid_sequence"] = "Valore di sequenza non valido"; +$text["invalid_status"] = "Stato del documento non valido"; +$text["invalid_target_doc_id"] = "ID documento selezionato non valido"; +$text["invalid_target_folder"] = "ID cartella selezionata non valido"; +$text["invalid_user_id"] = "ID utente non valido"; +$text["invalid_version"] = "Versione documento non valida"; +$text["is_admin"] = "Amministratore privilegiato"; +$text["js_no_approval_group"] = "Si prega di selezionare un gruppo di approvazione"; +$text["js_no_approval_status"] = "Si prega di selezionare lo stato di approvazione"; +$text["js_no_comment"] = "Non ci sono commenti"; +$text["js_no_email"] = "Scrivi nel tuo indirizzo di Email"; +$text["js_no_file"] = "Per favore seleziona un file"; +$text["js_no_keywords"] = "Specifica alcune parole chiave"; +$text["js_no_login"] = "Il campo ID utente é necessario"; +$text["js_no_name"] = "Il nome é necessario"; +$text["js_no_override_status"] = "E' necessario selezionare un nuovo stato"; +$text["js_no_pwd"] = "La password è necessaria"; +$text["js_no_query"] = "Scrivi nella query"; +$text["js_no_review_group"] = "Per favore seleziona un gruppo di revisori"; +$text["js_no_review_status"] = "Per favore seleziona lo stato di revisione"; +$text["js_pwd_not_conf"] = "Password e passwords-di conferma non corrispondono"; +$text["js_select_user_or_group"] = "Selezionare almeno un utente o un gruppo"; +$text["js_select_user"] = "Per favore seleziona un utente"; +$text["keyword_exists"] = "Parola chiave già presente"; +$text["keywords"] = "Parole chiave"; +$text["language"] = "Lingua"; +$text["last_update"] = "Ultima modifica"; +$text["last_updated_by"] = "Ultima modifica eseguita da"; +$text["latest_version"] = "Ultima versione"; +$text["linked_documents"] = "Documenti collegati"; +$text["local_file"] = "File locale"; +$text["lock_document"] = "Blocca"; +$text["lock_message"] = "Questo documento è bloccato da [username]. Solo gli utenti autorizzati possono sbloccare questo documento."; +$text["lock_status"] = "Stato"; +$text["logged_in_as"] = "Loggato"; +$text["login_error_text"] = "Errore nel login. ID utente o passord errati."; +$text["login_error_title"] = "Errore di login"; +$text["login_not_found"] = "Questo nome utente non esiste"; +$text["login_not_given"] = "Non è stato inserito il nome utente"; +$text["login_ok"] = "Login eseguito"; +$text["login"] = "Login"; +$text["logout"] = "Logout"; +$text["mime_type"] = "Mime-Type"; +$text["move_document"] = "Sposta documento"; +$text["move_folder"] = "Sposta cartella"; +$text["move"] = "Sposta"; +$text["my_account"] = "Account personale"; +$text["my_documents"] = "Documenti personali"; +$text["name"] = "Nome"; +$text["new_default_keyword_category"] = "Aggiungi categoria"; +$text["new_default_keywords"] = "Aggiungi parole chiave"; +$text["new_user_image"] = "Nuova immagine"; +$text["no_action_required"] = "n/a"; +$text["no_action"] = "Non è richiesto alcun intervento"; +$text["no_active_user_docs"] = "Non ci sono attualmente tuoi documenti in attesa di revisione o approvazione ."; +$text["no_approvers"] = "Nessun approvatore assegnato."; +$text["no_default_keywords"] = "Nessuna parola chiave disponibile"; +$text["no_documents"] = "Nessun documento"; +$text["no_group_members"] = "Questo gruppo non ha membri"; +$text["no_groups"] = "Nessun gruppo"; +$text["no_previous_versions"] = "Nessun'altra versione trovata"; +$text["no_reviewers"] = "Nessun revisore assegnato."; +$text["no_subfolders"] = "Nessuna sottocartella"; +$text["no_update_cause_locked"] = "Non è quindi possible aggiornarlo."; +$text["no_user_image"] = "Nessuna immagine trovata"; +$text["no"] = "No"; +$text["notify_subject"] = "Documenti nuovi o scaduti nel tuo archivio"; +$text["obsolete"] = "Obsoleto"; +$text["old_folder"] = "cartella vecchia"; +$text["only_jpg_user_images"] = "Possono essere utilizzate solo immagini di tipo jpeg"; +$text["op_finished"] = "fatto"; +$text["override_content_status"] = "Modifica stato"; +$text["overview"] = "Visualizzazione generale"; +$text["owner"] = "Proprietario"; +$text["password"] = "Password"; +$text["pending_approval"] = "Documenti in attesa di approvazione"; +$text["pending_review"] = "Documenti in attesa di revisione"; +$text["personal_default_keywords"] = "Parole chiave personali"; +$text["previous_versions"] = "Versioni precedenti"; +$text["rejected"] = "Rifiutato"; +$text["released"] = "Rilasciato"; +$text["remove_document_link"] = "Rimuovi collegamento"; +$text["remove_member"] = "Rimuovi membro"; +$text["removed_approver"] = "Rimosso dalla lista degli approvatori."; +$text["removed_reviewer"] = "Rimosso dalla lista dei revisori."; +$text["review_document"] = "Revisione Documento"; +$text["review_group"] = "Gruppo revisori"; +$text["review_status"] = "Stato revisioni"; +$text["review_summary"] = "Dettaglio revisioni"; +$text["review_update_failed"] = "Errore nella variazione della revisione. Aggiornamento fallito."; +$text["reviewer_added"] = "aggiunta come revisione"; +$text["reviewer_already_assigned"] = "già è assegnato come revisore"; +$text["reviewer_already_removed"] = "già rimosso dal processo di revisione oppure già inserito come revisione"; +$text["reviewer_removed"] = "rimosso dal processo di revisione"; +$text["reviewers"] = "Revisori"; +$text["rm_default_keyword_category"] = "Cancella categoria"; +$text["rm_default_keywords"] = "Cancella parole chiave"; +$text["rm_document"] = "Rimuovi documento"; +$text["rm_folder"] = "Rimuovi cartella"; +$text["rm_group"] = "Rimuovi questo gruppo"; +$text["rm_user"] = "Rimuovi questo utente"; +$text["rm_version"] = "Rimuovi versione"; +$text["root_folder"] = "Cartella Principale"; +$text["save"] = "Salva"; +$text["search_in_all"] = "tutte le cattelle"; +$text["search_in_current"] = "solo in questa ([foldername]) incluse le sottocartelle"; +$text["search_in"] = "Cerca in"; +$text["search_mode_and"] = "tutte le parole"; +$text["search_mode_or"] = "almeno una parola"; +$text["search_mode"] = "Modo"; +$text["search_no_results"] = "Non ci sono documenti che contengano la vostra ricerca"; +$text["search_query"] = "Cerca per"; +$text["search_report"] = "Trovati [count] documenti"; +$text["search_result_pending_approval"] = "stato 'in attesa di approvazione'"; +$text["search_result_pending_review"] = "stato 'in attesa di revisione'"; +$text["search_results_access_filtered"] = "La ricerca può produrre contenuti il cui accesso è negato."; +$text["search_results"] = "Risultato ricerca"; +$text["search_time"] = "Tempo trascorso: [time] sec."; +$text["search"] = "Cerca"; +$text["select_one"] = "Seleziona uno"; +$text["selected_document"] = "Seleziona documento"; +$text["selected_folder"] = "Seleziona cartella"; +$text["selection"] = "Selezione"; +$text["seq_after"] = "Dopo \"[prevname]\""; +$text["seq_end"] = "Alla fine"; +$text["seq_keep"] = "Mantene Posizione"; +$text["seq_start"] = "Prima posizione"; +$text["sequence"] = "Posizione"; +$text["set_default_access"] = "Conferma permessi di default"; +$text["set_expiry"] = "Regola la scadenza"; +$text["set_owner"] = "Conferma proprietario"; +$text["set_reviewers_approvers"] = "Assegnare i revisori e gli approvatori"; +$text["show_all_versions"] = "Mostra tutte le revisioni"; +$text["show_current_versions"] = "Mostra solo la versione corrente"; +$text["start"] = "Avvia"; +$text["status_approval_rejected"] = "Bozza rifiutata"; +$text["status_approved"] = "Approvato"; +$text["status_approver_removed"] = "Approvatore rimosso dal processo"; +$text["status_changed_by"] = "Stato cambiato da"; +$text["status_not_approved"] = "Non ancora approvato"; +$text["status_not_reviewed"] = "Non ancora revisionato"; +$text["status_reviewed"] = "Revisionato"; +$text["status_reviewer_rejected"] = "Bozza rifiutata"; +$text["status_reviewer_removed"] = "Revisore rimosso dal processo"; +$text["status_unknown"] = "Sconosciuto"; +$text["status"] = "Stato"; +$text["subfolder_list"] = "Sottocartelle"; +$text["submit_approval"] = "Approvazione documento"; +$text["submit_login"] = "Login"; +$text["submit_review"] = "Revisione documento"; +$text["theme"] = "Tema"; +$text["unable_to_add"] = "Impossibile aggiungere"; +$text["unable_to_remove"] = "Impossibile rimuovere"; +$text["under_folder"] = "Nella cartella"; +$text["unknown_command"] = "Commando non riconosciuto."; +$text["unknown_group"] = "ID gruppo sconosciuto"; +$text["unknown_keyword_category"] = "Categoria sconosciuta"; +$text["unknown_owner"] = "ID proprietario sconosciuto"; +$text["unknown_user"] = "ID utente sconosciuto"; +$text["unlock_cause_access_mode_all"] = "Puoi ancora aggiornarlo, perchè hai il permesso \"all\". Il blocco sarà rimosso automaticamente."; +$text["unlock_cause_locking_user"] = "Puoi ancora aggiornarlo, perchè sei l'utente che ha eseguito il blocco. Il blocco sarà rimosso automaticamente."; +$text["unlock_document"] = "Sblocca"; +$text["update_approvers"] = "Aggiornamento lista approvatori"; +$text["update_document"] = "Aggiorna"; +$text["update_info"] = "Aggiorna informazioni"; +$text["update_locked_msg"] = "Questo documento è bloccato."; +$text["update_reviewers"] = "Aggiornamento lista revisori"; +$text["update"] = "Aggiorna"; +$text["updated_by"] = "Aggiornato da"; +$text["upload_date"] = "Data Upload"; +$text["uploaded_by"] = "Caricato da"; +$text["uploaded"] = "Uploaded"; +$text["uploading_failed"] = "Upload fallito. Sei pregato di contattare l'amministratore."; +$text["use_default_keywords"] = "Usa le parole chiave predefinite"; +$text["user_exists"] = "Utente esistente"; +$text["user_image"] = "Immagine"; +$text["user_info"] = "Informazioni utente"; +$text["user_list"] = "Lista utenti"; +$text["user_login"] = "ID utente"; +$text["user_management"] = "Amministrazione utenti"; +$text["user_name"] = "Nome e Cognome"; +$text["user"] = "Utente"; +$text["users"] = "Utenti"; +$text["version_info"] = "Informazioni versione"; +$text["version_under_approval"] = "Versione in fase di approvazione"; +$text["version_under_review"] = "Versione in fase di revisione"; +$text["version"] = "Versione"; +$text["view_document"] = "Visualizza documento"; +$text["view_online"] = "Visualizza"; +$text["warning"] = "Attenzione"; +$text["wrong_pwd"] = "Password errata. Riprova."; +$text["yes"] = "Si"; + +// new +$text["documents"] = "Documenti"; +$text["folders"] = "Cartelle"; +$text["no_folders"] = "Nessuna cartella"; +$text["notification_summary"] = "Sommario notifiche"; +$text["all_pages"] = "Tutte"; +$text["results_page"] = "Pagina dei risultati"; +$text["sign_out"] = "Esci"; +$text["signed_in_as"] = "Utente"; +$text["assign_reviewers"] = "Assegna Revisori"; +$text["assign_approvers"] = "Assegna Approvatori"; +$text["override_status"] = "Modifica lo Stato"; +$text["change_status"] = "Modifica lo Stato"; +$text["change_assignments"] = "Modifica le Assegnazioni"; +$text["no_user_docs"] = "Non ci sono attualmente tuoi documenti"; +$text["disclaimer"] = "Questa è un'area riservata. L'accesso è consentito solo al personale autorizzato. Qualunque violazione sarà perseguita a norma delle leggi italiane ed internazionali."; +$text["error_updating_status"] = "Errore durante la modifica dello stato del documento"; +$text["unknown_id"] = "identificativo sconosciuto"; +$text["help"] = "Aiuto"; + +$text["group_approval_summary"] = "Dettaglio approvazioni di gruppo"; +$text["group_review_summary"] = "Dettaglio revisioni di gruppo"; +$text["documents_locked_by_you"] = "Documenti bloccati da te"; + +$text["document_renamed_email"] = "Documento rinominato"; +$text["folder_renamed_email"] = "Cartella rinominata"; +$text["comment_changed_email"] = "Commento cambiato"; +$text["document_moved_email"] = "Documento spostato"; +$text["folder_moved_email"] = "Cartella spostata"; +$text["ownership_changed_email"] = "Proprietario cambiato"; +$text["access_permission_changed_email"] = "Permessi cambiati"; +$text["expiry_changed_email"] = "Scadenza cambiata"; +$text["notify_added_email"] = "Sei stato aggiunto alla lista di notifica"; +$text["notify_deleted_email"] = "Sei stato eliminato dalla lista di notifica"; +$text["document_updated_email"] = "Documento aggiornato"; +$text["document_deleted_email"] = "Documento cancellato"; +$text["folder_deleted_email"] = "Cartella cancellata"; +$text["version_deleted_email"] = "Versione cancellata"; +$text["document_status_changed_email"] = "Modifica stato del documento"; +$text["review_request_email"] = "Richiesta di revisione"; +$text["approval_request_email"] = "Richiesta di approvazione"; +$text["review_deletion_email"] = "Cancellata la richiesta di revisione"; +$text["approval_deletion_email"] = "Cancellata la richiesta di approvazione"; +$text["new_subfolder_email"] = "Nuova sottocartella"; +$text["new_document_email"] = "Nuovo documento"; +$text["approval_submit_email"] = "Sottoposta approvazione"; +$text["review_submit_email"] = "Sottoposta revisione"; +$text["automatic_status_update"] = "Modifica automatica dello stato"; +$text["old"] = "Vecchio"; +$text["new"] = "Nuovo"; +$text["folder"] = "Cartella"; + +$text["new_file_email"] = "Nuovo file allegato"; +$text["removed_file_email"] = "Rimosso file allegato"; + +$text["document_deleted"] = "Documento rimosso"; +$text["linked_files"] = "File allegati"; +$text["invalid_file_id"] = "ID del file non valido"; +$text["rm_file"] = "Rimuovi file"; +$text["confirm_rm_file"] = "Vuoi veramente eliminare il file \"[name]\" del documento \"[documentname]\"?
    Attenzione: L'operazione è irreversibile"; + +$text["backup_tools"] = "Strumenti di backup"; +$text["versioning_file_creation"] = "Creazione file di versionamento"; +$text["archive_creation"] = "Creazione archivi"; +$text["files_deletion"] = "Cancellazione file"; + +$text["versioning_info"] = "Informazioni di versionamento"; +$text["versioning_file_creation_warning"] = "Con questa operazione è possibile creare un file di backup delle informazioni di versionamento dei documenti di una intera cartella. Dopo la creazione ogni file viene salvato nella cartella del relativo documento."; +$text["archive_creation_warning"] = "Con questa operazione è possibile creare archivi contenenti i file di intere cartelle del DMS. Dopo la creazione l'archivio viene salvato nella cartella dati del server.
    Attenzione: un archivio creato per uso esterno non è utilizzabile come backup del server."; +$text["files_deletion_warning"] = "Con questa operazione è possible cancellare i file di intere cartelle. Dopo la cancellazione le informazioni di versionamento resteranno disponibili."; + +$text["confirm_rm_folder_files"] = "Vuoi davvero rimuovere tutti i file dalla cartella \"[foldername]\" e dalle sue sottocartelle?
    Attenzione: Questa operazione non può essere annullata."; + +$text["files"] = "Files"; +$text["storage_size"] = "Dimensione totale"; + +$text["backup_list"] = "Lista dei backup presenti"; +$text["backup_remove"] = "Elimina file di backup"; +$text["confirm_rm_backup"] = "Vuoi davvero rimuovere il file \"[arkname]\"?
    Attenzione: Questa operazione non può essere annullata."; + +$text["edit_comment"] = "Modifica il commento"; + +// new from 1.9 + $text["is_hidden"] = "Nascondi dalla lista utenti"; +$text["log_management"] = "Amministrazione log file"; +$text["confirm_rm_log"] = "Vuoi davvero rimuovere il file di log \"[logname]\"?
    Attenzione: Questa operazione non può essere annullata."; +$text["include_subdirectories"] = "Includi sottocartelle"; +$text["include_documents"] = "Includi documenti"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Manager"; + +// new from 2.0 + +$text["calendar"] = "Calendario"; +$text["week_view"] = "Vista settimana"; +$text["month_view"] = "Vista mese"; +$text["year_view"] = "Vista anno"; +$text["add_event"] = "Aggiungi evento"; +$text["edit_event"] = "Modifica evento"; + +$text["january"] = "Gennaio"; +$text["february"] = "Febbraio"; +$text["march"] = "Marzo"; +$text["april"] = "Aprile"; +$text["may"] = "Maggio"; +$text["june"] = "Giugno"; +$text["july"] = "Luglio"; +$text["august"] = "Agosto"; +$text["september"] = "Settembre"; +$text["october"] = "Ottobre"; +$text["november"] = "Novembre"; +$text["december"] = "Dicembre"; + +$text["sunday"] = "Domenica"; +$text["monday"] = "Lunedì"; +$text["tuesday"] = "Martedì"; +$text["wednesday"] = "Mercoledì"; +$text["thursday"] = "Giovedì"; +$text["friday"] = "Venerdì"; +$text["saturday"] = "Sabato"; + +$text["from"] = "Da"; +$text["to"] = "A"; + +$text["event_details"] = "Dettagli evento"; +$text["confirm_rm_event"] = "Vuoli davvero rimuovere l'evento \"[name]\"?
    Attenzione: Questa operazione non può essere annullata."; + +$text["dump_creation"] = "Creazione DB dump"; +$text["dump_creation_warning"] = "Con questa operazione è possibile creare un file di dump del contenuto del database. Dopo la creazione il file viene salvato nella cartella dati del server."; +$text["dump_list"] = "List dei dump presenti"; +$text["dump_remove"] = "Cancella il dump file"; +$text["confirm_rm_dump"] = "Vuoi davvero rimuovere il file \"[dumpname]\"?
    Attenzione: Questa operazione non può essere annullata."; + +$text["confirm_rm_user"] = "Vuoi davvero rimuovere l'utente \"[username]\"?
    Attenzione: Questa operazione non può essere annullata."; +$text["confirm_rm_group"] = "Vuoi davvero rimuovere il gruppo \"[groupname]\"?
    Attenzione: Questa operazione non può essere annullata."; + +$text["human_readable"] = "Archivio per uso esterno"; + +$text["email_header"] = "Questo è un messaggio automatico inviato dal server DMS"; +$text["email_footer"] = "Puoi cambiare le tue preferenze utilizzando le funzioni del menu 'Account personale'"; + +$text["add_multiple_files"] = "Aggiungi documenti multipli (il nome del file verrà usato come nome del documento)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Dimensione massima caricabile per ogni file"; + + +?> diff --git a/languages/Portuguese_BR/help.htm b/languages/Portuguese_BR/help.htm new file mode 100644 index 000000000..b7fa69458 --- /dev/null +++ b/languages/Portuguese_BR/help.htm @@ -0,0 +1,7 @@ +

    TODO

    + + + + + + diff --git a/languages/Portuguese_BR/lang.inc b/languages/Portuguese_BR/lang.inc new file mode 100644 index 000000000..fafdddfdf --- /dev/null +++ b/languages/Portuguese_BR/lang.inc @@ -0,0 +1,577 @@ +Por favor, tenha cuidado porque esta a‡ƒo nƒo poderß desfeita."; +$text["confirm_rm_folder"] = "Deseja realmente remover a \"[foldername]\" e seu conte”do ?
    Por favor, tenha cuidado porque esta a‡ƒo nƒo poderß desfeita."; +$text["confirm_rm_version"] = "Deseja realmente remover versƒo [version] do documento \"[documentname]\"?
    Por favor, tenha cuidado porque esta a‡ƒo nƒo poderß desfeita."; +$text["content"] = "Conte”do"; +$text["continue"] = "Continue"; +$text["creating_new_default_keyword_category"] = "Adicionando categoria..."; +$text["creation_date"] = "Criado"; +$text["current_version"] = "Versƒo Atual"; +$text["default_access"] = "Modo de acesso Padrƒo"; +$text["default_keyword_category"] = "Categorias"; +$text["default_keyword_category_name"] = "Nome"; +$text["default_keywords"] = "Palavras-chave disponveis"; +$text["delete"] = "Apagar"; +$text["delete_last_version"] = "Document has only one revision. Deleting entire document record..."; +$text["deleting_document_notify"] = "Removendo elemento da lista de notifica‡ƒo..."; +$text["deleting_folder_notify"] = "Removendo elemento da lista de notifica‡ƒo..."; +$text["details"] = "Details"; +$text["details_version"] = "Details for version: [version]"; +$text["document"] = "Document"; +$text["document_access_again"] = "Editar acesso ao documento novamente"; +$text["document_add_access"] = "Adicionando elemento € lista de acesso..."; +$text["document_already_locked"] = "Este documento jß estß travado"; +$text["document_del_access"] = "Removendo elemento a partir da lista de acesso..."; +$text["document_edit_access"] = "Mudando modo de acesso..."; +$text["document_infos"] = "Informa‡es"; +$text["document_is_not_locked"] = "Este documento nƒo estß travado"; +$text["document_link_by"] = "Ligado por"; +$text["document_link_public"] = "P”blico"; +$text["document_list"] = "Documentos"; +$text["document_notify_again"] = "Editar lista de notifica‡ƒo novamente"; +$text["document_overview"] = "Visualiza‡ƒo do Documento"; +$text["document_set_default_access"] = "Definindo acesso padrƒo para documento..."; +$text["document_set_inherit"] = "Removendo ACL. Documento herdarß acesso..."; +$text["document_set_not_inherit_copy"] = "Copiando lista de acesso..."; +$text["document_set_not_inherit_empty"] = "Removendo acessos herdados. Iniciando com ACL vazia..."; +$text["document_status"] = "Document Status"; +$text["document_title"] = "Documento [documentname]"; +$text["document_versions"] = "Todas as verses "; +$text["documents_in_process"] = "Documents In Process"; +$text["documents_owned_by_user"] = "Documents Owned by User"; +$text["documents_to_approve"] = "Documents Awaiting User's Approval"; +$text["documents_to_review"] = "Documents Awaiting User's Review"; +$text["documents_user_requiring_attention"] = "Documents Owned by User That Require Attention"; +$text["does_not_expire"] = "Nƒo Expira"; +$text["does_not_inherit_access_msg"] = "Inherit access"; +$text["download"] = "Download"; +$text["draft_pending_approval"] = "Draft - pending approval"; +$text["draft_pending_review"] = "Draft - pending review"; +$text["edit"] = "edit"; +$text["edit_default_keyword_category"] = "Editar categorias"; +$text["edit_default_keywords"] = "Editar palavras-chave"; +$text["edit_document"] = "Editar documento"; +$text["edit_document_access"] = "Editar acesso"; +$text["edit_document_notify"] = "Lista de notifica‡ƒo"; +$text["edit_document_props"] = "Editar documento"; +$text["edit_document_props_again"] = "Editar documento novamente"; +$text["edit_existing_access"] = "Editar lista de acesso."; +$text["edit_existing_notify"] = "Editar lista de notifica‡ƒo"; +$text["edit_folder"] = "Editar pasta"; +$text["edit_folder_access"] = "Editar pasta"; +$text["edit_folder_notify"] = "Lista de Notifica‡ƒo"; +$text["edit_folder_props"] = "Editar pasta"; +$text["edit_folder_props_again"] = "Editar pasta novamente"; +$text["edit_group"] = "Editar grupo"; +$text["edit_inherit_access"] = "Herda acesso"; +$text["edit_personal_default_keywords"] = "Editar palavras-chave pessoais"; +$text["edit_user"] = "Editar usußrio"; +$text["edit_user_details"] = "Edit User Details"; +$text["editing_default_keyword_category"] = "Mundando categoria..."; +$text["editing_default_keywords"] = "Mundando palavras-chave..."; +$text["editing_document_props"] = "Editando documento..."; +$text["editing_folder_props"] = "Editando pasta..."; +$text["editing_group"] = "Editando grupo..."; +$text["editing_user"] = "Editando usußrio..."; +$text["editing_user_data"] = "Edi‡ƒo defini‡es de usußrios..."; +$text["email"] = "Email"; +$text["email_err_group"] = "Error sending email to one or more members of this group."; +$text["email_err_user"] = "Error sending email to user."; +$text["email_sent"] = "Email sent"; +$text["empty_access_list"] = "Lista de acesso estß vazia"; +$text["empty_notify_list"] = "Sem entradas"; +$text["error_adding_session"] = "Error occured while creating session."; +$text["error_occured"] = "Ocorreu um erro"; +$text["error_removing_old_sessions"] = "Error occured while removing old sessions"; +$text["error_updating_revision"] = "Error updating status of document revision."; +$text["exp_date"] = "Expira"; +$text["expired"] = "Expired"; +$text["expires"] = "Expira"; +$text["file"] = "File"; +$text["file_info"] = "File Information"; +$text["file_size"] = "Tamanho"; +$text["folder_access_again"] = "Editar acesso da pasta novamente"; +$text["folder_add_access"] = "Adicionando elemento ß lista de acesso..."; +$text["folder_contents"] = "Folders"; +$text["folder_del_access"] = "Removendo elemento da lista de acesso..."; +$text["folder_edit_access"] = "Editando acesso..."; +$text["folder_infos"] = "Informa‡es"; +$text["folder_notify_again"] = "Editar lista de notifica‡ƒo novamente"; +$text["folder_overview"] = "Visualiza‡ƒo da Pasta"; +$text["folder_path"] = "Caminho"; +$text["folder_set_default_access"] = "Definindo modo de acesso padrƒo para a pasta..."; +$text["folder_set_inherit"] = "Removendo ACL. Pasta will inherit access..."; +$text["folder_set_not_inherit_copy"] = "Copiando lista de acesso..."; +$text["folder_set_not_inherit_empty"] = "Removendo inherited access. Starting with empty ACL..."; +$text["folder_title"] = "Pasta [foldername]"; +$text["folders_and_documents_statistic"] = "Overview de pastas e documentos"; +$text["foldertree"] = "Ârvore"; +$text["from_approval_process"] = "from approval process"; +$text["from_review_process"] = "from review process"; +$text["global_default_keywords"] = "palavras-chave globais"; +$text["goto"] = "Ir Para"; +$text["group"] = "Grupo"; +$text["group_already_approved"] = "An approval has already been submitted on behalf of group"; +$text["group_already_reviewed"] = "A review has already been submitted on behalf of group"; +$text["group_approvers"] = "Group Approvers"; +$text["group_email_sent"] = "Email sent to group members"; +$text["group_exists"] = "Group already exists."; +$text["group_management"] = "Gropos"; +$text["group_members"] = "Grupo membros"; +$text["group_reviewers"] = "Group Reviewers"; +$text["group_unable_to_add"] = "Unable to add group"; +$text["group_unable_to_remove"] = "Unable to remove group"; +$text["groups"] = "Grupos"; +$text["guest_login"] = "Entre como convidado"; +$text["guest_login_disabled"] = "Guest login is disabled."; +$text["individual_approvers"] = "Individual Approvers"; +$text["individual_reviewers"] = "Individual Reviewers"; +$text["individuals"] = "Individuals"; +$text["inherits_access_msg"] = "Acesso estß endo herdado.

    Copy inherited access-list
    Inicie com a lista de acesso vazia"; +$text["internal_error"] = "Internal error"; +$text["internal_error_exit"] = "Internal error. Unable to complete request. Exiting."; +$text["invalid_access_mode"] = "Invalid Access Mode"; +$text["invalid_action"] = "Invalid Action"; +$text["invalid_approval_status"] = "Invalid Approval Status"; +$text["invalid_create_date_end"] = "Invalid end date for creation date range."; +$text["invalid_create_date_start"] = "Invalid start date for creation date range."; +$text["invalid_doc_id"] = "Invalid Document ID"; +$text["invalid_folder_id"] = "Invalid Folder ID"; +$text["invalid_group_id"] = "Invalid Group ID"; +$text["invalid_link_id"] = "Invalid link identifier"; +$text["invalid_review_status"] = "Invalid Review Status"; +$text["invalid_sequence"] = "Invalid sequence value"; +$text["invalid_status"] = "Invalid Document Status"; +$text["invalid_target_doc_id"] = "Invalid Target Document ID"; +$text["invalid_target_folder"] = "Invalid Target Folder ID"; +$text["invalid_user_id"] = "Invalid User ID"; +$text["invalid_version"] = "Invalid Document Version"; +$text["is_admin"] = "Administrator Privilege"; +$text["js_no_approval_group"] = "Please select a approval group"; +$text["js_no_approval_status"] = "Please select the approval status"; +$text["js_no_comment"] = "Nƒo hß comentßrio"; +$text["js_no_email"] = "Digite seu endere‡o de e-mail"; +$text["js_no_file"] = "Por favor selecione um arquivo"; +$text["js_no_keywords"] = "Especifique algumas palavras-chave"; +$text["js_no_login"] = "Por favor digite um usußrio"; +$text["js_no_name"] = "Por favor digite um nome"; +$text["js_no_pwd"] = "Đ necessßrio digitar sua senha"; +$text["js_no_query"] = "Digite uma solicita‡ƒo"; +$text["js_no_review_group"] = "Please select a review group"; +$text["js_no_review_status"] = "Please select the review status"; +$text["js_pwd_not_conf"] = "Senha e confirma‡ƒo de senha nƒo sƒo iguais"; +$text["js_select_user"] = "Por favor selecione um usußrio"; +$text["js_select_user_or_group"] = "Selecione, no mnimo, um usußrio ou grupo"; +$text["keyword_exists"] = "Keyword already exists"; +$text["keywords"] = "Palavras-chave"; +$text["language"] = "Linguagem"; +$text["last_update"] = "ơltima versƒo"; +$text["last_updated_by"] = "Last updated by"; +$text["latest_version"] = "Latest Version"; +$text["linked_documents"] = "Documentos relacionados"; +$text["local_file"] = "Arquivo local"; +$text["lock_document"] = "Travar"; +$text["lock_message"] = "Este documento foi travado por [username].
    Somente usußrios autorizados podem remover a trava deste documento (veja no final da pßgina)."; +$text["lock_status"] = "Status"; +$text["locking_document"] = "Travando documento..."; +$text["logged_in_as"] = "Conectado"; +$text["login"] = "Login"; +$text["login_error_text"] = "Error signing in. User ID or password incorrect."; +$text["login_error_title"] = "Sign in error"; +$text["login_not_found"] = "Este usußrio nƒo existe"; +$text["login_not_given"] = "No username has been supplied"; +$text["login_ok"] = "Sign in successful"; +$text["logout"] = "Sair"; +$text["mime_type"] = "Mime-Type"; +$text["move"] = "Move"; +$text["move_document"] = "Mover documento"; +$text["move_folder"] = "Mover Pasta"; +$text["moving_document"] = "Movendo documento..."; +$text["moving_folder"] = "Movendo pasta..."; +$text["msg_document_expired"] = "O documento \"[documentname]\" (Path: \"[path]\") tem expirado em [expires]"; +$text["msg_document_updated"] = "O documento \"[documentname]\" (Path: \"[path]\") foi criado ou atualizado em [updated]"; +$text["my_account"] = "Minha Conta"; +$text["my_documents"] = "My Documents"; +$text["name"] = "Nome"; +$text["new_default_keyword_category"] = "Adicionar categoria"; +$text["new_default_keywords"] = "Adicionar palavras-chave"; +$text["new_equals_old_state"] = "Warning: Proposed status and existing status are identical. No action required."; +$text["new_user_image"] = "Nova imagem"; +$text["no"] = "No"; +$text["no_action"] = "No action required"; +$text["no_action_required"] = "n/a"; +$text["no_active_user_docs"] = "There are currently no documents owned by the user that require review or approval."; +$text["no_approvers"] = "No approvers assigned."; +$text["no_default_keywords"] = "Nƒo hß palavras-chave disponveis"; +$text["no_docs_to_approve"] = "There are currently no documents that require approval."; +$text["no_docs_to_review"] = "There are currently no documents that require review."; +$text["no_document_links"] = "Sem documentos relacionados"; +$text["no_documents"] = "Sem documentos"; +$text["no_group_members"] = "Este grupo nƒo tem membros"; +$text["no_groups"] = "Sem grupos"; +$text["no_previous_versions"] = "No other versions found"; +$text["no_reviewers"] = "No reviewers assigned."; +$text["no_subfolders"] = "Sem pastas"; +$text["no_update_cause_locked"] = "Por isso voc nƒo pode atualizar este documento. Por favor contacte usußrio que possui a trava."; +$text["no_user_image"] = "Nƒo foram encontardas imagens"; +$text["not_approver"] = "User is not currently assigned as an approver of this document revision."; +$text["not_reviewer"] = "User is not currently assigned as a reviewer of this document revision."; +$text["notify_subject"] = "Documentos novos ou expirados em seu DMS"; +$text["obsolete"] = "Obsolete"; +$text["old_folder"] = "old folder"; +$text["only_jpg_user_images"] = "Somente imagens jpg podem ser utilizadas como imagens de usußrios"; +$text["op_finished"] = "Feito"; +$text["operation_not_allowed"] = "Voc nƒo tem direitos suficientes para fazer isto"; +$text["override_content_status"] = "Override Status"; +$text["override_content_status_complete"] = "Override Status Complete"; +$text["override_privilege_insufficient"] = "Access denied. Privileges insufficient to override the status of this document."; +$text["overview"] = "Overview"; +$text["owner"] = "Proprietßrio"; +$text["password"] = "Senha"; +$text["pending_approval"] = "Documents pending approval"; +$text["pending_review"] = "Documents pending review"; +$text["personal_default_keywords"] = "palavras-chave pessoais"; +$text["previous_versions"] = "Previous Versions"; +$text["rejected"] = "Rejected"; +$text["released"] = "Released"; +$text["remove_document_link"] = "Remove link"; +$text["remove_member"] = "Remove membro"; +$text["removed_approver"] = "has been removed from the list of approvers."; +$text["removed_reviewer"] = "has been removed from the list of reviewers."; +$text["removing_default_keyword_category"] = "Apagando categoria..."; +$text["removing_default_keywords"] = "Apagando palavras-chave..."; +$text["removing_document"] = "Removendo documento..."; +$text["removing_document_link"] = "Removendo link ao documento relacionado..."; +$text["removing_folder"] = "Removendo pasta..."; +$text["removing_group"] = "Removendo grupo do sistema..."; +$text["removing_member"] = "Removendo membro do grupo..."; +$text["removing_user"] = "Removendo usußrio do sistema ..."; +$text["removing_version"] = "Removendo versƒo [version]..."; +$text["review_document"] = "Review Document"; +$text["review_document_complete"] = "Review Document: Complete"; +$text["review_document_complete_records_updated"] = "Document review completed and records updated"; +$text["review_group"] = "Review Group"; +$text["review_status"] = "Review Status"; +$text["review_summary"] = "Review Summary"; +$text["review_update_failed"] = "Error updating review status. Update failed."; +$text["reviewer_added"] = "added as a reviewer"; +$text["reviewer_already_assigned"] = "is already assigned as a reviewer"; +$text["reviewer_already_removed"] = "has already been removed from review process or has already submitted a review"; +$text["reviewer_no_privilege"] = "is not sufficiently privileged to review this document"; +$text["reviewer_removed"] = "removed from review process"; +$text["reviewers"] = "Reviewers"; +$text["rm_default_keyword_category"] = "Apague esta categoria"; +$text["rm_default_keywords"] = "Apagar palavras-chave"; +$text["rm_document"] = "Remove documento"; +$text["rm_folder"] = "Remove pasta"; +$text["rm_group"] = "Remove este grupo"; +$text["rm_user"] = "Remove este usußrio"; +$text["rm_version"] = "Remove versƒo"; +$text["root_folder"] = "Pasta Raiz"; +$text["save"] = "Salvar"; +$text["search"] = "Busca"; +$text["search_in"] = "Busca em "; +$text["search_in_all"] = "todas as pastas"; +$text["search_in_current"] = "somente esta ([foldername]) incluindo sub-pastas"; +$text["search_mode"] = "Modo"; +$text["search_mode_and"] = "todas as palavras"; +$text["search_mode_or"] = "at least one word"; +$text["search_no_results"] = "Nƒo hß documento que satisfa‡am sua busca"; +$text["search_query"] = "Busca por"; +$text["search_report"] = "Encontrados [count] documentos"; +$text["search_result_pending_approval"] = "status 'pending approval'"; +$text["search_result_pending_review"] = "status 'pending review'"; +$text["search_results"] = "Resultados da busca"; +$text["search_results_access_filtered"] = "Search results may contain content to which access has been denied."; +$text["search_time"] = "Tempo decorrido: [time] sec."; +$text["select_one"] = "Selecione um"; +$text["selected_document"] = "Documento selecionado"; +$text["selected_folder"] = "Pasta selecionada"; +$text["selection"] = "Selection"; +$text["seq_after"] = "Depois \"[prevname]\""; +$text["seq_end"] = "No final"; +$text["seq_keep"] = "Manter posi‡ƒo"; +$text["seq_start"] = "Primeira posi‡ƒo"; +$text["sequence"] = "Seq’ncia"; +$text["set_default_access"] = "Set Default Access Mode"; +$text["set_expiry"] = "Set Expiry"; +$text["set_owner"] = "Define proprietßrio"; +$text["set_reviewers_approvers"] = "Assign Reviewers and Approvers"; +$text["setting_expires"] = "Definindo expira‡ƒo..."; +$text["setting_owner"] = "Definindo proprietßrio..."; +$text["setting_user_image"] = "
    SDefinindo imagem para usußrio..."; +$text["show_all_versions"] = "Show All Revisions"; +$text["show_current_versions"] = "Show Current"; +$text["start"] = "Desde"; +$text["status"] = "Status"; +$text["status_approval_rejected"] = "Draft rejected"; +$text["status_approved"] = "Approved"; +$text["status_approver_removed"] = "Approver removed from process"; +$text["status_change_summary"] = "Document revision changed from status '[oldstatus]' to status '[newstatus]'."; +$text["status_changed_by"] = "Status changed by"; +$text["status_not_approved"] = "Not approved"; +$text["status_not_reviewed"] = "Not reviewed"; +$text["status_reviewed"] = "Reviewed"; +$text["status_reviewer_rejected"] = "Draft rejected"; +$text["status_reviewer_removed"] = "Reviewer removed from process"; +$text["status_unknown"] = "Unknown"; +$text["subfolder_list"] = "Sub-pastas"; +$text["submit_approval"] = "Submit approval"; +$text["submit_login"] = "Sign in"; +$text["submit_review"] = "Submit review"; +$text["theme"] = "Tema"; +$text["unable_to_add"] = "Unable to add"; +$text["unable_to_remove"] = "Unable to remove"; +$text["under_folder"] = "Na pasta"; +$text["unknown_command"] = "Command not recognized."; +$text["unknown_group"] = "Unknown group id"; +$text["unknown_keyword_category"] = "Unknown category"; +$text["unknown_owner"] = "Unknown owner id"; +$text["unknown_user"] = "Unknown user id"; +$text["unlock_cause_access_mode_all"] = "Voc pode atualizß-lo, porque voc tem mode de acesso \"all\". Trava serß automaticamente removida."; +$text["unlock_cause_locking_user"] = "Voc pode pode atualizß-lo, porque voc o travou tamb‰m. Trava serß automaticamente removida."; +$text["unlock_document"] = "Remover trava"; +$text["unlocking_denied"] = "Voc nƒo tem permisses suficientes para remover a trava deste documento"; +$text["unlocking_document"] = "Destravando documento..."; +$text["update"] = "Update"; +$text["update_approvers"] = "Update List of Approvers"; +$text["update_document"] = "Atualizar"; +$text["update_info"] = "Update Information"; +$text["update_locked_msg"] = "Este documento estß trabado."; +$text["update_reviewers"] = "Update List of Reviewers"; +$text["update_reviewers_approvers"] = "Update List of Reviewers and Approvers"; +$text["updated_by"] = "Updated by"; +$text["updating_document"] = "Atualizando documento..."; +$text["upload_date"] = "Data de inser‡ƒo"; +$text["uploaded"] = "Uploaded"; +$text["uploaded_by"] = "Inserido por"; +$text["uploading_failed"] = "Inser‡ƒo falhou. Por favor contacte o administrador"; +$text["use_default_keywords"] = "Use palavras-chave pr‰-definidas"; +$text["user"] = "Usußrio"; +$text["user_already_approved"] = "User has already submitted an approval of this document version"; +$text["user_already_reviewed"] = "User has already submitted a review of this document version"; +$text["user_approval_not_required"] = "No document approval required of user at this time."; +$text["user_exists"] = "User already exists."; +$text["user_image"] = "Imagem"; +$text["user_info"] = "User Information"; +$text["user_list"] = "Lista de Usußrios"; +$text["user_login"] = "Usußrio"; +$text["user_management"] = "Usußrios"; +$text["user_name"] = "Nome Completo"; +$text["user_removed_approver"] = "User has been removed from the list of individual approvers."; +$text["user_removed_reviewer"] = "User has been removed from the list of individual reviewers."; +$text["user_review_not_required"] = "No document review required of user at this time."; +$text["users"] = "Usußrios"; +$text["version"] = "Versƒo"; +$text["version_info"] = "Version Information"; +$text["version_under_approval"] = "Version under approval"; +$text["version_under_review"] = "Version under review"; +$text["view_document"] = "View Document"; +$text["view_online"] = "Ver on-line"; +$text["warning"] = "Warning"; +$text["wrong_pwd"] = "Sua senha estß incorreta. Tente novamente."; +$text["yes"] = "Yes"; +// New as of 1.7.1. Require updated translation. +$text["documents"] = "Documents"; +$text["folders"] = "Folders"; +$text["no_folders"] = "No folders"; +$text["notification_summary"] = "Notification Summary"; +// New as of 1.7.2 +$text["all_pages"] = "All"; +$text["results_page"] = "Results Page"; +// New +$text["sign_out"] = "sign out"; +$text["signed_in_as"] = "Signed in as"; +$text["assign_reviewers"] = "Assign Reviewers"; +$text["assign_approvers"] = "Assign Approvers"; +$text["override_status"] = "Override Status"; +$text["change_status"] = "Change Status"; +$text["change_assignments"] = "Change Assignments"; +$text["no_user_docs"] = "There are currently no documents owned by the user"; +$text["disclaimer"] = "This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the english and international laws."; + +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archive creation"; +$text["files_deletion"] = "Files deletion"; +$text["folder"] = "Folder"; + +$text["unknown_id"] = "unknown id"; +$text["help"] = "Help"; + +$text["versioning_info"] = "Versioning info"; +$text["versioning_file_creation_warning"] = "With this operation you can create a file containing the versioning information of an entire DMS folder. After the creation every file will be saved inside the document folder."; +$text["archive_creation_warning"] = "With this operation you can create achive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup."; +$text["files_deletion_warning"] = "With this option you can delete all files of entire DMS folders. The versioning information will remain visible."; + +$text["backup_list"] = "Existings backup list"; +$text["backup_remove"] = "Remove backup file"; +$text["confirm_rm_backup"] = "Do you really want to remove the file \"[arkname]\"?
    Be careful: This action cannot be undone."; + +$text["document_deleted"] = "Document deleted"; +$text["linked_files"] = "Attachments"; +$text["invalid_file_id"] = "Invalid file ID"; +$text["rm_file"] = "Remove file"; +$text["confirm_rm_file"] = "Do you really want to remove file \"[name]\" of document \"[documentname]\"?
    Be careful: This action cannot be undone."; + +$text["edit_comment"] = "Edit comment"; + +// new from 1.9 + +$text["is_hidden"] = "Hide from users list"; +$text["log_management"] = "Log files management"; +$text["confirm_rm_log"] = "Do you really want to remove log file \"[logname]\"?
    Be careful: This action cannot be undone."; +$text["include_subdirectories"] = "Include subdirectories"; +$text["include_documents"] = "Include documents"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Toggle manager"; + +// new from 2.0 + +$text["calendar"] = "Calendar"; +$text["week_view"] = "Week view"; +$text["month_view"] = "Month view"; +$text["year_view"] = "Year View"; +$text["add_event"] = "Add event"; +$text["edit_event"] = "Edit event"; + +$text["january"] = "January"; +$text["february"] = "February"; +$text["march"] = "March"; +$text["april"] = "April"; +$text["may"] = "May"; +$text["june"] = "June"; +$text["july"] = "July"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "October"; +$text["november"] = "November"; +$text["december"] = "December"; + +$text["sunday"] = "Sunday"; +$text["monday"] = "Monday"; +$text["tuesday"] = "Tuesday"; +$text["wednesday"] = "Wednesday"; +$text["thursday"] = "Thursday"; +$text["friday"] = "Friday"; +$text["saturday"] = "Saturday"; + +$text["from"] = "From"; +$text["to"] = "To"; + +$text["event_details"] = "Event details"; +$text["confirm_rm_event"] = "Do you really want to remove event \"[name]\"?
    Be careful: This action cannot be undone."; + +$text["dump_creation"] = "DB dump creation"; +$text["dump_creation_warning"] = "With this operation you can create a dump file of your database content. After the creation the dump file will be saved in the data folder of your server."; +$text["dump_list"] = "Existings dump files"; +$text["dump_remove"] = "Remove dump file"; +$text["confirm_rm_dump"] = "Do you really want to remove the file \"[dumpname]\"?
    Be careful: This action cannot be undone."; + +$text["confirm_rm_user"] = "Do you really want to remove the user \"[username]\"?
    Be careful: This action cannot be undone."; +$text["confirm_rm_group"] = "Do you really want to remove the group \"[groupname]\"?
    Be careful: This action cannot be undone."; + +$text["human_readable"] = "Human readable archive"; + +$text["email_header"] = "This is an automatic message from the DMS server."; +$text["email_footer"] = "You can always change your e-mail settings using 'My Account' functions"; + +$text["add_multiple_files"] = "Add multiple files (will use filename as document name)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Maximum upload size for each file"; + +?> diff --git a/languages/Slovak/help.htm b/languages/Slovak/help.htm new file mode 100644 index 000000000..b7fa69458 --- /dev/null +++ b/languages/Slovak/help.htm @@ -0,0 +1,7 @@ +

    TODO

    + + + + + + diff --git a/languages/Slovak/lang.inc b/languages/Slovak/lang.inc new file mode 100644 index 000000000..d32fddf15 --- /dev/null +++ b/languages/Slovak/lang.inc @@ -0,0 +1,565 @@ +BuÄte opatrnĂ­: TĂºto ÄinnosÅ¥ nemožno vrĂ¡tiÅ¥ spĂ¤Å¥."; +$text["confirm_rm_folder"] = "Naozaj chcete odstrĂ¡niÅ¥ \"[foldername]\" a jeho obsah?
    BuÄte opatrnĂ­: TĂºto ÄinnosÅ¥ nemožno vrĂ¡tiÅ¥ spĂ¤Å¥."; +$text["confirm_rm_version"] = "Naozaj chcete odstrĂ¡niÅ¥ verziu [version] dokumentu \"[documentname]\"?
    BuÄte opatrnĂ­: TĂºto ÄinnosÅ¥ nemožno vrĂ¡tiÅ¥ spĂ¤Å¥."; +$text["content"] = "Obsah"; +$text["continue"] = "PokraÄovaÅ¥"; +$text["creation_date"] = "VytvorenĂ©"; +$text["current_version"] = "AktuĂ¡lna verzia"; +$text["default_access"] = "Å tandardnĂ½ režim prĂ­stupu"; +$text["default_keyword_category"] = "KategĂ³rie"; +$text["default_keyword_category_name"] = "NĂ¡zov"; +$text["default_keywords"] = "DostupnĂ© kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["delete"] = "ZmazaÅ¥"; +$text["details"] = "Podrobnosti"; +$text["details_version"] = "Podrobnosti verzie: [version]"; +$text["document"] = "Dokument"; +$text["document_access_again"] = "Znova upraviÅ¥ prĂ­stup k dokumentu"; +$text["document_already_locked"] = "Tento dokument je už zamknutĂ½"; +$text["document_infos"] = "InformĂ¡cie o dokumente"; +$text["document_is_not_locked"] = "Tento dokument nie je zamknutĂ½"; +$text["document_link_by"] = "Odkazuje sem"; +$text["document_link_public"] = "VerejnĂ½"; +$text["document_list"] = "Dokumenty"; +$text["document_notify_again"] = "Znova upraviÅ¥ zoznam upozornenĂ­"; +$text["document_overview"] = "Prehľad dokumentu"; +$text["document_status"] = "Stav dokumentu"; +$text["document_title"] = "Dokument '[documentname]'"; +$text["document_versions"] = "VÅ¡etky verzie"; +$text["documents"] = "Dokumenty"; +$text["documents_in_process"] = "Dokumenty v spracovanĂ­"; +$text["documents_owned_by_user"] = "Dokumenty tohto pouÅ¾Ă­vateľa"; +$text["documents_to_approve"] = "Dokumenty ÄakajĂºce na schvĂ¡lenie pouÅ¾Ă­vateľa"; +$text["documents_to_review"] = "Dokumenty ÄakajĂºce na kontrolu pouÅ¾Ă­vateľa"; +$text["documents_user_requiring_attention"] = "Dokumenty, ktorĂ© pouÅ¾Ă­vateľ vlastnĂ­ a vyžadujĂº pozornosÅ¥"; +$text["does_not_expire"] = "PlatnosÅ¥ nikdy nevyprÅ¡Ă­"; +$text["does_not_inherit_access_msg"] = "ZdediÅ¥ prĂ­stup"; +$text["download"] = "StiahnuÅ¥"; +$text["draft_pending_approval"] = "NĂ¡vrh - ÄakĂ¡ na schvĂ¡lenie"; +$text["draft_pending_review"] = "NĂ¡vrh - ÄakĂ¡ na kontrolu"; +$text["edit"] = "upraviÅ¥"; +$text["edit_default_keyword_category"] = "UpraviÅ¥ kategĂ³rie"; +$text["edit_default_keywords"] = "UpraviÅ¥ kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["edit_document"] = "UpraviÅ¥ dokument"; +$text["edit_document_access"] = "UpraviÅ¥ prĂ­stup"; +$text["edit_document_notify"] = "Zoznam upozornenĂ­"; +$text["edit_document_props"] = "UpraviÅ¥ dokument"; +$text["edit_document_props_again"] = "Znova upraviÅ¥ dokument"; +$text["edit_existing_access"] = "UpraviÅ¥ zoznam riadenia prĂ­stupu"; +$text["edit_existing_notify"] = "UpraviÅ¥ zoznam upozornenĂ­"; +$text["edit_folder"] = "UpraviÅ¥ zložku"; +$text["edit_folder_access"] = "UpraviÅ¥ prĂ­stup"; +$text["edit_folder_notify"] = "Zoznam upozornenĂ­"; +$text["edit_folder_props"] = "UpraviÅ¥ vlastnosti zložky"; +$text["edit_folder_props_again"] = "Znova upraviÅ¥ vlastnosti zložky"; +$text["edit_group"] = "UpraviÅ¥ skupinu"; +$text["edit_inherit_access"] = "ZdediÅ¥ prĂ­stup"; +$text["edit_personal_default_keywords"] = "UpraviÅ¥ osobnĂ© kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["edit_user"] = "UpraviÅ¥ pouÅ¾Ă­vateľa"; +$text["edit_user_details"] = "UpraviÅ¥ podrobnosti pouÅ¾Ă­vateľa"; +$text["email"] = "Email"; +$text["email_err_group"] = "Chyba pri posielanĂ­ emailu jednĂ©mu alebo viacerĂ½m Älenom tejto skupiny."; +$text["email_err_user"] = "Chyba pri posielanĂ­ emailu pouÅ¾Ă­vateľovi."; +$text["email_sent"] = "Email odoslanĂ½"; +$text["empty_access_list"] = "Zoznam riadenia prĂ­stupu je prĂ¡zdny"; +$text["empty_notify_list"] = "Žiadne položky"; +$text["error_adding_session"] = "Pri vytvĂ¡ranĂ­ relĂ¡cie sa vyskytla chyba."; +$text["error_occured"] = "Vyskytla sa chyba"; +$text["error_removing_old_sessions"] = "Vyskytla sa chyba pri odstraňovanĂ­ starĂ½ch relĂ¡ciĂ­"; +$text["error_updating_revision"] = "Chyba pri aktualizĂ¡cii stavu revĂ­zie dokumentu."; +$text["exp_date"] = "PlatnosÅ¥ vyprÅ¡Ă­"; +$text["expired"] = "PlatnosÅ¥ vyprÅ¡ala"; +$text["expires"] = "PlatnosÅ¥ vyprÅ¡Ă­"; +$text["file"] = "SĂºbor"; +$text["file_info"] = "InformĂ¡cie o sĂºbore"; +$text["file_size"] = "VeľkosÅ¥ sĂºboru"; +$text["folder_access_again"] = "Znova upraviÅ¥ prĂ­stup k zložke"; +$text["folder_contents"] = "Obsah zložky"; +$text["folder_infos"] = "InformĂ¡cie o zložke"; +$text["folder_notify_again"] = "Znova upraviÅ¥ zoznam upozornenĂ­ zložky"; +$text["folder_overview"] = "Prehľad zložky"; +$text["folder_path"] = "Cesta"; +$text["folder_title"] = "Zložka '[foldername]'"; +$text["folders"] = "Zložky"; +$text["folders_and_documents_statistic"] = "Prehľad zložiek a dokumentov"; +$text["foldertree"] = "Strom zložiek"; +$text["from_approval_process"] = "z procesu schvĂ¡lenia"; +$text["from_review_process"] = "z procesu kontroly"; +$text["global_default_keywords"] = "GlobĂ¡lne kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["goto"] = "PrejsÅ¥ na"; +$text["group"] = "Skupina"; +$text["group_already_approved"] = "V mene skupiny už bolo odoslanĂ© schvĂ¡lenie"; +$text["group_already_reviewed"] = "V mene skupiny už bola odoslanĂ¡ kontrola"; +$text["group_approvers"] = "Schvaľovatelia skupiny"; +$text["group_email_sent"] = "Email odoslanĂ½ Älenom skupiny"; +$text["group_exists"] = "Skupina už existuje."; +$text["group_management"] = "Skupiny"; +$text["group_members"] = "ÄŒlenovia skupiny"; +$text["group_reviewers"] = "KontrolĂ³ri skupiny"; +$text["group_unable_to_add"] = "Nebolo možnĂ© pridaÅ¥ skupinu"; +$text["group_unable_to_remove"] = "Nebolo možnĂ© odstrĂ¡niÅ¥ skupinu"; +$text["groups"] = "Skupiny"; +$text["guest_login"] = "PrihlĂ¡siÅ¥ sa ako hosÅ¥"; +$text["guest_login_disabled"] = "PrihlĂ¡senie ako hosÅ¥ je vypnutĂ©."; +$text["individual_approvers"] = "JednotlivĂ­ schvaľovatelia"; +$text["individual_reviewers"] = "JednotlivĂ­ kontrolĂ³ri"; +$text["individuals"] = "Jednotlivci"; +$text["inherits_access_msg"] = "PrĂ­stup sa dedĂ­.

    SkopĂ­rovaÅ¥ zdedenĂ½ zoznam riadenia prĂ­stupu
    ZaložiÅ¥ novĂ½ zoznam riadenia prĂ­stupu"; +$text["internal_error"] = "VnĂºtornĂ¡ chyba"; +$text["internal_error_exit"] = "VnĂºtornĂ¡ chyba. Nebolo možnĂ© dokonÄiÅ¥ požiadavku. UkonÄuje sa."; +$text["invalid_access_mode"] = "NeplatnĂ½ režim prĂ­stupu"; +$text["invalid_action"] = "NeplatnĂ¡ ÄinnosÅ¥"; +$text["invalid_approval_status"] = "NeplatnĂ½ stav schvĂ¡lenia"; +$text["invalid_create_date_end"] = "NeplatnĂ½ koncovĂ½ dĂ¡tum vytvorenia."; +$text["invalid_create_date_start"] = "NeplatnĂ½ poÄiatoÄnĂ½ dĂ¡tum vytvorenia."; +$text["invalid_doc_id"] = "NeplatnĂ½ ID dokumentu"; +$text["invalid_folder_id"] = "NeplatnĂ½ ID zložky"; +$text["invalid_group_id"] = "NeplatnĂ½ ID skupiny"; +$text["invalid_link_id"] = "NeplatnĂ½ ID odkazu"; +$text["invalid_review_status"] = "NeplatnĂ½ stav kontroly"; +$text["invalid_sequence"] = "NeplatnĂ¡ hodnota postupnosti"; +$text["invalid_status"] = "NeplatnĂ½ stav dokumentu"; +$text["invalid_target_doc_id"] = "NeplatnĂ© cieľovĂ© ID dokumentu"; +$text["invalid_target_folder"] = "NeplatnĂ© cieľovĂ© ID zložky"; +$text["invalid_user_id"] = "NeplatnĂ© ID pouÅ¾Ă­vateľa"; +$text["invalid_version"] = "NeplatnĂ¡ verzia dokumentu"; +$text["is_admin"] = "OprĂ¡vnenie sprĂ¡vcu"; +$text["js_no_approval_group"] = "ProsĂ­m, vyberte skupinu pre schvĂ¡lenie"; +$text["js_no_approval_status"] = "ProsĂ­m, vyberte stav schvĂ¡lenia"; +$text["js_no_comment"] = "Žiadny komentĂ¡r"; +$text["js_no_email"] = "NapĂ­Å¡te svoju emailovĂº adresu"; +$text["js_no_file"] = "ProsĂ­m, vyberte sĂºbor"; +$text["js_no_keywords"] = "Zadajte nejakĂ© kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["js_no_login"] = "ProsĂ­m, napĂ­Å¡te meno pouÅ¾Ă­vateľa"; +$text["js_no_name"] = "ProsĂ­m, napĂ­Å¡te meno"; +$text["js_no_override_status"] = "ProsĂ­m, vyberte novĂ½ stav [prepĂ­Å¡e sa]"; +$text["js_no_pwd"] = "Budete musieÅ¥ napĂ­saÅ¥ svoje heslo"; +$text["js_no_query"] = "NapĂ­Å¡te požiadavku"; +$text["js_no_review_group"] = "ProsĂ­m, vyberte skupinu pre kontrolu"; +$text["js_no_review_status"] = "ProsĂ­m, vyberte stav kontroly"; +$text["js_pwd_not_conf"] = "Heslo a potvrdenie hesla sa nezhodujĂº"; +$text["js_select_user"] = "ProsĂ­m, vyberte pouÅ¾Ă­vateľa"; +$text["js_select_user_or_group"] = "Vyberte aspoň pouÅ¾Ă­vateľa alebo skupinu"; +$text["keyword_exists"] = "KÄ¾ĂºÄovĂ© slovo už existuje"; +$text["keywords"] = "KÄ¾ĂºÄovĂ© slovĂ¡"; +$text["language"] = "Jazyk"; +$text["last_update"] = "PoslednĂ¡ aktualizĂ¡cia"; +$text["last_updated_by"] = "Naposledy aktualizoval"; +$text["latest_version"] = "PoslednĂ¡ verzia"; +$text["linked_documents"] = "SĂºvisiace dokumenty"; +$text["local_file"] = "LokĂ¡lny sĂºbor"; +$text["lock_document"] = "ZamknĂºÅ¥"; +$text["lock_message"] = "Tento dokument zamkol [username].
    Iba oprĂ¡vnenĂ­ pouÅ¾Ă­vatelia ho mĂ´Å¾u odomknĂºÅ¥ (pozri koniec strĂ¡nky)."; +$text["lock_status"] = "Stav"; +$text["logged_in_as"] = "PrihlĂ¡senĂ½"; +$text["login"] = "PrihlĂ¡siÅ¥ sa"; +$text["login_error_text"] = "Chyba pri prihlasovanĂ­. ID pouÅ¾Ă­vateľa alebo heslo je nesprĂ¡vne."; +$text["login_error_title"] = "Chyba pri prihlasovanĂ­"; +$text["login_not_found"] = "Toto pouÅ¾Ă­vateľskĂ© meno neexistuje"; +$text["login_not_given"] = "Nebolo zadanĂ© pouÅ¾Ă­vateľskĂ© meno"; +$text["login_ok"] = "PrihlĂ¡senie prebehlo ĂºspeÅ¡ne"; +$text["logout"] = "OdhlĂ¡senie"; +$text["mime_type"] = "Mime-Type"; +$text["move"] = "PresunĂºÅ¥"; +$text["move_document"] = "PresunĂºÅ¥ dokument"; +$text["move_folder"] = "PresunĂºÅ¥ zložku"; +$text["msg_document_expired"] = "PlatnosÅ¥ dokumentu \"[documentname]\" (Cesta: \"[path]\") vyprÅ¡ala [expires]"; +$text["msg_document_updated"] = "Dokument \"[documentname]\" (Cesta: \"[path]\") bol vytvorenĂ½ alebo aktualizovanĂ½ [updated]"; +$text["my_account"] = "MĂ´j ĂºÄet"; +$text["my_documents"] = "Moje dokumenty"; +$text["name"] = "Meno"; +$text["new_default_keyword_category"] = "PridaÅ¥ kategĂ³riu"; +$text["new_default_keywords"] = "PridaÅ¥ kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["new_equals_old_state"] = "Upozornenie: NavrhovanĂ½ stav a sĂºÄasnĂ½ stav sĂº zhodnĂ©. NiÄ sa nevykonĂ¡."; +$text["new_user_image"] = "NovĂ½ obrĂ¡zok"; +$text["no"] = "Nie"; +$text["no_action"] = "NiÄ sa nevykonĂ¡"; +$text["no_action_required"] = "n/a"; +$text["no_active_user_docs"] = "MomentĂ¡lne neexistujĂº žiadne dokumenty tohto pouÅ¾Ă­vateľa, ktorĂ© vyžadujĂº kontrolu alebo schvĂ¡lenie."; +$text["no_approvers"] = "Neboli pridelenĂ­ žiadni schvaľovatelia."; +$text["no_default_keywords"] = "Nie sĂº dostupnĂ© žiadne kÄ¾ĂºÄovĂ© slovĂ¡."; +$text["no_docs_to_approve"] = "MomentĂ¡lne neexistujĂº žiadne dokumenty, ktorĂ© vyžadujĂº schvĂ¡lenie."; +$text["no_docs_to_review"] = "MomentĂ¡lne neexistujĂº žiadne dokumenty, ktorĂ© vyžadujĂº kontrolu."; +$text["no_document_links"] = "Žiadne sĂºvisiace dokumenty"; +$text["no_documents"] = "Žiadne dokumenty"; +$text["no_folders"] = "Žiadne zložky"; +$text["no_group_members"] = "TĂ¡to skupina nemĂ¡ žiadnych Älenov"; +$text["no_groups"] = "Žiadne skupiny"; +$text["no_previous_versions"] = "Neboli nĂ¡jdenĂ© žiadne inĂ© verzie"; +$text["no_reviewers"] = "Neboli pridelenĂ­ žiadni kontrolĂ³ri."; +$text["no_subfolders"] = "Žiadne podzložky"; +$text["no_update_cause_locked"] = "Preto nemĂ´Å¾ete aktualizovaÅ¥ tento dokument. ProsĂ­m, kontaktujte pouÅ¾Ă­vateľa, ktorĂ½ ho zamkol."; +$text["no_user_image"] = "nebol nĂ¡jdenĂ½ žiadny obrĂ¡zok"; +$text["not_approver"] = "PouÅ¾Ă­vateľ momentĂ¡lne nie je pridelenĂ½ ako schvaľovateľ tejto revĂ­zie dokumentu."; +$text["not_reviewer"] = "PouÅ¾Ă­vateľ momentĂ¡lne nie je pridelenĂ½ ako kontrolĂ³r tejto revĂ­zie dokumentu."; +$text["notification_summary"] = "Notification summary"; +$text["notify_subject"] = "NovĂ© alebo expirovanĂ© dokumenty vo vaÅ¡om systĂ©me"; +$text["obsolete"] = "ZastaralĂ©"; +$text["old_folder"] = "StarĂ¡ zložka"; +$text["only_jpg_user_images"] = "Ako obrĂ¡zky pouÅ¾Ă­vateľov je možnĂ© použiÅ¥ iba obrĂ¡zky .jpg"; +$text["op_finished"] = "Hotovo"; +$text["operation_not_allowed"] = "na to nemĂ¡te dostatoÄnĂ© oprĂ¡vnenie"; +$text["override_content_status"] = "PrepĂ­saÅ¥ stav"; +$text["override_content_status_complete"] = "PrepĂ­sanie stavu dokonÄenĂ©"; +$text["override_privilege_insufficient"] = "PrĂ­stup zamietnutĂ½. NedostatoÄnĂ© oprĂ¡vnenie na prepĂ­sanie stavu tohto dokumentu."; +$text["overview"] = "Prehľad"; +$text["owner"] = "VlastnĂ­k"; +$text["password"] = "Heslo"; +$text["pending_approval"] = "Dokumenty ÄakajĂºce na schvĂ¡lenie"; +$text["pending_review"] = "Dokumenty ÄakajĂºce na kontrolu"; +$text["personal_default_keywords"] = "OsobnĂ© kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["previous_versions"] = "PredoÅ¡lĂ© verzie"; +$text["rejected"] = "OdmietnutĂ©"; +$text["released"] = "VydanĂ©"; +$text["remove_document_link"] = "OdstrĂ¡niÅ¥ odkaz"; +$text["remove_member"] = "OdstrĂ¡niÅ¥ Älena"; +$text["removed_approver"] = "bol odstrĂ¡nenĂ½ zo zoznamu schvaľovateľov."; +$text["removed_reviewer"] = "bol odstrĂ¡nenĂ½ zo zoznamu kontrolĂ³rov."; +$text["results_page"] = "VĂ½sledky"; +$text["review_document"] = "SkontrolovaÅ¥ dokument"; +$text["review_document_complete"] = "Kontrola dokumentu: DokonÄenĂ¡"; +$text["review_document_complete_records_updated"] = "Kontrola dokumentu bola dokonÄenĂ¡ a zĂ¡znamy aktualizovanĂ©"; +$text["review_group"] = "Skupina kontroly"; +$text["review_status"] = "Stav kontroly"; +$text["review_summary"] = "Zhrnutie kontroly"; +$text["review_update_failed"] = "Chyba pri aktualizĂ¡cii stavu kontroly. AktualizĂ¡cia zlyhala."; +$text["reviewer_added"] = "pridanĂ½ ako kontrolĂ³r"; +$text["reviewer_already_assigned"] = "je už poverenĂ½ ako kontrolĂ³r"; +$text["reviewer_already_removed"] = "už bol odstrĂ¡nenĂ½ z procesu kontroly alebo poslal kontrolu"; +$text["reviewer_no_privilege"] = "nemĂ¡ dostatoÄnĂ© oprĂ¡vnenie na kontrolu tohto dokumentu"; +$text["reviewer_removed"] = "odstrĂ¡nenĂ½ z procesu kontroly"; +$text["reviewers"] = "KontrolĂ³ri"; +$text["rm_default_keyword_category"] = "ZmazaÅ¥ kategĂ³riu"; +$text["rm_default_keywords"] = "ZmazaÅ¥ kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["rm_document"] = "OdstrĂ¡niÅ¥ dokument"; +$text["rm_folder"] = "OdstrĂ¡niÅ¥ zložku"; +$text["rm_group"] = "OdstrĂ¡niÅ¥ tĂºto skupinu"; +$text["rm_user"] = "OdstrĂ¡niÅ¥ tohto pouÅ¾Ă­vateľa"; +$text["rm_version"] = "OdstrĂ¡niÅ¥ verziu"; +$text["root_folder"] = "KoreňovĂ¡ zložka"; +$text["save"] = "UložiÅ¥"; +$text["search"] = "HľadaÅ¥"; +$text["search_in"] = "PrehľadĂ¡vaÅ¥"; +$text["search_in_all"] = "vÅ¡etky zložky"; +$text["search_in_current"] = "iba tento ([foldername]) vrĂ¡tane podzložiek"; +$text["search_mode"] = "Režim"; +$text["search_mode_and"] = "vÅ¡etky slovĂ¡"; +$text["search_mode_or"] = "aspoň jedno zo slov"; +$text["search_no_results"] = "VaÅ¡ej požiadavke nevyhovujĂº žiadne dokumenty "; +$text["search_query"] = "HľadaÅ¥"; +$text["search_report"] = "NĂ¡jdenĂ½ch [count] dokumentov"; +$text["search_result_pending_approval"] = "stav 'ÄakĂ¡ na schvĂ¡lenie'"; +$text["search_result_pending_review"] = "stav 'ÄakĂ¡ na kontrolu'"; +$text["search_results"] = "VĂ½sledky hľadania"; +$text["search_results_access_filtered"] = "VĂ½sledky hľadania mĂ´Å¾u obsahovaÅ¥ obsah, ku ktorĂ©mu bol zamietnutĂ½ prĂ­stup."; +$text["search_time"] = "UplynulĂ½ Äas: [time] sek"; +$text["select_one"] = "Vyberte jeden"; +$text["selected_document"] = "VybranĂ½ dokument"; +$text["selected_folder"] = "VybranĂ¡ zložka"; +$text["selection"] = "VĂ½ber"; +$text["seq_after"] = "Po \"[prevname]\""; +$text["seq_end"] = "Na koniec"; +$text["seq_keep"] = "PonechaÅ¥ pozĂ­ciu"; +$text["seq_start"] = "PrvĂ¡ pozĂ­cia"; +$text["sequence"] = "PostupnosÅ¥"; +$text["set_default_access"] = "NastaviÅ¥ Å¡tandardnĂ½ režim prĂ­stupu"; +$text["set_expiry"] = "NastaviÅ¥ vyprÅ¡anie"; +$text["set_owner"] = "NastaviÅ¥ vlastnĂ­ka"; +$text["set_reviewers_approvers"] = "PoveriÅ¥ kontrolĂ³rov a schvaľovateľov"; +$text["show_all_versions"] = "ZobraziÅ¥ vÅ¡etky revĂ­zie"; +$text["show_current_versions"] = "ZobraziÅ¥ aktuĂ¡lne"; +$text["start"] = "ZaÄiatok"; +$text["status"] = "Stav"; +$text["status_approval_rejected"] = "NĂ¡vrh zamietnutĂ½"; +$text["status_approved"] = "SchvĂ¡lenĂ½"; +$text["status_approver_removed"] = "Schvaľovateľ odstrĂ¡nenĂ½ z procesu"; +$text["status_change_summary"] = "RevĂ­zia dokumentu sa zmenila zo stavu '[oldstatus]' na stav '[newstatus]'."; +$text["status_changed_by"] = "Stav zmenil "; +$text["status_not_approved"] = "NeschvĂ¡lenĂ½"; +$text["status_not_reviewed"] = "NeskontrolovanĂ½"; +$text["status_reviewed"] = "SkontrolovanĂ½"; +$text["status_reviewer_rejected"] = "NĂ¡vrh zamietnutĂ½"; +$text["status_reviewer_removed"] = "KontrolĂ³r odstrĂ¡nenĂ½ z procesu"; +$text["status_unknown"] = "NeznĂ¡my"; +$text["subfolder_list"] = "Podzložky"; +$text["submit_approval"] = "PoslaÅ¥ schvĂ¡lenie"; +$text["submit_login"] = "PrihlĂ¡siÅ¥ sa"; +$text["submit_review"] = "PoslaÅ¥ kontrolu"; +$text["theme"] = "Vzhľad"; +$text["unable_to_add"] = "Nebolo možnĂ© pridaÅ¥"; +$text["unable_to_remove"] = "Nebolo možnĂ© odstrĂ¡niÅ¥"; +$text["under_folder"] = "V zložke"; +$text["unknown_command"] = "PrĂ­kaz nebol rozpoznanĂ½."; +$text["unknown_group"] = "NeznĂ¡my ID skupiny"; +$text["unknown_keyword_category"] = "NeznĂ¡ma kategĂ³ria"; +$text["unknown_owner"] = "NeznĂ¡my ID vlastnĂ­ka"; +$text["unknown_user"] = "NeznĂ¡my ID pouÅ¾Ă­vateľa"; +$text["unlock_cause_access_mode_all"] = "MĂ´Å¾ete ho stĂ¡le aktualizovaÅ¥, pretože mĂ¡te režim prĂ­stupu \"all\". ZĂ¡mok bude automaticky odstrĂ¡nenĂ½."; +$text["unlock_cause_locking_user"] = "MĂ´Å¾ete ho stĂ¡le aktualizovaÅ¥, pretože ste ten, kto ho aj zamkol. ZĂ¡mok bude automaticky odstrĂ¡nenĂ½."; +$text["unlock_document"] = "OdomknĂºÅ¥"; +$text["unlocking_denied"] = "NemĂ¡te dostatoÄnĂ© oprĂ¡vnenie na odomknutie tohto dokumentu"; +$text["update"] = "AktualizovaÅ¥"; +$text["update_approvers"] = "AktualizovaÅ¥ zoznam schvaľovateľov"; +$text["update_document"] = "AktualizovaÅ¥"; +$text["update_info"] = "AktualizovaÅ¥ informĂ¡cie"; +$text["update_locked_msg"] = "Tento dokument je zamknutĂ½."; +$text["update_reviewers"] = "AktualizovaÅ¥ zoznam kontrolĂ³rov"; +$text["update_reviewers_approvers"] = "AktualizovaÅ¥ zoznam kontrolĂ³rov a schvaľovateľov"; +$text["updated_by"] = "Aktualizoval"; +$text["upload_date"] = "DĂ¡tum nahrania"; +$text["uploaded"] = "Nahral"; +$text["uploaded_by"] = "Nahral"; +$text["uploading_failed"] = "Nahranie zlyhalo. ProsĂ¡m, kontaktujte sprĂ¡vcu."; +$text["use_default_keywords"] = "PoužiÅ¥ preddefinovanĂ© kÄ¾ĂºÄovĂ© slovĂ¡"; +$text["user"] = "PouÅ¾Ă­vateľ"; +$text["user_already_approved"] = "PouÅ¾Ă­vateľ už poslal schvĂ¡lenie tejto verzie dokumentu"; +$text["user_already_reviewed"] = "PouÅ¾Ă­vateľ už poslal kontrolu tejto verzie dokumentu"; +$text["user_approval_not_required"] = "MomentĂ¡lne sa od pouÅ¾Ă­vateľa nevyžaduje schvĂ¡lenie dokumetu."; +$text["user_exists"] = "PouÅ¾Ă­vateľ už existuje."; +$text["user_image"] = "ObrĂ¡zok"; +$text["user_info"] = "InformĂ¡cie o pouÅ¾Ă­vateľovi"; +$text["user_list"] = "Zoznam pouÅ¾Ă­vateľov"; +$text["user_login"] = "ID pouÅ¾Ă­vateľa"; +$text["user_management"] = "PouÅ¾Ă­vatelia"; +$text["user_name"] = "PlnĂ© meno"; +$text["user_removed_approver"] = "PouÅ¾Ă­vateľ bol odstrĂ¡nenĂ½ zo zoznamu jednotlivĂ½ch schvaľovateľov."; +$text["user_removed_reviewer"] = "PouÅ¾Ă­vateľ bol odstrĂ¡nenĂ½ zo zoznamu jednotlivĂ½ch kontrolĂ³rov."; +$text["user_review_not_required"] = "MomentĂ¡lne sa od pouÅ¾Ă­vateľa nevyžaduje kontrola dokumetu."; +$text["users"] = "PouÅ¾Ă­vateľ"; +$text["version"] = "Verzia"; +$text["version_info"] = "InformĂ¡cie o verzii"; +$text["version_under_approval"] = "Verzia sa schvaľuje"; +$text["version_under_review"] = "Verzia sa kontroluje"; +$text["view_document"] = "ZobraziÅ¥ dokument"; +$text["view_online"] = "ZobraziÅ¥ online"; +$text["warning"] = "Upozornenie"; +$text["wrong_pwd"] = "VaÅ¡e heslo je nesprĂ¡vne. SkĂºste znova."; +$text["yes"] = "Ăno"; + +$text["sign_out"] = "odhlĂ¡siÅ¥"; +$text["signed_in_as"] = "PrihlĂ¡senĂ½ ako"; +$text["assign_reviewers"] = "UrÄiÅ¥ recenzentov"; +$text["assign_approvers"] = "UrÄiÅ¥ schvaľovateľov"; +$text["override_status"] = "ZmeniÅ¥ stav"; +$text["change_status"] = "ZmeniÅ¥ stav"; +$text["change_assignments"] = "ZmeniÅ¥ Ăºlohy"; +$text["no_user_docs"] = "MomentĂ¡lne nie sĂº k dispozĂ­cii žiadne dokumenty vlastnenĂ© pouÅ¾Ă­vateľom"; +$text["disclaimer"] = "Toto je zabezpeÄenĂ¡ zĂ³na. PrĂ­stup je povolenĂ½ len autorizovanĂ½m osobĂ¡m."; +$text["error_updating_status"] = "Pri nastavovanĂ­ stavu nastala chyba"; +$text["unknown_id"] = "NeznĂ¡me ID"; +$text["help"] = "Pomoc"; + +$text["group_approval_summary"] = "Zhrnutie skupinovĂ©ho schvĂ¡lenia"; +$text["group_review_summary"] = "Zhrnutie skupinovej recenzie"; +$text["documents_locked_by_you"] = "Vami uzamknutĂ© dokumenty"; + +$text["document_renamed_email"] = "Dokument premenovany"; +$text["folder_renamed_email"] = "Zlozka premenovana"; +$text["comment_changed_email"] = "Komentar zmeneny"; +$text["document_moved_email"] = "Dokument presunuty"; +$text["folder_moved_email"] = "Zlozka presunuta"; +$text["ownership_changed_email"] = "Majitel zmeneny"; +$text["access_permission_changed_email"] = "PristupovĂ© prava zmenene"; +$text["expiry_changed_email"] = "Datum platnosti zmeneny"; +$text["notify_added_email"] = "Boli ste pridani do notifikacneho zoznamu"; +$text["notify_deleted_email"] = "Boli ste odstraneni do notifikacneho zoznamu"; +$text["document_updated_email"] = "Dokument aktualizovany"; +$text["document_deleted_email"] = "Dokument zmazany"; +$text["folder_deleted_email"] = "Zlozka zmazana"; +$text["version_deleted_email"] = "Verzia zmazana"; +$text["document_status_changed_email"] = "Stav dokumentu zmeneny"; +$text["review_request_email"] = "Poziadavka na recenziu"; +$text["approval_request_email"] = "Poziadavka na schvalenie"; +$text["review_deletion_email"] = "Poziadavka na recenziu zmazana"; +$text["approval_deletion_email"] = "Poziadavka na schvalenie zmazana"; +$text["new_subfolder_email"] = "Nova zlozka"; +$text["new_document_email"] = "Novy dokument"; +$text["approval_submit_email"] = "Poslane schvalenie"; +$text["review_submit_email"] = "Poslana recenzia"; +$text["automatic_status_update"] = "Automaticka zmena stavu"; +$text["old"] = "Stare"; +$text["new"] = "Nove"; +$text["folder"] = "Zlozka"; + +$text["new_file_email"] = "Nova priloha"; +$text["removed_file_email"] = "Odstranena priloha"; + +$text["document_deleted"] = "Dokument zmazanĂ½"; +$text["linked_files"] = "PrĂ­lohy"; +$text["invalid_file_id"] = "NesprĂ¡vne ID sĂºboru"; +$text["rm_file"] = "OdstrĂ¡niÅ¥ sĂºbor"; +$text["confirm_rm_file"] = "SkutoÄne si prajete odstrĂ¡niÅ¥ sĂºbor \"[name]\" z dokumentu \"[documentname]\"?
    BuÄte opatrnĂ­, tĂ¡to akcia je nezvratnĂ¡."; + +$text["backup_tools"] = "ZĂ¡lohovacie nĂ¡stroje"; +$text["versioning_file_creation"] = "Vytvorenie verziovacieho sĂºboru"; +$text["archive_creation"] = "Vytvorenie archĂ­vu"; +$text["files_deletion"] = "OdstrĂ¡nenie sĂºboru"; + +$text["versioning_info"] = "InformĂ¡cie o verziĂ¡ch"; +$text["versioning_file_creation_warning"] = "Touto akciou mĂ´Å¾ete vytvoriÅ¥ sĂºbor, obsahujĂºci verziovaciu informĂ¡ciu celej DMS zložky. Po vytvorenĂ­ bude každĂ½ sĂºbor uloženĂ½ do zložky sĂºborov."; +$text["archive_creation_warning"] = "Touto akciou mĂ´Å¾ete vytvoriÅ¥ archĂ­v obsahujĂºci celĂº DMS zložku. Po vytvorenĂ­ bude každĂ½ sĂºbor uloženĂ½ do dĂ¡tovej zložky sĂºborov na vaÅ¡om serveri.
    UPOZORNENIE: uživateľsky prĂ­stupnĂ½ archĂ­v nie je možnĂ© použiÅ¥ ako zĂ¡lohu servera."; +$text["files_deletion_warning"] = "Touto akciou mĂ´Å¾ete odstrĂ¡niÅ¥ celĂº DMS zložku. Verziovacie informĂ¡cie zostanĂº viditeľnĂ©."; + +$text["confirm_rm_folder_files"] = "SkutoÄne si prajete odstrĂ¡niÅ¥ vÅ¡etky sĂºbory zložky \"[foldername]\" a vÅ¡etkĂ½ch jej podzložiek?
    BuÄte opatrnĂ­, tĂ¡to akcia je nezvratnĂ¡."; + +$text["files"] = "SĂºbory"; +$text["storage_size"] = "Objem dĂ¡t"; + +$text["backup_list"] = "Zoznam zĂ¡loh"; +$text["backup_remove"] = "OdstrĂ¡niÅ¥ zĂ¡lohu"; +$text["confirm_rm_backup"] = "SkutoÄne si prajete odstrĂ¡niÅ¥ zĂ¡lohu \"[arkname]\"?
    BuÄte opatrnĂ­, tĂ¡to akcia je nezvratnĂ¡."; + +$text["edit_comment"] = "UpraviÅ¥ komentĂ¡r"; + +// new from 1.9 + +$text["is_hidden"] = "NezobrazovaÅ¥ v zozname pouÅ¾Ă­vateľov"; +$text["log_management"] = "SprĂ¡va protokolov"; +$text["confirm_rm_log"] = "SkutoÄne si prajete zmazaÅ¥ protokol \"[logname]\"?
    BuÄte opatrnĂ­, tĂ¡to akcia je nezvratnĂ¡."; +$text["include_subdirectories"] = "VrĂ¡tane podzložiek"; +$text["include_documents"] = "VrĂ¡tane sĂºborov"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "PrepnĂºÅ¥ stav manager"; + +// new from 2.0 + +$text["calendar"] = "KalendĂ¡r"; +$text["week_view"] = "TĂ½Å¾deň"; +$text["month_view"] = "Mesiac"; +$text["year_view"] = "Rok"; +$text["add_event"] = "PridaÅ¥ udalosÅ¥"; +$text["edit_event"] = "UpraviÅ¥ udalosÅ¥"; + +$text["january"] = "JanuĂ¡r"; +$text["february"] = "FebruĂ¡r"; +$text["march"] = "Marec"; +$text["april"] = "AprĂ­l"; +$text["may"] = "MĂ¡j"; +$text["june"] = "JĂºn"; +$text["july"] = "JĂºl"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "OktĂ³ber"; +$text["november"] = "November"; +$text["december"] = "December"; + +$text["sunday"] = "Nedeľa"; +$text["monday"] = "Pondelok"; +$text["tuesday"] = "Utorok"; +$text["wednesday"] = "Streda"; +$text["thursday"] = "Å tvrtok"; +$text["friday"] = "Piatok"; +$text["saturday"] = "Sobota"; + +$text["from"] = "Od"; +$text["to"] = "Do"; + +$text["event_details"] = "Detail udalosti"; +$text["confirm_rm_event"] = "SkutoÄne si prajete odstrĂ¡niÅ¥ udalosÅ¥ \"[name]\"?
    BuÄte opatrnĂ­, tĂ¡to akcia je nezvratnĂ¡."; + +$text["dump_creation"] = "Vytvorenie vĂ½stupu DB"; +$text["dump_creation_warning"] = "Touto akciou mĂ´Å¾ete vytvoriÅ¥ vĂ½stup obsahu VaÅ¡ej databĂ¡zy. Po vytvorenĂ­ bude vĂ½stup uloženĂ½ v dĂ¡tovej zložke vĂ¡Å¡ho servera."; +$text["dump_list"] = "ExistujĂºce vĂ½stupy"; +$text["dump_remove"] = "OdstrĂ¡niÅ¥ vystup"; +$text["confirm_rm_dump"] = "SkutoÄne si prajete odstrĂ¡niÅ¥ \"[dumpname]\"?
    BuÄte opatrnĂ­, tĂ¡to akcia je nezvratnĂ¡."; + +$text["confirm_rm_user"] = "SkutoÄne si prajete odstrĂ¡niÅ¥ pouÅ¾Ă­vateľa \"[username]\"?
    BuÄte opatrnĂ­, tĂ¡to akcia je nezvratnĂ¡."; +$text["confirm_rm_group"] = "SkutoÄne si prajete odstrĂ¡niÅ¥ skupinu \"[groupname]\"?
    BuÄte opatrnĂ­, tĂ¡to akcia je nezvratnĂ¡."; + +$text["human_readable"] = "PouživateľskĂ½ archĂ­v"; + +$text["email_header"] = "Toto je automatickĂ¡ sprĂ¡va od DMS servera."; +$text["email_footer"] = "Nastavenia e-mailu si kedykoľvek mĂ´Å¾ete zmeniÅ¥ cez 'MĂ´j ĂºÄet'"; + +$text["add_multiple_files"] = "PridaÅ¥ viacero sĂºborov (nĂ¡zov sĂºboru sa použije ako nĂ¡zov dokumentu)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "MaximĂ¡lna veľkosÅ¥ každĂ©ho sĂºboru"; + +?> diff --git a/languages/Spanish/help.htm b/languages/Spanish/help.htm new file mode 100644 index 000000000..b7fa69458 --- /dev/null +++ b/languages/Spanish/help.htm @@ -0,0 +1,7 @@ +

    TODO

    + + + + + + diff --git a/languages/Spanish/lang.inc b/languages/Spanish/lang.inc new file mode 100644 index 000000000..b10ffdfd7 --- /dev/null +++ b/languages/Spanish/lang.inc @@ -0,0 +1,588 @@ +Atencion: Esta accion no se puede deshacer."; +$text["confirm_rm_folder"] = "Realmente desea eliminar el directorio \"[foldername]\" y su contenido?
    Atencion: Esta accion no se puede deshacer."; +$text["confirm_rm_version"] = "¿Realmente quiere eliminar la versión [version] del documento \"[documentname]\"?
    Tenga cuidado: esta acción no se puede deshacer."; +$text["content"] = "Contenido"; +$text["continue"] = "Continue"; +$text["creating_new_default_keyword_category"] = "Creando categoría"; +$text["creation_date"] = "Creacion"; +$text["current_version"] = "Version actual"; +$text["default_access"] = "Modo de acceso predefinido"; +$text["default_keyword_category_name"] = "Nombre"; +$text["default_keyword_category"] = "Categorías"; +$text["default_keywords"] = "Palabras claves disponibles"; +$text["delete_last_version"] = "Document has only one revision. Deleting entire document record..."; +$text["delete"] = "Eliminado"; +$text["deleting_document_notify"] = "Eliminando elemento de la lista de notificacion..."; +$text["deleting_folder_notify"] = "Eliminando elemento de la lista de notificacion..."; +$text["details"] = "Details"; +$text["details_version"] = "Details for version: [version]"; +$text["document_access_again"] = "Editar de nuevo acceso al documento"; +$text["document_add_access"] = "Añadiendo elemento a la lista de acceso..."; +$text["document_already_locked"] = "Este documento ya esta bloqueado"; +$text["document_del_access"] = "Eliminando elemento de la lista de acceso..."; +$text["document_edit_access"] = "Cambiando modo de acceso..."; +$text["document_infos"] = "Informaciones"; +$text["document_is_not_locked"] = "Este documento no esta bloqueado"; +$text["document_link_by"] = "Vinculado por"; +$text["document_link_public"] = "Publico"; +$text["document_list"] = "Documentos"; +$text["document_notify_again"] = "Editar de nuevo lista de notificacion"; +$text["document_overview"] = "Información documento"; +$text["document_set_default_access"] = "Estableciendo modo de acceso predefinido para el documento..."; +$text["document_set_inherit"] = "Eliminando ACL. El documento heredara acceso..."; +$text["document_set_not_inherit_copy"] = "Copiando lista de acceso..."; +$text["document_set_not_inherit_empty"] = "Eliminando acceso heredado. Empezando con un ACL vacio..."; +$text["document_status"] = "Document Status"; +$text["document_title"] = "Documento '[documentname]'"; +$text["document_versions"] = "Todas las versiones"; +$text["document"] = "Document"; +$text["documents_in_process"] = "Documents In Process"; +$text["documents_owned_by_user"] = "Documents Owned by User"; +$text["documents_to_approve"] = "Documents Awaiting User's Approval"; +$text["documents_to_review"] = "Documents Awaiting User's Review"; +$text["documents_user_requiring_attention"] = "Documents Owned by User That Require Attention"; +$text["does_not_expire"] = "No caduca"; +$text["does_not_inherit_access_msg"] = "Inherit access"; +$text["download_document_content"] = "Download"; +$text["download"] = "Download"; +$text["draft_pending_approval"] = "Draft - pending approval"; +$text["draft_pending_review"] = "Draft - pending review"; +$text["edit_default_keyword_category"] = "Editar categorías"; +$text["edit_default_keywords"] = "Edit keywords"; +$text["edit_document_access"] = "Editar acceso"; +$text["edit_document_notify"] = "Lista de notificacion"; +$text["edit_document_props_again"] = "Editar documento otra vez"; +$text["edit_document_props"] = "Editar documento"; +$text["edit_document"] = "Editar documento"; +$text["edit_existing_access"] = "Editar lista de acceso"; +$text["edit_existing_notify"] = "Editar lista de notificacion"; +$text["edit_folder_access"] = "Editar acceso"; +$text["edit_folder_notify"] = "Lista de notificacion"; +$text["edit_folder_props_again"] = "Editar de nuevo directorio"; +$text["edit_folder_props"] = "Editar directorio"; +$text["edit_folder"] = "Editar directorio"; +$text["edit_group"] = "Editar grupo..."; +$text["edit_inherit_access"] = "Heredar acceso"; +$text["edit_personal_default_keywords"] = "Editar palabras claves personales"; +$text["edit_user_details"] = "Edit User Details"; +$text["edit_user"] = "Editar usuario..."; +$text["edit"] = "edit"; +$text["editing_default_keyword_category"] = "Editando categoría"; +$text["editing_default_keywords"] = "Cambiando categorías..."; +$text["editing_document_props"] = "Editando documento..."; +$text["editing_folder_props"] = "Editando directorio..."; +$text["editing_group"] = "Editando grupo..."; +$text["editing_user_data"] = "Editando configuracion de usuario..."; +$text["editing_user"] = "Editando usuario..."; +$text["email_err_group"] = "Error sending email to one or more members of this group."; +$text["email_err_user"] = "Error sending email to user."; +$text["email_sent"] = "Email sent"; +$text["email"] = "Email"; +$text["empty_access_list"] = "Lista de acceso vacia"; +$text["empty_notify_list"] = "No hay entradas"; +$text["error_adding_session"] = "Error occured while creating session."; +$text["error_occured"] = "Un error ha ocurrido"; +$text["error_removing_old_sessions"] = "Error occured while removing old sessions"; +$text["error_updating_revision"] = "Error updating status of document revision."; +$text["exp_date"] = "Caducidad"; +$text["expired"] = "Expired"; +$text["expires"] = "Caduca"; +$text["file_info"] = "File Information"; +$text["file_size"] = "Tamaño"; +$text["file"] = "File"; +$text["folder_access_again"] = "Editar de nuevo acceso al directorio"; +$text["folder_add_access"] = "Añadiendo elemento a la lista de acceso..."; +$text["folder_contents"] = "Folders"; +$text["folder_del_access"] = "Eliminando elemento de la lista de acceso..."; +$text["folder_edit_access"] = "Editando acceso..."; +$text["folder_infos"] = "Informaciones"; +$text["folder_notify_again"] = "Editar de nuevo lista de notificacion"; +$text["folder_overview"] = "Información directorio"; +$text["folder_path"] = "(Ruta)"; +$text["folder_set_default_access"] = "Estableciendo modo de acceso predeterminado para el directorio..."; +$text["folder_set_inherit"] = "Eliminando ACL. Directorio heredara acceso..."; +$text["folder_set_not_inherit_copy"] = "Copiando lista de acceso..."; +$text["folder_set_not_inherit_empty"] = "Eliminando acceso heredado. Empezando con un ACL vacio..."; +$text["folder_title"] = "Directorio '[foldername]'"; +$text["folders_and_documents_statistic"] = "Vista de directorios y documentos"; +$text["foldertree"] = "Arbol de directorios"; +$text["from_approval_process"] = "from approval process"; +$text["from_review_process"] = "from review process"; +$text["global_default_keywords"] = "Palabras claves globales"; +$text["goto"] = "Ir a"; +$text["group_already_approved"] = "An approval has already been submitted on behalf of group"; +$text["group_already_reviewed"] = "A review has already been submitted on behalf of group"; +$text["group_approvers"] = "Group Approvers"; +$text["group_email_sent"] = "Email sent to group members"; +$text["group_exists"] = "Group already exists."; +$text["group_management"] = "Grupos"; +$text["group_members"] = "Miembros del grupo"; +$text["group_reviewers"] = "Group Reviewers"; +$text["group_unable_to_add"] = "Unable to add group"; +$text["group_unable_to_remove"] = "Unable to remove group"; +$text["group"] = "Grupo"; +$text["groups"] = "Grupos"; +$text["guest_login_disabled"] = "Guest login is disabled."; +$text["guest_login"] = "Acceso como invitado"; +$text["individual_approvers"] = "Individual Approvers"; +$text["individual_reviewers"] = "Individual Reviewers"; +$text["individuals"] = "Individuals"; +$text["inherits_access_msg"] = "Acceso esta siendo heredado.

    Copiar lista de acceso heredado
    Empezar con una lista de acceso vacia"; +$text["internal_error_exit"] = "Internal error. Unable to complete request. Exiting."; +$text["internal_error"] = "Internal error"; +$text["invalid_access_mode"] = "Invalid Access Mode"; +$text["invalid_action"] = "Invalid Action"; +$text["invalid_approval_status"] = "Invalid Approval Status"; +$text["invalid_create_date_end"] = "Invalid end date for creation date range."; +$text["invalid_create_date_start"] = "Invalid start date for creation date range."; +$text["invalid_doc_id"] = "Invalid Document ID"; +$text["invalid_folder_id"] = "Invalid Folder ID"; +$text["invalid_group_id"] = "Invalid Group ID"; +$text["invalid_link_id"] = "Invalid link identifier"; +$text["invalid_review_status"] = "Invalid Review Status"; +$text["invalid_sequence"] = "Invalid sequence value"; +$text["invalid_status"] = "Invalid Document Status"; +$text["invalid_target_doc_id"] = "Invalid Target Document ID"; +$text["invalid_target_folder"] = "Invalid Target Folder ID"; +$text["invalid_user_id"] = "Invalid User ID"; +$text["invalid_version"] = "Invalid Document Version"; +$text["is_admin"] = "Administrator Privilege"; +$text["js_no_approval_group"] = "Please select a approval group"; +$text["js_no_approval_status"] = "Please select the approval status"; +$text["js_no_comment"] = "No hay comentarios"; +$text["js_no_email"] = "Escriba su direccion Email"; +$text["js_no_file"] = "Por favor, seleccione un archivo"; +$text["js_no_keywords"] = "Especifique palabras clave"; +$text["js_no_login"] = "Por favor, escriba un nombre de usuario"; +$text["js_no_name"] = "Por favor, escriba un nombre"; +$text["js_no_override_status"] = "Please select the new [override] status"; +$text["js_no_pwd"] = "Necesita escribir su password"; +$text["js_no_query"] = "Escriba una busqueda"; +$text["js_no_review_group"] = "Please select a review group"; +$text["js_no_review_status"] = "Please select the review status"; +$text["js_pwd_not_conf"] = "Password y la confirmacion del password no coinciden"; +$text["js_select_user_or_group"] = "Seleccione al menos un usuario o un grupo"; +$text["js_select_user"] = "Por favor, seleccione un usuario"; +$text["keyword_exists"] = "Keyword already exists"; +$text["keywords"] = "Palabras clave"; +$text["language"] = "Lenguaje"; +$text["last_update"] = "Ultima modificacion"; +$text["last_updated_by"] = "Last updated by"; +$text["latest_version"] = "Latest Version"; +$text["linked_documents"] = "Documentos relacionados"; +$text["local_file"] = "Archivo local"; +$text["lock_document"] = "Bloquear"; +$text["lock_message"] = "Este documento ha sido bloqueado por [username].
    Solo usuarios autorizados pueden desbloquear este documento (vea el final de la pagina)."; +$text["lock_status"] = "Estado"; +$text["locking_document"] = "Bloqueando documento..."; +$text["logged_in_as"] = "Conectado"; +$text["login_error_text"] = "Error signing in. User ID or password incorrect."; +$text["login_error_title"] = "Sign in error"; +$text["login_not_found"] = "Este nombre de usuario no existe"; +$text["login_not_given"] = "Nombre de usuario no facilitado."; +$text["login_ok"] = "Sign in successful"; +$text["login"] = "Acceso"; +$text["logout"] = "Desconectar"; +$text["mime_type"] = "Tipo Mime"; +$text["move_document"] = "Mover documento"; +$text["move_folder"] = "Mover directorio"; +$text["move"] = "Move"; +$text["moving_document"] = "Moviendo documento..."; +$text["moving_folder"] = "Moviendo directorio..."; +$text["msg_document_expired"] = "El documento \"[documentname]\" (Ruta: \"[path]\") caduco el [expires]"; +$text["msg_document_updated"] = "El documento \"[documentname]\" (Ruta: \"[path]\") fue creado o actualizado el [updated]"; +$text["my_account"] = "Mi cuenta"; +$text["my_documents"] = "My Documents"; +$text["name"] = "Nombre"; +$text["new_default_keyword_category"] = "Nueva categoría"; +$text["new_default_keywords"] = "Agregar palabras claves"; +$text["new_equals_old_state"] = "Warning: Proposed status and existing status are identical. No action required."; +$text["new_user_image"] = "Nueva imagen"; +$text["no_action_required"] = "n/a"; +$text["no_action"] = "No action required"; +$text["no_active_user_docs"] = "There are currently no documents owned by the user that require review or approval."; +$text["no_approvers"] = "No approvers assigned."; +$text["no_default_keywords"] = "Sin palabras claves"; +$text["no_docs_to_approve"] = "There are currently no documents that require approval."; +$text["no_docs_to_review"] = "There are currently no documents that require review."; +$text["no_document_links"] = "Sin documentos relacionados"; +$text["no_documents"] = "Sin documentos"; +$text["no_group_members"] = "Este grupo no tiene miembros"; +$text["no_groups"] = "No hay grupos"; +$text["no_previous_versions"] = "No other versions found"; +$text["no_reviewers"] = "No reviewers assigned."; +$text["no_subfolders"] = "Sin subdirectorios"; +$text["no_update_cause_locked"] = "No puede actualizar este documento. Contacte con el usuario que lo bloqueo."; +$text["no_user_image"] = "No se encontro imagen"; +$text["no"] = "No"; +$text["not_approver"] = "User is not currently assigned as an approver of this document revision."; +$text["not_reviewer"] = "User is not currently assigned as a reviewer of this document revision."; +$text["notify_subject"] = "Documentos nuevos o caducados en DMS"; +$text["obsolete"] = "Obsolete"; +$text["old_folder"] = "old folder"; +$text["only_jpg_user_images"] = "Solo puede usar imagenes .jpg como imagenes de usuario"; +$text["op_finished"] = ": Hecho."; +$text["operation_not_allowed"] = "No tiene privilegios para esa accion"; +$text["override_content_status_complete"] = "Override Status Complete"; +$text["override_content_status"] = "Override Status"; +$text["override_privilege_insufficient"] = "Access denied. Privileges insufficient to override the status of this document."; +$text["overview"] = "Overview"; +$text["owner"] = "Propietario"; +$text["password"] = "Password"; +$text["pending_approval"] = "Documents pending approval"; +$text["pending_review"] = "Documents pending review"; +$text["personal_default_keywords"] = "Palabras claves personales"; +$text["previous_versions"] = "Previous Versions"; +$text["rejected"] = "Rejected"; +$text["released"] = "Released"; +$text["remove_document_link"] = "Eliminar vinculo"; +$text["remove_member"] = "Eliminar miembro"; +$text["removed_approver"] = "has been removed from the list of approvers."; +$text["removed_reviewer"] = "has been removed from the list of reviewers."; +$text["removing_default_keyword_category"] = "Eliminando categoría"; +$text["removing_default_keywords"] = "Eliminado palabras claves "; +$text["removing_document_link"] = "Eliminando vinculo al documento relacionado..."; +$text["removing_document"] = "Eliminando documento..."; +$text["removing_folder"] = "Eliminando directorio..."; +$text["removing_group"] = "Eliminando grupo del sistema..."; +$text["removing_member"] = "Eliminando miembro del grupo..."; +$text["removing_user"] = "Eliminando usuario del sistema..."; +$text["removing_version"] = "Eliminando versión [version]..."; +$text["review_document_complete_records_updated"] = "Document review completed and records updated"; +$text["review_document_complete"] = "Review Document: Complete"; +$text["review_document"] = "Review Document"; +$text["review_group"] = "Review Group"; +$text["review_status"] = "Review Status"; +$text["review_summary"] = "Review Summary"; +$text["review_update_failed"] = "Error updating review status. Update failed."; +$text["reviewer_added"] = "added as a reviewer"; +$text["reviewer_already_assigned"] = "is already assigned as a reviewer"; +$text["reviewer_already_removed"] = "has already been removed from review process or has already submitted a review"; +$text["reviewer_no_privilege"] = "is not sufficiently privileged to review this document"; +$text["reviewer_removed"] = "removed from review process"; +$text["reviewers"] = "Reviewers"; +$text["rm_default_keyword_category"] = "Eliminar categoría"; +$text["rm_default_keywords"] = "Eliminando palabras claves "; +$text["rm_document"] = "Eliminar documento"; +$text["rm_folder"] = "Eliminar directorio"; +$text["rm_group"] = "Eliminar este grupo"; +$text["rm_user"] = "Eliminar este usuario"; +$text["rm_version"] = "Eliminar versión"; +$text["root_folder"] = "Directorio raíz"; +$text["save"] = "Grabar"; +$text["search_in_all"] = "todos los Directorios"; +$text["search_in_current"] = "solo en el directorio ([foldername]) incluyendo subdirectorios"; +$text["search_in"] = "Buscar en"; +$text["search_mode_and"] = "todas las palabras"; +$text["search_mode_or"] = "al menos una palabra"; +$text["search_mode"] = "Modo"; +$text["search_no_results"] = "No hay documentos que coinciden con su busqueda"; +$text["search_query"] = "Buscar"; +$text["search_report"] = "Found [count] documents"; +$text["search_result_pending_approval"] = "status 'pending approval'"; +$text["search_result_pending_review"] = "status 'pending review'"; +$text["search_results_access_filtered"] = "Search results may contain content to which access has been denied."; +$text["search_results"] = "Resultados de la busqueda"; +$text["search_time"] = "Tiempo transcurrido: [time] seg."; +$text["search"] = "Busqueda"; +$text["select_one"] = "Seleccionar uno"; +$text["selected_document"] = "Documento seleccionado"; +$text["selected_folder"] = "Directorio seleccionado"; +$text["selection"] = "Selection"; +$text["seq_after"] = "Despues \"[prevname]\""; +$text["seq_end"] = "Al final"; +$text["seq_keep"] = "Mantener posicion"; +$text["seq_start"] = "Primera posicion"; +$text["sequence"] = "Secuencia"; +$text["set_default_access"] = "Set Default Access Mode"; +$text["set_expiry"] = "Set Expiry"; +$text["set_owner"] = "Establecer propietario"; +$text["set_reviewers_approvers"] = "Assign Reviewers and Approvers"; +$text["setting_expires"] = "Establecer caducidad..."; +$text["setting_owner"] = "Estableciendo propietario..."; +$text["setting_user_image"] = "
    Colocando imagen para usuario..."; +$text["show_all_versions"] = "Show All Revisions"; +$text["show_current_versions"] = "Show Current"; +$text["start"] = "Iniciar"; +$text["status_approval_rejected"] = "Draft rejected"; +$text["status_approved"] = "Approved"; +$text["status_approver_removed"] = "Approver removed from process"; +$text["status_change_summary"] = "Document revision changed from status '[oldstatus]' to status '[newstatus]'."; +$text["status_changed_by"] = "Status changed by"; +$text["status_not_approved"] = "Not approved"; +$text["status_not_reviewed"] = "Not reviewed"; +$text["status_reviewed"] = "Reviewed"; +$text["status_reviewer_rejected"] = "Draft rejected"; +$text["status_reviewer_removed"] = "Reviewer removed from process"; +$text["status_unknown"] = "Unknown"; +$text["status"] = "Status"; +$text["subfolder_list"] = "Subdirectorio"; +$text["submit_approval"] = "Submit approval"; +$text["submit_login"] = "Sign in"; +$text["submit_review"] = "Submit review"; +$text["theme"] = "Tema gráfico"; +$text["unable_to_add"] = "Unable to add"; +$text["unable_to_remove"] = "Unable to remove"; +$text["under_folder"] = "En directorio"; +$text["unknown_command"] = "Command not recognized."; +$text["unknown_group"] = "Unknown group id"; +$text["unknown_keyword_category"] = "Unknown category"; +$text["unknown_owner"] = "Unknown owner id"; +$text["unknown_user"] = "Unknown user id"; +$text["unlock_cause_access_mode_all"] = "Puede actualizarlo porque tiene modo de acceso \"all\". El bloqueo sera automaticamente eliminado."; +$text["unlock_cause_locking_user"] = "Puede actualizarlo porque fue quien lo bloqueo. El bloqueo sera automaticamente eliminado."; +$text["unlock_document"] = "Desbloquear"; +$text["unlocking_denied"] = "No tiene suficientes privilegios para desbloquear este documento"; +$text["unlocking_document"] = "Desbloqueando documento..."; +$text["update_approvers"] = "Update List of Approvers"; +$text["update_document"] = "Actualizar"; +$text["update_info"] = "Update Information"; +$text["update_locked_msg"] = "Este documento esta bloqueado."; +$text["update_reviewers_approvers"] = "Update List of Reviewers and Approvers"; +$text["update_reviewers"] = "Update List of Reviewers"; +$text["update"] = "Update"; +$text["updated_by"] = "Updated by"; +$text["updating_document"] = "Actualizando documento..."; +$text["upload_date"] = "Fecha de envio"; +$text["uploaded_by"] = "Enviado por"; +$text["uploaded"] = "Uploaded"; +$text["uploading_failed"] = "Envio (Upload) fallido. Por favor contacte con el Administrador."; +$text["use_default_keywords"] = "Utilizar palabras claves por defecto"; +$text["user_already_approved"] = "User has already submitted an approval of this document version"; +$text["user_already_reviewed"] = "User has already submitted a review of this document version"; +$text["user_approval_not_required"] = "No document approval required of user at this time."; +$text["user_exists"] = "User already exists."; +$text["user_image"] = "Imagen"; +$text["user_info"] = "User Information"; +$text["user_list"] = "Lista de usuarios"; +$text["user_login"] = "Nombre de usuario"; +$text["user_management"] = "Usuarios"; +$text["user_name"] = "Nombre completo"; +$text["user_removed_approver"] = "User has been removed from the list of individual approvers."; +$text["user_removed_reviewer"] = "User has been removed from the list of individual reviewers."; +$text["user_review_not_required"] = "No document review required of user at this time."; +$text["user"] = "Usuario"; +$text["users"] = "Usuarios"; +$text["version_info"] = "Version Information"; +$text["version_under_approval"] = "Version under approval"; +$text["version_under_review"] = "Version under review"; +$text["version"] = "Version"; +$text["view_document"] = "View Document"; +$text["view_online"] = "Ver online"; +$text["warning"] = "Warning"; +$text["wrong_pwd"] = "Su password es incorrecto. Intentelo de nuevo."; +$text["yes"] = "Si"; +// New as of 1.7.1. Require updated translation. +$text["documents"] = "Documents"; +$text["folders"] = "Folders"; +$text["no_folders"] = "No folders"; +$text["notification_summary"] = "Notification Summary"; + +$text["group_approval_summary"] = "Group approval summary"; +$text["group_review_summary"] = "Group review summary"; +$text["documents_locked_by_you"] = "Documents locked by you"; + +// New as of 1.7.2 +$text["all_pages"] = "All"; +$text["results_page"] = "Results Page"; + +// New +$text["sign_out"] = "sign out"; +$text["signed_in_as"] = "Signed in as"; +$text["assign_reviewers"] = "Assign Reviewers"; +$text["assign_approvers"] = "Assign Approvers"; +$text["override_status"] = "Override Status"; +$text["change_status"] = "Change Status"; +$text["change_assignments"] = "Change Assignments"; +$text["no_user_docs"] = "There are currently no documents owned by the user"; +$text["disclaimer"] = "This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the english and international laws."; + +$text["backup_tools"] = "Backup tools"; +$text["versioning_file_creation"] = "Versioning file creation"; +$text["archive_creation"] = "Archive creation"; +$text["files_deletion"] = "Files deletion"; +$text["folder"] = "Folder"; + +$text["unknown_id"] = "unknown id"; +$text["help"] = "Help"; + +$text["versioning_info"] = "Versioning info"; +$text["versioning_file_creation_warning"] = "With this operation you can create a file containing the versioning information of an entire DMS folder. After the creation every file will be saved inside the document folder."; +$text["archive_creation_warning"] = "With this operation you can create achive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup."; +$text["files_deletion_warning"] = "With this option you can delete all files of entire DMS folders. The versioning information will remain visible."; + +$text["backup_list"] = "Existings backup list"; +$text["backup_remove"] = "Remove backup file"; +$text["confirm_rm_backup"] = "Do you really want to remove the file \"[arkname]\"?
    Be careful: This action cannot be undone."; + +$text["document_deleted"] = "Document deleted"; +$text["linked_files"] = "Attachments"; +$text["invalid_file_id"] = "Invalid file ID"; +$text["rm_file"] = "Remove file"; +$text["confirm_rm_file"] = "Do you really want to remove file \"[name]\" of document \"[documentname]\"?
    Be careful: This action cannot be undone."; + +$text["edit_comment"] = "Edit comment"; + +// new from 1.9 + +$text["is_hidden"] = "Hide from users list"; +$text["log_management"] = "Log files management"; +$text["confirm_rm_log"] = "Do you really want to remove log file \"[logname]\"?
    Be careful: This action cannot be undone."; +$text["include_subdirectories"] = "Include subdirectories"; +$text["include_documents"] = "Include documents"; +$text["manager"] = "Manager"; +$text["toggle_manager"] = "Toggle manager"; + +// new from 2.0 + +$text["calendar"] = "Calendar"; +$text["week_view"] = "Week view"; +$text["month_view"] = "Month view"; +$text["year_view"] = "Year View"; +$text["add_event"] = "Add event"; +$text["edit_event"] = "Edit event"; + +$text["january"] = "January"; +$text["february"] = "February"; +$text["march"] = "March"; +$text["april"] = "April"; +$text["may"] = "May"; +$text["june"] = "June"; +$text["july"] = "July"; +$text["august"] = "August"; +$text["september"] = "September"; +$text["october"] = "October"; +$text["november"] = "November"; +$text["december"] = "December"; + +$text["sunday"] = "Sunday"; +$text["monday"] = "Monday"; +$text["tuesday"] = "Tuesday"; +$text["wednesday"] = "Wednesday"; +$text["thursday"] = "Thursday"; +$text["friday"] = "Friday"; +$text["saturday"] = "Saturday"; + +$text["from"] = "From"; +$text["to"] = "To"; + +$text["event_details"] = "Event details"; +$text["confirm_rm_event"] = "Do you really want to remove event \"[name]\"?
    Be careful: This action cannot be undone."; + +$text["dump_creation"] = "DB dump creation"; +$text["dump_creation_warning"] = "With this operation you can create a dump file of your database content. After the creation the dump file will be saved in the data folder of your server."; +$text["dump_list"] = "Existings dump files"; +$text["dump_remove"] = "Remove dump file"; +$text["confirm_rm_dump"] = "Do you really want to remove the file \"[dumpname]\"?
    Be careful: This action cannot be undone."; + +$text["confirm_rm_user"] = "Do you really want to remove the user \"[username]\"?
    Be careful: This action cannot be undone."; +$text["confirm_rm_group"] = "Do you really want to remove the group \"[groupname]\"?
    Be careful: This action cannot be undone."; + +$text["human_readable"] = "Human readable archive"; + +$text["email_header"] = "This is an automatic message from the DMS server."; +$text["email_footer"] = "You can always change your e-mail settings using 'My Account' functions"; + +$text["add_multiple_files"] = "Add multiple files (will use filename as document name)"; + +// new from 2.0.1 + +$text["max_upload_size"] = "Maximum upload size for each file"; + +?> diff --git a/op/.htaccess b/op/.htaccess new file mode 100644 index 000000000..85718b048 --- /dev/null +++ b/op/.htaccess @@ -0,0 +1,3 @@ +RewriteEngine on +RewriteCond %{REQUEST_URI} (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ +RewriteRule (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ $1op.ViewOnline.php?request=$2:$3 [PT] diff --git a/op/convert_excel.js b/op/convert_excel.js new file mode 100644 index 000000000..27053b7ff --- /dev/null +++ b/op/convert_excel.js @@ -0,0 +1,33 @@ +// MyDMS. Document Management System +// Copyright (C) 2002-2005 Markus Westphal +// Copyright (C) 2006-2008 Malcolm Cowe +// +// This program 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +//var logFile = fs.CreateTextFile("convertlog.txt", true); + +var source = WScript.Arguments(0); +var target = WScript.Arguments(1); + +var ExcelApp; +ExcelApp = new ActiveXObject("Excel.Application"); +var Newdoc; +Newdoc = ExcelApp.Workbooks.Open(source); +Newdoc.SaveAs(target, 44); // xlHTML = 44 +ExcelApp.Quit(); + + + +//logFile.Close(); diff --git a/op/convert_pp.js b/op/convert_pp.js new file mode 100644 index 000000000..195facb95 --- /dev/null +++ b/op/convert_pp.js @@ -0,0 +1,32 @@ +// MyDMS. Document Management System +// Copyright (C) 2002-2005 Markus Westphal +// Copyright (C) 2006-2008 Malcolm Cowe +// +// This program 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +//var logFile = fs.CreateTextFile("convertlog.txt", true); + +var source = WScript.Arguments(0); +var target = WScript.Arguments(1); + +var PPApp; +PPApp = new ActiveXObject("Powerpoint.Application"); +var Newdoc; +PPApp.Visible = true; +Newdoc = PPApp.Presentations.Open(source); +Newdoc.SaveAs(target, 12); // ppSaveAsHTML = 12 +PPApp.Quit(); + +//logFile.Close(); diff --git a/op/convert_word.js b/op/convert_word.js new file mode 100644 index 000000000..9147fb7f6 --- /dev/null +++ b/op/convert_word.js @@ -0,0 +1,33 @@ +// MyDMS. Document Management System +// Copyright (C) 2002-2005 Markus Westphal +// Copyright (C) 2006-2008 Malcolm Cowe +// +// This program 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +//var logFile = fs.CreateTextFile("convertlog.txt", true); + +var source = WScript.Arguments(0); +var target = WScript.Arguments(1); + +var WordApp; +WordApp = new ActiveXObject("Word.Application"); +var Newdoc; +Newdoc = WordApp.Documents.Open(source); +Newdoc.SaveAs(target, 8); // wdFormatHTML = 8 +WordApp.Quit(); + + + +//logFile.Close(); diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php new file mode 100644 index 000000000..ad39aa857 --- /dev/null +++ b/op/op.AddDocument.php @@ -0,0 +1,176 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderid = $_POST["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +if ($folder->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +$comment = sanitizeString($_POST["comment"]); +$version_comment = sanitizeString($_POST["version_comment"]); + +$keywords = sanitizeString($_POST["keywords"]); + +$reqversion = (int)$_POST["reqversion"]; +if ($reqversion<1) $reqversion=1; + +$sequence = $_POST["sequence"]; +if (!is_numeric($sequence)) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_sequence")); +} + +$expires = ($_POST["expires"] == "true") ? mktime(0,0,0, sanitizeString($_POST["expmonth"]), sanitizeString($_POST["expday"]), sanitizeString($_POST["expyear"])) : false; + +// Get the list of reviewers and approvers for this document. +$reviewers = array(); +$approvers = array(); +$reviewers["i"] = array(); +$reviewers["g"] = array(); +$approvers["i"] = array(); +$approvers["g"] = array(); + +// Retrieve the list of individual reviewers from the form. +if (isset($_POST["indReviewers"])) { + foreach ($_POST["indReviewers"] as $ind) { + $reviewers["i"][] = $ind; + } +} +// Retrieve the list of reviewer groups from the form. +if (isset($_POST["grpReviewers"])) { + foreach ($_POST["grpReviewers"] as $grp) { + $reviewers["g"][] = $grp; + } +} + +// Retrieve the list of individual approvers from the form. +if (isset($_POST["indApprovers"])) { + foreach ($_POST["indApprovers"] as $ind) { + $approvers["i"][] = $ind; + } +} +// Retrieve the list of approver groups from the form. +if (isset($_POST["grpApprovers"])) { + foreach ($_POST["grpApprovers"] as $grp) { + $approvers["g"][] = $grp; + } +} + +// add mandatory reviewers/approvers +$docAccess = $folder->getApproversList(); +$res=$user->getMandatoryReviewers(); +foreach ($res as $r){ + + if ($r['reviewerUserID']!=0){ + foreach ($docAccess["users"] as $usr) + if ($usr->getID()==$r['reviewerUserID']){ + $reviewers["i"][] = $r['reviewerUserID']; + break; + } + } + else if ($r['reviewerGroupID']!=0){ + foreach ($docAccess["groups"] as $grp) + if ($grp->getID()==$r['reviewerGroupID']){ + $reviewers["g"][] = $r['reviewerGroupID']; + break; + } + } +} +$res=$user->getMandatoryApprovers(); +foreach ($res as $r){ + + if ($r['approverUserID']!=0){ + foreach ($docAccess["users"] as $usr) + if ($usr->getID()==$r['approverUserID']){ + $approvers["i"][] = $r['approverUserID']; + break; + } + } + else if ($r['approverGroupID']!=0){ + foreach ($docAccess["groups"] as $grp) + if ($grp->getID()==$r['approverGroupID']){ + $approvers["g"][] = $r['approverGroupID']; + break; + } + } +} + +for ($file_num=0;$file_num $folder->getName())),getMLText("uploading_failed")); + } + + $userfiletmp = $_FILES["userfile"]["tmp_name"][$file_num]; + $userfiletype = sanitizeString($_FILES["userfile"]["type"][$file_num]); + $userfilename = sanitizeString($_FILES["userfile"]["name"][$file_num]); + + $lastDotIndex = strrpos(basename($userfilename), "."); + if (is_bool($lastDotIndex) && !$lastDotIndex) $fileType = "."; + else $fileType = substr($userfilename, $lastDotIndex); + + if ((count($_FILES["userfile"]["tmp_name"])==1)&&($_POST["name"]!="")) + $name = sanitizeString($_POST["name"]); + else $name = basename($userfilename); + + $res = $folder->addDocument($name, $comment, $expires, $user, $keywords, + $userfiletmp, basename($userfilename), + $fileType, $userfiletype, $sequence, + $reviewers, $approvers, $reqversion,$version_comment); + + if (is_bool($res) && !$res) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); + } + + add_log_line("?name=".$name."&folderid=".$folderid); +} + +header("Location:../out/out.ViewFolder.php?folderid=".$folderid."&showtree=".$_POST["showtree"]); + +?> diff --git a/op/op.AddDocumentLink.php b/op/op.AddDocumentLink.php new file mode 100644 index 000000000..7eb6984b8 --- /dev/null +++ b/op/op.AddDocumentLink.php @@ -0,0 +1,76 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +$public = (isset($_GET["public"]) && $_GET["public"] == "true") ? true : false; +if ($public && ($document->getAccessMode($user) == M_READ)) { + $public = false; +} + +if (!isset($_GET["docidform1"]) || !is_numeric($_GET["docidform1"]) || intval($_GET["docidform1"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_target_doc_id")); +} + +$docid = $_GET["docidform1"]; +$doc = getDocument($docid); + +if (!is_object($doc)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_doc_id")); +} + +if (!$document->addDocumentLink($docid, $user->getID(), $public)){ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.AddEvent.php b/op/op.AddEvent.php new file mode 100644 index 000000000..ca795ecf4 --- /dev/null +++ b/op/op.AddEvent.php @@ -0,0 +1,69 @@ + diff --git a/op/op.AddFile.php b/op/op.AddFile.php new file mode 100644 index 000000000..6f2ced0c9 --- /dev/null +++ b/op/op.AddFile.php @@ -0,0 +1,81 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["size"] > 0 && $_FILES['userfile']['error']!=0){ + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed")); +} + +$name = sanitizeString($_POST["name"]); +$comment = sanitizeString($_POST["comment"]); + +$userfiletmp = $_FILES["userfile"]["tmp_name"]; +$userfiletype = sanitizeString($_FILES["userfile"]["type"]); +$userfilename = sanitizeString($_FILES["userfile"]["name"]); + +$lastDotIndex = strrpos(basename($userfilename), "."); +if (is_bool($lastDotIndex) && !$lastDotIndex) + $fileType = "."; +else + $fileType = substr($userfilename, $lastDotIndex); + +$res = $document->addDocumentFile($name, $comment, $user, $userfiletmp, + basename($userfilename),$fileType, $userfiletype ); + +if (is_bool($res) && !$res) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); +} + +add_log_line("?name=".$name."&documentid=".$documentid); + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + + +?> diff --git a/op/op.AddSubFolder.php b/op/op.AddSubFolder.php new file mode 100644 index 000000000..11e93a5f4 --- /dev/null +++ b/op/op.AddSubFolder.php @@ -0,0 +1,70 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} +$folderid = $_POST["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +if ($folder->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +$sequence = $_POST["sequence"]; + +if (!is_numeric($sequence)) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_sequence")); +} + +$name = sanitizeString($_POST["name"]); +$comment = sanitizeString($_POST["comment"]); +$subFolder = $folder->addSubFolder($name, $comment, $user, $sequence); + +if (!is_object($subFolder)) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); +} + +add_log_line("?name=".$name."&folderid=".$folderid); + +header("Location:../out/out.ViewFolder.php?folderid=".$folderid."&showtree=".$_POST["showtree"]); + +?> diff --git a/op/op.ApproveDocument.php b/op/op.ApproveDocument.php new file mode 100644 index 000000000..b6d79c271 --- /dev/null +++ b/op/op.ApproveDocument.php @@ -0,0 +1,224 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_POST["version"]; +$content = $document->getContentByVersion($version); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// operation is admitted only for last deocument version +$latestContent = $document->getLatestContent(); +if ($latestContent->getVersion()!=$version) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// verify if document has expired +if ($document->hasExpired()){ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["approvalStatus"]) || !is_numeric($_POST["approvalStatus"]) || + (intval($_POST["approvalStatus"])!=1 && intval($_POST["approvalStatus"])!=-1)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_approval_status")); +} + +// retrieve the approve status for the current user. +$approvalStatus = $user->getApprovalStatus($documentid, $version); +if (count($approvalStatus["indstatus"]) == 0 && count($approvalStatus["grpstatus"]) == 0) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if ($_POST["approvalType"] == "ind") { + + $indApprover = true; + if (count($approvalStatus["indstatus"])==0) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + if ($approvalStatus["indstatus"][0]["status"]==-2) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + + // User is eligible to make this update. + + $comment = sanitizeString($_POST["comment"]); + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $approvalStatus["indstatus"][0]["approveID"] ."', '". + $_POST["approvalStatus"] ."', '". $comment ."', NOW(), '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !res) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("approval_update_failed")); + } + else { + // Send an email notification to the document updater. + $subject = $settings->_siteName.": ".$document->getName().", v.".$version." - ".getMLText("approval_submit_email"); + $message = getMLText("approval_submit_email")."\r\n"; + $message .= + getMLText("name").": ".$document->getName()."\r\n". + getMLText("version").": ".$version."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() .">\r\n". + getMLText("status").": ".getApprovalStatusText($_POST["approvalStatus"])."\r\n". + getMLText("comment").": ".$comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$documentid."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toIndividual($user, $content->getUser(), $subject, $message); + + // Send notification to subscribers. + $nl=$document->getNotifyList(); + Email::toList($user, $nl["users"], $subject, $message); + foreach ($nl["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + } +} +else if ($_POST["approvalType"] == "grp") { + + $grpApprover=false; + foreach ($approvalStatus["grpstatus"] as $gs) { + if ($_POST["approvalGroup"] == $gs["required"]) { + if ($gs["status"]==-2) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + $grpStatus=$gs; + $grpApprover=true; + break; + } + } + if (!$grpApprover) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + + // User is eligible to make this update. + + $comment = sanitizeString($_POST["comment"]); + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $grpStatus["approveID"] ."', '". + $_POST["approvalStatus"] ."', '". $comment ."', NOW(), '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !res) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("approval_update_failed")); + } + else { + // Send an email notification to the document updater. + $grp = getGroup($grpStatus["required"]); + + $subject = $settings->_siteName.": ".$document->getName().", v.".$version." - ".getMLText("approval_submit_email"); + $message = getMLText("approval_submit_email")."\r\n"; + $message .= + getMLText("name").": ".$document->getName()."\r\n". + getMLText("version").": ".$version."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() .">\r\n". + getMLText("status").": ".getApprovalStatusText($_POST["approvalStatus"])."\r\n". + getMLText("comment").": ".$comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$documentid."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toIndividual($user, $content->getUser(), $subject, $message); + + // Send notification to subscribers. + $nl=$document->getNotifyList(); + Email::toList($user, $nl["users"], $subject, $message); + foreach ($nl["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + } +} + +// +// Check to see if the overall status for the document version needs to be +// updated. +// + +if ($_POST["approvalStatus"]==-1){ + + $content->setStatus(S_REJECTED,$comment,$user); + +}else{ + + $docApprovalStatus = $content->getApprovalStatus(true); + if (is_bool($docApprovalStatus) && !$docApprovalStatus) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_retrieve_approval_snapshot")); + } + $approvalCT = 0; + $approvalTotal = 0; + foreach ($docApprovalStatus as $drstat) { + if ($drstat["status"] == 1) { + $approvalCT++; + } + if ($drstat["status"] != -2) { + $approvalTotal++; + } + } + // If all approvals have been received and there are no rejections, retrieve a + // count of the approvals required for this document. + if ($approvalCT == $approvalTotal) { + // Change the status to released. + $newStatus=2; + $content->setStatus($newStatus, getMLText("automatic_status_update"), $user); + } +} + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.CreateDump.php b/op/op.CreateDump.php new file mode 100644 index 000000000..3dff6dc6a --- /dev/null +++ b/op/op.CreateDump.php @@ -0,0 +1,77 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +$dump_name = $settings->_contentDir.time().".sql"; + +$h=fopen($dump_name,"w"); + +if (is_bool($h)&&!$h) + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + +$tables = $db->TableList('TABLES'); + +foreach ($tables as $table){ + + $query = "SELECT * FROM ".$table; + $records = $db->getResultArray($query); + + fwrite($h,"\n-- TABLE: ".$table."--\n\n"); + + foreach ($records as $record){ + + $values=""; + for ($i=0;$i<(count($record)/2);$i++){ + if (is_numeric($record[$i])) $values .= $record[$i]; + else $values .= "'".$record[$i]."'"; + + if ($i<(count($record)/2-1)) $values .= ","; + } + + fwrite($h, "INSERT INTO " . $table . " VALUES (" . $values . ");\n"); + } +} + +fclose($h); + +if (gzcompressfile($dump_name,9)) unlink($dump_name); +else UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + +add_log_line(); + +header("Location:../out/out.BackupTools.php"); + +?> diff --git a/op/op.CreateFolderArchive.php b/op/op.CreateFolderArchive.php new file mode 100644 index 000000000..2ad7820aa --- /dev/null +++ b/op/op.CreateFolderArchive.php @@ -0,0 +1,210 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +// Adds file header to the tar file, it is used before adding file content. +// f: file resource (provided by eg. fopen) +// phisfn: path to file +// archfn: path to file in archive, directory names must be followed by '/' +// code by calmarius at nospam dot atw dot hu +function TarAddHeader($f,$phisfn,$archfn) +{ + $info=stat($phisfn); + $ouid=sprintf("%6s ", decoct($info[4])); + $ogid=sprintf("%6s ", decoct($info[5])); + $omode=sprintf("%6s ", decoct(fileperms($phisfn))); + $omtime=sprintf("%11s", decoct(filemtime($phisfn))); + if (@is_dir($phisfn)) + { + $type="5"; + $osize=sprintf("%11s ", decoct(0)); + } + else + { + $type=''; + $osize=sprintf("%11s ", decoct(filesize($phisfn))); + clearstatcache(); + } + $dmajor = ''; + $dminor = ''; + $gname = ''; + $linkname = ''; + $magic = ''; + $prefix = ''; + $uname = ''; + $version = ''; + $chunkbeforeCS=pack("a100a8a8a8a12A12",$archfn, $omode, $ouid, $ogid, $osize, $omtime); + $chunkafterCS=pack("a1a100a6a2a32a32a8a8a155a12", $type, $linkname, $magic, $version, $uname, $gname, $dmajor, $dminor ,$prefix,''); + + $checksum = 0; + for ($i=0; $i<148; $i++) $checksum+=ord(substr($chunkbeforeCS,$i,1)); + for ($i=148; $i<156; $i++) $checksum+=ord(' '); + for ($i=156, $j=0; $i<512; $i++, $j++) $checksum+=ord(substr($chunkafterCS,$j,1)); + + fwrite($f,$chunkbeforeCS,148); + $checksum=sprintf("%6s ",decoct($checksum)); + $bdchecksum=pack("a8", $checksum); + fwrite($f,$bdchecksum,8); + fwrite($f,$chunkafterCS,356); + return true; +} + +// Writes file content to the tar file must be called after a TarAddHeader +// f:file resource provided by fopen +// phisfn: path to file +// code by calmarius at nospam dot atw dot hu +function TarWriteContents($f,$phisfn) +{ + if (@is_dir($phisfn)) + { + return; + } + else + { + $size=filesize($phisfn); + $padding=$size % 512 ? 512-$size%512 : 0; + $f2=fopen($phisfn,"rb"); + while (!feof($f2)) fwrite($f,fread($f2,1024*1024)); + $pstr=sprintf("a%d",$padding); + fwrite($f,pack($pstr,'')); + } +} + +// Adds 1024 byte footer at the end of the tar file +// f: file resource +// code by calmarius at nospam dot atw dot hu +function TarAddFooter($f) +{ + fwrite($f,pack('a1024','')); +} + +// thanks to Doudoux +function getFolderPathPlainAST($folder) { + $path=""; + $folderPath = $folder->getPath(); + for ($i = 0; $i < count($folderPath); $i++) { + $path .= $folderPath[$i]->getName(); + if ($i+1 < count($folderPath)) $path .= "/"; + } + return $path; +} + +function createFolderTar($folder,$ark) +{ + global $settings,$human_readable; + + $documents=$folder->getDocuments(); + foreach ($documents as $document){ + + if (file_exists($settings->_contentDir.$document->getDir())){ + + if ($human_readable){ + + // create an archive containing the files with original names and DMS path + // thanks to Doudoux + + $latestContent = $document->getLatestContent(); + if (is_object($latestContent)) + { + TarAddHeader( + $ark, + $settings->_contentDir.$latestContent->getDir().$latestContent->getVersion().$latestContent->getFileType(), + getFolderPathPlainAST($folder)."/".$document->getID()."_".mydmsDecodeString($latestContent->getOriginalFileName())); + + TarWriteContents($ark, $settings->_contentDir.$latestContent->getDir().$latestContent->getVersion().$latestContent->getFileType()); + } + + }else{ + + // create a server backup archive + + $handle = opendir($settings->_contentDir.$document->getDir()); + while ($entry = readdir($handle) ) + { + if (!is_dir($settings->_contentDir.$document->getDir().$entry)){ + + TarAddHeader($ark,$settings->_contentDir.$document->getDir().$entry,$document->getDir().$entry); + TarWriteContents($ark,$settings->_contentDir.$document->getDir().$entry); + } + + } + closedir($handle); + } + } + } + + $subFolders=$folder->getSubfolders(); + foreach ($subFolders as $folder) + if (!createFolderTar($folder,$ark)) + return false; + + return true; +} + +if (!isset($_GET["targetidform2"]) || !is_numeric($_GET["targetidform2"]) || intval($_GET["targetidform2"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); +} +$folderid = $_GET["targetidform2"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); +} + +$human_readable = (isset($_GET["human_readable"]) && $_GET["human_readable"]==1 ? true : false); + +if ($human_readable)$ark_name = $settings->_contentDir.time()."_".$folderid."_HR.tar"; +else $ark_name = $settings->_contentDir.time()."_".$folderid.".tar"; + +$ark = fopen($ark_name,"w"); + +if (!createFolderTar($folder,$ark)) { + fclose($ark); + unlink($ark_name); + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); +} + +TarAddFooter($ark); +fclose($ark); + +if (gzcompressfile($ark_name,9)) unlink($ark_name); +else UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + +add_log_line(); + +header("Location:../out/out.BackupTools.php"); + +?> diff --git a/op/op.CreateStatusIndex.php b/op/op.CreateStatusIndex.php new file mode 100644 index 000000000..aaff1e1b4 --- /dev/null +++ b/op/op.CreateStatusIndex.php @@ -0,0 +1,97 @@ +isAdmin()) { + print "

    Error: User must have administrative privileges to create the status index.

    "; + UI::contentContainerEnd(); + UI::htmlEndPage(); + exit; +} + +if (!isset($_GET["genIndex"]) || $_GET["genIndex"]!=1) { + print "
    "; + print ""; + print "

    "; + print "
    "; + UI::contentContainerEnd(); + UI::htmlEndPage(); + exit; +} + +$queryStr = "SELECT `tblDocumentContent`.`document`, `tblDocumentContent`.`version` FROM `tblDocumentContent`"; +$resArr = $db->getResultArray($queryStr); +if (is_bool($resArr)) { + print "

    Error: unable to retrieve document content listing.

    "; + UI::contentContainerEnd(); + UI::htmlEndPage(); + exit; +} + +print "
      "; +foreach ($resArr as $row) { + echo "
    • Creating status log for: '".$row["document"]."', version: '".$row["version"]."'"; + $queryStr = "INSERT INTO `tblDocumentStatus` (`documentID`, `version`) ". + "VALUES ('".$row["document"]."', '".$row["version"]."')"; + if (!$db->getResult($queryStr)) { + print "

      Error: unable to insert status row.

      "; + echo "
    • "; + UI::contentContainerEnd(); + UI::htmlEndPage(); + exit; + } + $statusID = $db->getInsertID(); + $queryStr = "INSERT INTO `tblDocumentStatusLog` (`statusID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('".$statusID."', '2', '-', NOW(), '".$user->getID()."')"; + if (!$db->getResult($queryStr)) { + print "

      Error: unable to insert status log entry.

      "; + echo ""; + UI::contentContainerEnd(); + UI::htmlEndPage(); + exit; + } + echo ""; +} +print "
        "; +print "

        Status Index Generation is complete.

        "; +UI::contentContainerEnd(); +UI::htmlEndPage(); +?> diff --git a/op/op.CreateSubFolderIndex.php b/op/op.CreateSubFolderIndex.php new file mode 100644 index 000000000..ee42ffbda --- /dev/null +++ b/op/op.CreateSubFolderIndex.php @@ -0,0 +1,117 @@ +isAdmin()) { + UI::contentContainer("

        Permission denied.

        "); + UI::htmlPageEnd(); + exit; +} + +function getTime() { + if (function_exists('microtime')) { + $tm = microtime(); + $tm = explode(' ', $tm); + return (float) sprintf('%f', $tm[1] + $tm[0]); + } + return time(); +} + + +// ------------------------------------- Suche starten -------------------------------------------- + +UI::contentContainerStart(); + +$startTime = getTime(); +$results = array(); +//searchInFolder($startFolder); + +// +// Construct the SQL query that will be used to search the database. +// + +// Create the keyword search string. This search spans up to three columns +// in the database: keywords, name and comment. + +// +// The base query. +// +$searchQuery = "SELECT `tblDocuments`.* FROM `tblDocuments` "; + +// Send the search query to the database. +$resArr = $db->getResultArray($searchQuery); +// Assemble the results into an array of MyDMS Document objects. +if (!is_bool($resArr) && count($resArr)>0) { + echo "
          "; + foreach($resArr as $docArr) { + $doc = new Document($docArr["id"], + $docArr["name"], + $docArr["comment"], + $docArr["date"], + $docArr["expires"], + $docArr["owner"], + $docArr["folder"], + $docArr["inheritAccess"], + $docArr["defaultAccess"], + $docArr["lockUser"], + $docArr["keywords"], + $docArr["sequence"]); + // Make sure that the folder search path is also updated. + $folder = $doc->getFolder(); + $path = $folder->getPath(); + $flist = ""; + foreach ($path as $f) { + $flist .= ":".$f->getID(); + } + if (strlen($flist)>1) { + $flist .= ":"; + } + $queryStr = "UPDATE tblDocuments SET folderList = '" . $flist . "' WHERE id = ". $doc->getID(); + $db->getResult($queryStr); + echo "
        1. Updating docID '".$doc->getID()."' -- '".$flist."'
        2. "; + } + echo "
        "; +} + +$searchTime = getTime() - $startTime; +$searchTime = round($searchTime, 2); +echo "

        "; +printMLText("search_time", array("time" => $searchTime)); + +UI::contentContainerEnd(); +UI::htmlEndPage(); +?> diff --git a/op/op.CreateVersioningFiles.php b/op/op.CreateVersioningFiles.php new file mode 100644 index 000000000..d15416e23 --- /dev/null +++ b/op/op.CreateVersioningFiles.php @@ -0,0 +1,75 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +function createVersionigFiles($folder) +{ + global $settings; + + $documents = $folder->getDocuments(); + foreach ($documents as $document) + if (!createVersionigFile($document)) + return false; + + $subFolders = $folder->getSubFolders(); + + foreach ($subFolders as $folder) + if (!createVersionigFiles($folder)) + return false; + + return true; +} + +if (!isset($_GET["targetidform1"]) || !is_numeric($_GET["targetidform1"]) || intval($_GET["targetidform1"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); +} +$folderid = $_GET["targetidform1"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); +} + +if (!createVersionigFiles($folder)) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); +} + +add_log_line(); + +header("Location:../out/out.BackupTools.php"); + +?> diff --git a/op/op.DefaultKeywords.php b/op/op.DefaultKeywords.php new file mode 100644 index 000000000..5f344bd4d --- /dev/null +++ b/op/op.DefaultKeywords.php @@ -0,0 +1,179 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +$action = $_GET["action"]; + +//Neue Kategorie anlegen ----------------------------------------------------------------------------- +if ($action == "addcategory") { + + $name = sanitizeString($_GET["name"]); + if (is_object(getKeywordCategoryByName($name, $settings->_adminID))) { + UI::exitError(getMLText("admin_tools"),getMLText("keyword_exists")); + } + $newCategory = addKeywordCategory($settings->_adminID, $name); + if (!$newCategory) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } + $categoryid=$newCategory->getID(); +} + +//Kategorie löschen ---------------------------------------------------------------------------------- +else if ($action == "removecategory") { + + if (!isset($_GET["categoryid"]) || !is_numeric($_GET["categoryid"]) || intval($_GET["categoryid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_keyword_category")); + } + $categoryid = $_GET["categoryid"]; + $category = getKeywordCategory($categoryid); + if (!is_object($category)) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_keyword_category")); + } + + $owner = $category->getOwner(); + if ($owner->getID() != $settings->_adminID) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + } + if (!$category->remove()) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } + $categoryid=-1; +} + +//Kategorie bearbeiten: Neuer Name -------------------------------------------------------------------- +else if ($action == "editcategory") { + + if (!isset($_GET["categoryid"]) || !is_numeric($_GET["categoryid"]) || intval($_GET["categoryid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_keyword_category")); + } + $categoryid = $_GET["categoryid"]; + $category = getKeywordCategory($categoryid); + if (!is_object($category)) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_keyword_category")); + } + + $owner = $category->getOwner(); + if ($owner->getID() != $settings->_adminID) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + } + + $name = sanitizeString($_GET["name"]); + if (!$category->setName($name)) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } +} + +//Kategorie bearbeiten: Neue Stichwortliste ---------------------------------------------------------- +else if ($action == "newkeywords") { + + $categoryid = sanitizeString($_GET["categoryid"]); + $category = getKeywordCategory($categoryid); + $owner = $category->getOwner(); + if ($owner->getID() != $settings->_adminID) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + } + + $keywords = sanitizeString($_GET["keywords"]); + + if (!$category->addKeywordList($keywords)) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } +} + +//Kategorie bearbeiten: Stichwortliste bearbeiten ---------------------------------------------------------- +else if ($action == "editkeywords") +{ + if (!isset($_GET["categoryid"]) || !is_numeric($_GET["categoryid"]) || intval($_GET["categoryid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_keyword_category")); + } + $categoryid = $_GET["categoryid"]; + $category = getKeywordCategory($categoryid); + if (!is_object($category)) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_keyword_category")); + + } + + $owner = $category->getOwner(); + if ($owner->getID() != $settings->_adminID) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + } + + if (!isset($_GET["keywordsid"]) || !is_numeric($_GET["keywordsid"]) || intval($_GET["keywordsid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); + } + $keywordsid = $_GET["keywordsid"]; + + $keywords = sanitizeString($_GET["keywords"]); + if (!$category->editKeywordList($keywordsid, $keywords)) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } +} + +//Kategorie bearbeiten: Neue Stichwortliste löschen ---------------------------------------------------------- +else if ($action == "removekeywords") { + + if (!isset($_GET["categoryid"]) || !is_numeric($_GET["categoryid"]) || intval($_GET["categoryid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_keyword_category")); + } + $categoryid = $_GET["categoryid"]; + $category = getKeywordCategory($categoryid); + if (!is_object($category)) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_keyword_category")); + } + + $owner = $category->getOwner(); + if ($owner->getID() != $settings->_adminID) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + } + + if (!isset($_GET["keywordsid"]) || !is_numeric($_GET["keywordsid"]) || intval($_GET["keywordsid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); + } + $keywordsid = $_GET["keywordsid"]; + + if (!$category->removeKeywordList($keywordsid)) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } +} +else { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_command")); +} + +header("Location:../out/out.DefaultKeywords.php?categoryid=".$categoryid); + +?> diff --git a/op/op.DocumentAccess.php b/op/op.DocumentAccess.php new file mode 100644 index 000000000..044f3aa7e --- /dev/null +++ b/op/op.DocumentAccess.php @@ -0,0 +1,189 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +switch ($_GET["action"]) { + case "setowner": + case "delaccess": + case "inherit": + $action = $_GET["action"]; + break; + case "setdefault": + case "editaccess": + case "addaccess": + $action = $_GET["action"]; + if (!isset($_GET["mode"]) || !is_numeric($_GET["mode"]) || $_GET["mode"]M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_access_mode")); + } + $mode = $_GET["mode"]; + break; + case "notinherit": + $action = $_GET["action"]; + if (strcasecmp($_GET["mode"], "copy") && strcasecmp($_GET["mode"], "empty")) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_access_mode")); + } + $mode = $_GET["mode"]; + break; + default: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_action")); + break; +} + +if (isset($_GET["userid"])) { + if (!is_numeric($_GET["userid"])) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_user")); + } + + if (!strcasecmp($action, "addaccess") && $_GET["userid"]==-1) { + $userid = -1; + } + else { + if (!is_object(getUser($_GET["userid"]))) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_user")); + } + $userid = $_GET["userid"]; + } +} + +if (isset($_GET["groupid"])) { + if (!is_numeric($_GET["groupid"])) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_group")); + } + if (!strcasecmp($action, "addaccess") && $_GET["groupid"]==-1) { + $groupid = -1; + } + else { + if (!is_object(getGroup($_GET["groupid"]))) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_group")); + } + $groupid = $_GET["groupid"]; + } +} + +//Ändern des Besitzers ---------------------------------------------------------------------------- +if ($action == "setowner") { + if (!$user->isAdmin()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + if (!isset($_GET["ownerid"]) || !is_numeric($_GET["ownerid"]) || $_GET["ownerid"]<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_user")); + } + + $newOwner = getUser($_GET["ownerid"]); + + if (!is_object($newOwner)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_user")); + } + $document->setOwner($newOwner); +} + +//Änderung auf nicht erben ------------------------------------------------------------------------ +else if ($action == "notinherit") { + + $defAccess = $document->getDefaultAccess(); + $document->setInheritAccess(false); + $document->setDefaultAccess($defAccess); + + //copy ACL of parent folder + if ($mode == "copy") { + $accessList = $folder->getAccessList(); + foreach ($accessList["users"] as $userAccess) + $document->addAccess($userAccess->getMode(), $userAccess->getUserID(), true); + foreach ($accessList["groups"] as $groupAccess) + $document->addAccess($groupAccess->getMode(), $groupAccess->getGroupID(), false); + } +} + +//Änderung auf erben ------------------------------------------------------------------------------ +else if ($action == "inherit") { + $document->clearAccessList(); + $document->setInheritAccess(true); +} + +//Standardberechtigung setzen---------------------------------------------------------------------- +else if ($action == "setdefault") { + $document->setDefaultAccess($mode); +} + +//Bestehende Berechtigung änndern ----------------------------------------------------------------- +else if ($action == "editaccess") { + if (isset($userid)) { + $document->changeAccess($mode, $userid, true); + } + else if (isset($groupid)) { + $document->changeAccess($mode, $groupid, false); + } +} + +//Berechtigung löschen ---------------------------------------------------------------------------- +else if ($action == "delaccess") { + if (isset($userid)) { + $document->removeAccess($userid, true); + } + else if (isset($groupid)) { + $document->removeAccess($groupid, false); + } +} + + //Neue Berechtigung hinzufügen -------------------------------------------------------------------- +else if ($action == "addaccess") { + if (isset($userid) && $userid != -1) { + $document->addAccess($mode, $userid, true); + } + if (isset($groupid) && $groupid != -1) { + $document->addAccess($mode, $groupid, false); + } +} + +add_log_line(""); + +header("Location:../out/out.DocumentAccess.php?documentid=".$documentid); + +?> diff --git a/op/op.DocumentNotify.php b/op/op.DocumentNotify.php new file mode 100644 index 000000000..9c4e2a497 --- /dev/null +++ b/op/op.DocumentNotify.php @@ -0,0 +1,149 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if (!isset($_GET["action"]) || (strcasecmp($_GET["action"], "delnotify") && strcasecmp($_GET["action"],"addnotify"))) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_action")); +} + +$action = $_GET["action"]; + +if (isset($_GET["userid"]) && (!is_numeric($_GET["userid"]) || $_GET["userid"]<-1)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_user")); +} + +$userid = $_GET["userid"]; + +if (isset($_GET["groupid"]) && (!is_numeric($_GET["groupid"]) || $_GET["groupid"]<-1)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_group")); +} + +$groupid = $_GET["groupid"]; + +if (isset($_GET["groupid"])&&$_GET["groupid"]!=-1){ + $group=getGroup($groupid); + if (!$group->isMember($user,true) && !$user->isAdmin()) + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +//Benachrichtigung löschen ------------------------------------------------------------------------ +if ($action == "delnotify"){ + if (isset($userid)) { + $res = $document->removeNotify($userid, true); + } + else if (isset($groupid)) { + $res = $document->removeNotify($groupid, false); + } + switch ($res) { + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),isset($userid) ? getMLText("unknown_user") : getMLText("unknown_group")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("already_subscribed")); + break; + case -4: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case 0: + break; + } +} + + //Benachrichtigung hinzufügen --------------------------------------------------------------------- +else if ($action == "addnotify") { + + if ($userid != -1) { + $res = $document->addNotify($userid, true); + switch ($res) { + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_user")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("already_subscribed")); + break; + case -4: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case 0: + break; + } + } + if ($groupid != -1) { + $res = $document->addNotify($groupid, false); + switch ($res) { + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("unknown_group")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("already_subscribed")); + break; + case -4: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case 0: + break; + } + } + +} + +header("Location:../out/out.DocumentNotify.php?documentid=".$documentid); + +?> diff --git a/op/op.Download.php b/op/op.Download.php new file mode 100644 index 000000000..d6693ac18 --- /dev/null +++ b/op/op.Download.php @@ -0,0 +1,227 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); + } + + $documentid = $_GET["documentid"]; + $document = getDocument($documentid); + + if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); + + } + $folder = $document->getFolder(); + $docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + + if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + + if (!is_numeric($_GET["version"]) || intval($_GET["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); + } + $version = $_GET["version"]; + $content = $document->getContentByVersion($version); + + if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); + } + + //header("Content-Type: application/force-download; name=\"" . mydmsDecodeString($content->getOriginalFileName()) . "\""); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($settings->_contentDir . $content->getPath() )); + header("Content-Disposition: attachment; filename=\"" . mydmsDecodeString($content->getOriginalFileName()) . "\""); + //header("Expires: 0"); + header("Content-Type: " . $content->getMimeType()); + //header("Cache-Control: no-cache, must-revalidate"); + header("Cache-Control: must-revalidate"); + //header("Pragma: no-cache"); + + readfile($settings->_contentDir . $content->getPath()); + +}else if (isset($_GET["file"])){ + + // file download + + if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); + } + + $documentid = $_GET["documentid"]; + $document = getDocument($documentid); + + if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); + + } + $folder = $document->getFolder(); + $docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + + if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + + if (!is_numeric($_GET["file"]) || intval($_GET["file"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_file_id")); + } + $fileid = $_GET["file"]; + $file = getDocumentFile($fileid); + + if (!is_object($file)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_file_id")); + } + + header("Content-Type: application/force-download; name=\"" . mydmsDecodeString($file->getOriginalFileName()) . "\""); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($settings->_contentDir . $file->getPath() )); + header("Content-Disposition: attachment; filename=\"" . mydmsDecodeString($file->getOriginalFileName()) . "\""); + //header("Expires: 0"); + //header("Content-Type: " . $content->getMimeType()); + //header("Cache-Control: no-cache, must-revalidate"); + header("Cache-Control: must-revalidate"); + //header("Pragma: no-cache"); + + readfile($settings->_contentDir . $file->getPath()); + +}else if (isset($_GET["arkname"])){ + + // backup download + + if (!$user->isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + } + + if (!isset($_GET["arkname"]) || !file_exists($settings->_contentDir.$_GET["arkname"]) ) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); + } + + header('Content-Description: File Transfer'); + //header("Content-Type: application/force-download; name=\"" . $_GET["arkname"] . "\""); + //header("Content-Type: application/octet-stream"); + header("Content-Type: application/zip"); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($settings->_contentDir . $_GET["arkname"] )); + header("Content-Disposition: attachment; filename=\"" .$_GET["arkname"] . "\""); +// header("Expires: 0"); + //header("Content-Type: " . $content->getMimeType()); + //header("Cache-Control: no-cache, must-revalidate"); +// header("Cache-Control: must-revalidate"); + header("Cache-Control: public"); + //header("Pragma: no-cache"); + + readfile($settings->_contentDir .$_GET["arkname"] ); + +}else if (isset($_GET["logname"])){ + + // log download + + if (!$user->isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + } + + if (!isset($_GET["logname"]) || !file_exists($settings->_contentDir.$_GET["arkname"]) ) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); + } + + header("Content-Type: text/plain; name=\"" . $_GET["logname"] . "\""); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($settings->_contentDir . $_GET["logname"] )); + header("Content-Disposition: attachment; filename=\"" .$_GET["logname"] . "\""); + header("Cache-Control: must-revalidate"); + + readfile($settings->_contentDir .$_GET["logname"] ); + +}else if (isset($_GET["vfile"])){ + + // versioning info download + + $documentid = $_GET["documentid"]; + $document = getDocument($documentid); + + if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); + + } + + // update infos + createVersionigFile($document); + + header("Content-Type: text/plain; name=\"" . $_GET["logname"] . "\""); + //header("Content-Type: application/force-download; name=\"" . $settings->_versioningFileName . "\""); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($settings->_contentDir.$document->getDir().$settings->_versioningFileName )."\""); + header("Content-Disposition: attachment; filename=\"". $settings->_versioningFileName . "\""); + //header("Expires: 0"); + //header("Content-Type: " . $content->getMimeType()); + //header("Cache-Control: no-cache, must-revalidate"); + header("Cache-Control: must-revalidate"); + //header("Pragma: no-cache"); + + readfile($settings->_contentDir . $document->getDir() .$settings->_versioningFileName); + +}else if (isset($_GET["dumpname"])){ + + // dump file download + + if (!$user->isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + } + + if (!isset($_GET["dumpname"]) || !file_exists($settings->_contentDir.$_GET["dumpname"]) ) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); + } + + header("Content-Type: application/zip; name=\"" . $_GET["dumpname"] . "\""); + //header("Content-Type: application/force-download; name=\"" . $_GET["dumpname"] . "\""); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($settings->_contentDir . $_GET["dumpname"] )); + header("Content-Disposition: attachment; filename=\"" .$_GET["dumpname"] . "\""); + //header("Expires: 0"); + //header("Content-Type: " . $content->getMimeType()); + //header("Cache-Control: no-cache, must-revalidate"); + header("Cache-Control: must-revalidate"); + //header("Pragma: no-cache"); + + readfile($settings->_contentDir .$_GET["dumpname"] ); +} + +add_log_line(); +exit(); +?> diff --git a/op/op.EditComment.php b/op/op.EditComment.php new file mode 100644 index 000000000..649b5286a --- /dev/null +++ b/op/op.EditComment.php @@ -0,0 +1,74 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +$versionid = $_POST["version"]; +$version = $document->getContentByVersion($versionid); + +if (!is_object($version)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$comment = sanitizeString($_POST["comment"]); + +if (($version->getComment() == $comment) || $version->setComment($comment)) +{ +} +else { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +add_log_line("?documentid=".$documentid); + +header("Location:../out/out.DocumentVersionDetail.php?documentid=".$documentid."&version=".$versionid); + +?> diff --git a/op/op.EditDocument.php b/op/op.EditDocument.php new file mode 100644 index 000000000..ab0e83f39 --- /dev/null +++ b/op/op.EditDocument.php @@ -0,0 +1,77 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +$name = sanitizeString($_POST["name"]); +$comment = sanitizeString($_POST["comment"]); +$keywords = sanitizeString($_POST["keywords"]); +$sequence = $_POST["sequence"]; +if (!is_numeric($sequence)) { + $sequence="keep"; +} + +if ( + (($document->getName() == $name) || $document->setName($name)) + && (($document->getComment() == $comment) || $document->setComment($comment)) + && (($document->getKeywords() == $keywords) || $document->setKeywords($keywords)) + && (($sequence == "keep") || $document->setSequence($sequence)) + ) +{ +} +else { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +add_log_line("?documentid=".$documentid); + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.EditEvent.php b/op/op.EditEvent.php new file mode 100644 index 000000000..4240a698a --- /dev/null +++ b/op/op.EditEvent.php @@ -0,0 +1,74 @@ + diff --git a/op/op.EditFolder.php b/op/op.EditFolder.php new file mode 100644 index 000000000..2fcea6c34 --- /dev/null +++ b/op/op.EditFolder.php @@ -0,0 +1,74 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderid = $_POST["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +if ($folder->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +$name = sanitizeString($_POST["name"]); +$comment = sanitizeString($_POST["comment"]); +$sequence = $_POST["sequence"]; +if (!is_numeric($sequence)) { + $sequence = "keep"; +} + +if ( + (($folder->getName() == $name) || $folder->setName($name)) + && (($folder->getComment() == $comment) || $folder->setComment($comment)) + && ((!strcasecmp($sequence, "keep")) || $folder->setSequence($sequence)) + ) +{ +} +else { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); +} + +add_log_line("?folderid=".$folderid); + +header("Location:../out/out.ViewFolder.php?folderid=".$folderid."&showtree=".$_POST["showtree"]); + +?> diff --git a/op/op.EditUserData.php b/op/op.EditUserData.php new file mode 100644 index 000000000..7486f5aff --- /dev/null +++ b/op/op.EditUserData.php @@ -0,0 +1,80 @@ +setPwd(md5($_POST["pwd"])); + +if ($user->getFullName() != $fullname) + $user->setFullName($fullname); + +if ($user->getEmail() != $email) + $user->setEmail($email); + +if ($user->getComment() != $comment) + $user->setComment($comment); + +if (is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["size"] > 0 && $_FILES['userfile']['error']==0) +{ + $lastDotIndex = strrpos(basename($_FILES["userfile"]["name"]), "."); + $fileType = substr($_FILES["userfile"]["name"], $lastDotIndex); + if ($fileType != ".jpg" && $filetype != ".jpeg") { + UI::exitError(getMLText("user_info"),getMLText("only_jpg_user_images")); + } + //verkleinern des Bildes, so dass es 150 Pixel hoch ist + // Originalbild einlesen + $origImg = imagecreatefromjpeg($_FILES["userfile"]["tmp_name"]); + $width = imagesx($origImg); + $height = imagesy($origImg); + // Thumbnail im Speicher erzeugen + $newHeight = 150; + $newWidth = ($width/$height) * $newHeight; + $newImg = imagecreatetruecolor($newWidth, $newHeight); + // Verkleinern + imagecopyresized($newImg, $origImg, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height); + // In File speichern + imagejpeg($newImg, $_FILES["userfile"]["tmp_name"]); + // Aufräumen + imagedestroy($origImg); + imagedestroy($newImg); + $user->setImage($_FILES["userfile"]["tmp_name"], $_FILES["userfile"]["type"]); +} + +add_log_line("?user=".$user->getLogin()); + +header("Location:../out/out.MyAccount.php"); + +?> diff --git a/op/op.FolderAccess.php b/op/op.FolderAccess.php new file mode 100644 index 000000000..6b0de9bef --- /dev/null +++ b/op/op.FolderAccess.php @@ -0,0 +1,192 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderid = $_GET["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +if ($folder->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +switch ($_GET["action"]) { + case "setowner": + case "delaccess": + case "inherit": + $action = $_GET["action"]; + break; + case "setdefault": + case "editaccess": + case "addaccess": + $action = $_GET["action"]; + if (!isset($_GET["mode"]) || !is_numeric($_GET["mode"]) || $_GET["mode"]M_ALL) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_access_mode")); + } + $mode = $_GET["mode"]; + break; + case "notinherit": + $action = $_GET["action"]; + if (strcasecmp($_GET["mode"], "copy") && strcasecmp($_GET["mode"], "empty")) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_access_mode")); + } + $mode = $_GET["mode"]; + break; + default: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_action")); + break; +} + +if (isset($_GET["userid"])) { + if (!is_numeric($_GET["userid"])) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_user")); + } + if (!strcasecmp($action, "addaccess") && $_GET["userid"]==-1) { + $userid = -1; + } + else { + if (!is_object(getUser($_GET["userid"]))) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_user")); + } + $userid = $_GET["userid"]; + } +} + +if (isset($_GET["groupid"])) { + if (!is_numeric($_GET["groupid"])) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_group")); + } + if (!strcasecmp($action, "addaccess") && $_GET["groupid"]==-1) { + $groupid = -1; + } + else { + if (!is_object(getGroup($_GET["groupid"]))) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_group")); + } + $groupid = $_GET["groupid"]; + } +} + +//Ändern des Besitzers ---------------------------------------------------------------------------- +if ($action == "setowner") { + + if (!$user->isAdmin()) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); + } + if (!isset($_GET["ownerid"]) || !is_numeric($_GET["ownerid"]) || $_GET["ownerid"]<1) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_user")); + } + $newOwner = getUser($_GET["ownerid"]); + if (!is_object($newOwner)) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_user")); + } + $folder->setOwner($newOwner); +} + +//Änderung auf nicht erben ------------------------------------------------------------------------ +else if ($action == "notinherit") { + + $defAccess = $folder->getDefaultAccess(); + $folder->setInheritAccess(false); + $folder->setDefaultAccess($defAccess); + + if ($mode == "copy") { + $parent = $folder->getParent(); + $accessList = $parent->getAccessList(); + foreach ($accessList["users"] as $userAccess) + $folder->addAccess($userAccess->getMode(), $userAccess->getUserID(), true); + foreach ($accessList["groups"] as $groupAccess) + $folder->addAccess($groupAccess->getMode(), $groupAccess->getGroupID(), false); + } +} + +//Änderung auf erben ------------------------------------------------------------------------------ +else if ($action == "inherit") { + + if ($folderid == $settings->_rootFolderID || !$folder->getParent()) return; + + $folder->clearAccessList(); + $folder->setInheritAccess(true); +} + +//Standardberechtigung setzen---------------------------------------------------------------------- +else if ($action == "setdefault") { + $folder->setDefaultAccess($mode); +} + +//Bestehende Berechtigung änndern ----------------------------------------------------------------- +else if ($action == "editaccess") { + if (isset($userid)) { + $folder->changeAccess($mode, $userid, true); + } + else if (isset($groupid)) { + $folder->changeAccess($mode, $groupid, false); + } +} + +//Berechtigung löschen ---------------------------------------------------------------------------- +else if ($action == "delaccess") { + + if (isset($userid)) { + $folder->removeAccess($userid, true); + } + else if (isset($groupid)) { + $folder->removeAccess($groupid, false); + } +} + +//Neue Berechtigung hinzufügen -------------------------------------------------------------------- +else if ($action == "addaccess") { + + if (isset($userid) && $userid != -1) { + $folder->addAccess($mode, $userid, true); + } + if (isset($groupid) && $groupid != -1) { + $folder->addAccess($mode, $groupid, false); + } +} + +add_log_line(); + +header("Location:../out/out.FolderAccess.php?folderid=".$folderid); + +?> diff --git a/op/op.FolderNotify.php b/op/op.FolderNotify.php new file mode 100644 index 000000000..50e0f0b7a --- /dev/null +++ b/op/op.FolderNotify.php @@ -0,0 +1,145 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderid = $_GET["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +if (!isset($_GET["action"]) || (strcasecmp($_GET["action"], "delnotify") && strcasecmp($_GET["action"], "addnotify"))) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_action")); +} +$action = $_GET["action"]; + +if (isset($_GET["userid"]) && (!is_numeric($_GET["userid"]) || $_GET["userid"]<-1)) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_user")); +} +$userid = $_GET["userid"]; + +if (isset($_GET["groupid"]) && (!is_numeric($_GET["groupid"]) || $_GET["groupid"]<-1)) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_group")); +} +$groupid = $_GET["groupid"]; + +if (isset($_GET["groupid"])&&$_GET["groupid"]!=-1){ + $group=getGroup($groupid); + if (!$group->isMember($user,true) && !$user->isAdmin()) + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +if ($folder->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +//Benachrichtigung löschen ------------------------------------------------------------------------ +if ($action == "delnotify") { + + if (isset($userid)) { + $res = $folder->removeNotify($userid, true); + } + else if (isset($groupid)) { + $res = $folder->removeNotify($groupid, false); + } + switch ($res) { + case -1: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),isset($userid) ? getMLText("unknown_user") : getMLText("unknown_group")); + break; + case -2: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("already_subscribed")); + break; + case -4: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("internal_error")); + break; + case 0: + break; + } +} + +//Benachrichtigung hinzufügen --------------------------------------------------------------------- +else if ($action == "addnotify") { + + if ($userid != -1) { + $res = $folder->addNotify($userid, true); + switch ($res) { + case -1: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_user")); + break; + case -2: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("already_subscribed")); + break; + case -4: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("internal_error")); + break; + case 0: + break; + } + } + if ($groupid != -1) { + $res = $folder->addNotify($groupid, false); + switch ($res) { + case -1: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("unknown_group")); + break; + case -2: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("already_subscribed")); + break; + case -4: + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("internal_error")); + break; + case 0: + break; + } + } +} + +header("Location:../out/out.FolderNotify.php?folderid=".$folderid); + +?> diff --git a/op/op.GroupMgr.php b/op/op.GroupMgr.php new file mode 100644 index 000000000..b36e13e13 --- /dev/null +++ b/op/op.GroupMgr.php @@ -0,0 +1,197 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +if (isset($_GET["action"])) $action = $_GET["action"]; +else if (isset($_POST["action"])) $action = $_POST["action"]; + + +//Neue Gruppe anlegen ----------------------------------------------------------------------------- +if ($action == "addgroup") { + + $name = sanitizeString($_GET["name"]); + $comment = sanitizeString($_GET["comment"]); + + if (is_object(getGroupByName($name))) { + UI::exitError(getMLText("admin_tools"),getMLText("group_exists")); + } + + $newGroup = addGroup($name, $comment); + if (!$newGroup) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } + + $groupid=$newGroup->getID(); + + add_log_line(); +} + +//Gruppe löschen ---------------------------------------------------------------------------------- +else if ($action == "removegroup") { + + if (!isset($_POST["groupid"]) || !is_numeric($_POST["groupid"]) || intval($_POST["groupid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + $group = getGroup($_POST["groupid"]); + if (!is_object($group)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + if (!$group->remove()) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } + + add_log_line(".php?groupid=".$groupid."&action=removegroup"); +} + +//Gruppe bearbeiten ------------------------------------------------------------------------------- +else if ($action == "editgroup") { + + if (!isset($_GET["groupid"]) || !is_numeric($_GET["groupid"]) || intval($_GET["groupid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + $groupid=$_GET["groupid"]; + $group = getGroup($groupid); + + if (!is_object($group)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + $name = sanitizeString($_GET["name"]); + $comment = sanitizeString($_GET["comment"]); + + if ($group->getName() != $name) + $group->setName($name); + if ($group->getComment() != $comment) + $group->setComment($comment); + + add_log_line(); +} + +//Benutzer zu Gruppe hinzufügen ------------------------------------------------------------------- +else if ($action == "addmember") { + + if (!isset($_POST["groupid"]) || !is_numeric($_POST["groupid"]) || intval($_POST["groupid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + $groupid=$_POST["groupid"]; + $group = getGroup($groupid); + + if (!is_object($group)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + if (!isset($_POST["userid"]) || !is_numeric($_POST["userid"]) || intval($_POST["userid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + $newMember = getUser($_POST["userid"]); + if (!is_object($newMember)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + if (!$group->isMember($newMember)){ + $group->addUser($newMember); + if (isset($_POST["manager"])) $group->toggleManager($newMember); + } + + add_log_line(".php?groupid=".$groupid."&userid=".$_POST["userid"]."&action=addmember"); +} + +//Benutzer aus Gruppe entfernen ------------------------------------------------------------------- +else if ($action == "rmmember") { + + if (!isset($_GET["groupid"]) || !is_numeric($_GET["groupid"]) || intval($_GET["groupid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + $groupid=$_GET["groupid"]; + $group = getGroup($groupid); + + if (!is_object($group)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + if (!isset($_GET["userid"]) || !is_numeric($_GET["userid"]) || intval($_GET["userid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + $oldMember = getUser($_GET["userid"]); + if (!is_object($oldMember)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + $group->removeUser($oldMember); + + add_log_line(); +} + +// toggle manager flag +else if ($action == "tmanager") { + + if (!isset($_GET["groupid"]) || !is_numeric($_GET["groupid"]) || intval($_GET["groupid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + $groupid=$_GET["groupid"]; + $group = getGroup($groupid); + + if (!is_object($group)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_group_id")); + } + + if (!isset($_GET["userid"]) || !is_numeric($_GET["userid"]) || intval($_GET["userid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + $usertoedit = getUser($_GET["userid"]); + if (!is_object($usertoedit)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + $group->toggleManager($usertoedit); + + add_log_line(); +} + +header("Location:../out/out.GroupMgr.php?groupid=".$groupid); + +?> diff --git a/op/op.LockDocument.php b/op/op.LockDocument.php new file mode 100644 index 000000000..aa9b3d60b --- /dev/null +++ b/op/op.LockDocument.php @@ -0,0 +1,64 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if ($document->isLocked()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_already_locked")); +} + +if (!$document->setLocked($user)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +add_log_line(); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.Login.php b/op/op.Login.php new file mode 100644 index 000000000..c5853989a --- /dev/null +++ b/op/op.Login.php @@ -0,0 +1,285 @@ +".getMLText("login_not_given")."

        \n". + "

        ".getMLText("back")."

        \n"); + exit; +} + +$pwd = (string) $_POST["pwd"]; +if (get_magic_quotes_gpc()) { + $pwd = stripslashes($pwd); +} + +$guestUser = getUser($settings->_guestID); +if ((!isset($pwd) || strlen($pwd)==0) && ($login != $guestUser->getLogin())) { + _printMessage(getMLText("login_error_title"), "

        ".getMLText("login_error_text")."

        \n". + "

        ".getMLText("back")."

        \n"); + exit; +} + +// +// LDAP Sign In +// + +/* new code by doudoux - TO BE TESTED */ +$ldapSearchAttribut = "uid="; +$tmpDN = "uid=".$login.",".$settings->_ldapBaseDN; + +if (isset($settings->_ldapType)) +{ + if ($settings->_ldapType==1) + { + $ldapSearchAttribut = "sAMAccountName="; + $tmpDN = $login.'@'.$settings->_ldapAccountDomainName; + } +} +/* end of new code */ + + +$user = false; +if (isset($settings->_ldapHost) && strlen($settings->_ldapHost)>0) { + if (isset($settings->_ldapPort) && is_int($settings->_ldapPort)) { + $ds = ldap_connect($settings->_ldapHost, $settings->_ldapPort); + } + else { + $ds = ldap_connect($settings->_ldapHost); + } + if (!is_bool($ds)) { + // Ensure that the LDAP connection is set to use version 3 protocol. + // Required for most authentication methods, including SASL. + ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); + + // try an anonymous bind first. If it succeeds, get the DN for the user. + $bind = @ldap_bind($ds); + $dn = false; + + /* new code by doudoux - TO BE TESTED */ + if ($bind) { + $search = ldap_search($ds, $settings->_ldapBaseDN, $ldapSearchAttribut.$login); + if (!is_bool($search)) { + $info = ldap_get_entries($ds, $search); + if (!is_bool($info) && $info["count"]>0) { + $dn = $info[0]['dn']; + } + } + } + /* end of new code */ + + /* old code */ + if ($bind) { + $search = ldap_search($ds, $settings->_ldapBaseDN, "uid=".$login); + if (!is_bool($search)) { + $info = ldap_get_entries($ds, $search); + if (!is_bool($info) && $info["count"]>0) { + $dn = $info[0]['dn']; + } + } + } + /* end of old code */ + + + if (is_bool($dn)) { + // This is the fallback position, in case the anonymous bind does not + // succeed. + + /* new code by doudoux - TO BE TESTED */ + $dn = $tmpDN; + /* old code */ + //$dn = "uid=".$login.",".$settings->_ldapBaseDN; + + } + $bind = @ldap_bind($ds, $dn, $pwd); + if ($bind) { + // Successfully authenticated. Now check to see if the user exists within + // the database. If not, add them in, but do not add their password. + $user = getUserByLogin($login); + if (is_bool($user) && !$settings->_restricted) { + // Retrieve the user's LDAP information. + + + /* new code by doudoux - TO BE TESTED */ + $search = ldap_search($ds, $settings->_ldapBaseDN, $ldapSearchAttribut . $login); + /* old code */ + //$search = ldap_search($ds, $dn, "uid=".$login); + + if (!is_bool($search)) { + $info = ldap_get_entries($ds, $search); + if (!is_bool($info) && $info["count"]==1 && $info[0]["count"]>0) { + $user = addUser($login, null, $info[0]['cn'][0], $info[0]['mail'][0], $settings->_language, $settings->_theme, ""); + } + } + } + if (!is_bool($user)) { + $userid = $user->getID(); + } + } + ldap_close($ds); + } +} + +if (is_bool($user)) { + // + // LDAP Authentication did not succeed or is not configured. Try internal + // authentication system. + // + + //Retrieve user information from the database. + $queryStr = "SELECT * FROM tblUsers WHERE login = '".$login."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) { + _printMessage(getMLText("login_error_title"), "

        ".getMLText("internal_error")." - database: " . $db->getErrorMsg(). + "

        \n

        ".getMLText("back")."

        \n"); + exit; + } + + if (count($resArr) == 0) { + _printMessage(getMLText("login_error_title"), "

        ".getMLText("login_error_text")."

        \n". + "

        ".getMLText("back")."

        \n"); + exit; + } + + $resArr = $resArr[0]; + + if (($resArr["id"] == $settings->_guestID) && (!$settings->_enableGuestLogin)) { + _printMessage(getMLText("login_error_title"), "

        ".getMLText("guest_login_disabled"). + "

        \n

        ".getMLText("back")."

        \n"); + exit; + } + + //Vergleichen des Passwortes (falls kein guest-login) + // Assume that the password has been sent via HTTP POST. It would be careless + // (and dangerous) for passwords to be sent via GET. + if (($resArr["id"] != $settings->_guestID) && (md5($pwd) != $resArr["pwd"])) { + _printMessage(getMLText("login_error_title"), "

        ".getMLText("login_error_text"). + "

        \n

        ".getMLText("back")."

        \n"); + exit; + } + $userid = $resArr["id"]; + $user = getUser($userid); +} + + +// Löschen von Sitzungen, die älter als 24h sind +// Delete any sessions that are more than 24 hours old. Probably not the most +// reliable place to put this check -- move to inc.Authentication.php? +$queryStr = "DELETE FROM tblSessions WHERE " . mktime() . " - lastAccess > 86400"; +if (!$db->getResult($queryStr)) { + _printMessage(getMLText("login_error_title"), "

        ".getMLText("error_occured").": ".$db->getErrorMsg()."

        "); + exit; +} + +//Erstellen einer Sitzungs-ID +$id = "" . rand() . mktime() . rand() . ""; +$id = md5($id); + +// Capture the user's language and theme settings. +if (isset($_POST["lang"]) && strlen($_POST["lang"])>0 && is_numeric(array_search($_POST["lang"],getLanguages())) ) { + $lang = sanitizeString($_POST["lang"]); + $user->setLanguage($lang); +} +else if (isset($_GET["lang"]) && strlen($_GET["lang"])>0 && is_numeric(array_search($_GET["lang"],getLanguages())) ) { + $lang = sanitizeString($_GET["lang"]); + $user->setLanguage($lang); +} +else { + $lang = $user->getLanguage(); + if (strlen($lang)==0) { + $lang = $settings->_language; + $user->setLanguage($lang); + } +} +if (isset($_POST["sesstheme"]) && strlen($_POST["sesstheme"])>0 && is_numeric(array_search($_POST["sesstheme"],UI::getStyles())) ) { + $sesstheme = sanitizeString($_POST["sesstheme"]); + $user->setTheme($sesstheme); +} +else if (isset($_GET["sesstheme"]) && strlen($_GET["sesstheme"])>0 && is_numeric(array_search($_GET["sesstheme"],UI::getStyles())) ) { + $sesstheme = sanitizeString($_GET["sesstheme"]); + $user->setTheme($sesstheme); +} +else { + $sesstheme = $user->getTheme(); + if (strlen($sesstheme)==0) { + $sesstheme = $settings->_theme; + $user->setTheme($sesstheme); + } +} + +//Einfügen eines neuen Datensatzes in tblSessions +$queryStr = "INSERT INTO tblSessions (id, userID, lastAccess, theme, language) ". + "VALUES ('".$id."', ".$userid.", ".mktime().", '".$sesstheme."', '".$lang."')"; +if (!$db->getResult($queryStr)) { + _printMessage(getMLText("login_error_title"), "

        ".getMLText("error_occured").": ".$db->getErrorMsg()."

        "); + exit; +} +//Setzen des Sitzungs-Cookies +// Set the session cookie. +setcookie("mydms_session", $id, 0, $settings->_httpRoot); + +// TODO: by the PHP manual: The superglobals $_GET and $_REQUEST are already decoded. +// Using urldecode() on an element in $_GET or $_REQUEST could have unexpected and dangerous results. + +if (isset($_POST["referuri"]) && strlen($_POST["referuri"])>0) { + $referuri = urldecode($_POST["referuri"]); +} +else if (isset($_GET["referuri"]) && strlen($_GET["referuri"])>0) { + $referuri = urldecode($_GET["referuri"]); +} + +add_log_line(); + +if (isset($referuri) && strlen($referuri)>0) { + header("Location: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'] . $referuri); +} +else { + header("Location: ../".(isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php?folderid=1")); +} + +//_printMessage(getMLText("login_ok"), +// "

        ".getMLText("continue")."

        "); + +?> diff --git a/op/op.Logout.php b/op/op.Logout.php new file mode 100644 index 000000000..a59f8b581 --- /dev/null +++ b/op/op.Logout.php @@ -0,0 +1,52 @@ +_httpRoot); +header("Location: ../out/out.ViewFolder.php"); +print "Logout successful"; +*/ + +//Code when running PHP in CGI-Mode --------------------------------------------------------------- + +//Delete from tblSessions + +$dms_session = $_COOKIE["mydms_session"]; +$dms_session = sanitizeString($dms_session); + +$queryStr = "DELETE FROM tblSessions WHERE id = '$dms_session'"; +if (!$db->getResult($queryStr)) + die ("Error while removing session from tblSessions: " . $db->getErrorMsg()); + +//Delete Cookie +setcookie("mydms_session", $_COOKIE["mydms_session"], time()-3600, $settings->_httpRoot); + +//Forward to Login-page +header("Location: ../out/out.Login.php"); + + + +?> diff --git a/op/op.ManageNotify.php b/op/op.ManageNotify.php new file mode 100644 index 000000000..1e6a780ff --- /dev/null +++ b/op/op.ManageNotify.php @@ -0,0 +1,115 @@ +addNotify($userid, true); + + if ($recursedoc){ + + // include all folder's document + + $documents = $folder->getDocuments(); + $documents = filterAccess($documents, getUser($userid), M_READ); + + foreach($documents as $document) + $document->addNotify($userid, true); + } + + if ($recursefolder){ + + // recurse all folder's folders + + $subFolders = $folder->getSubFolders(); + $subFolders = filterAccess($subFolders, getUser($userid), M_READ); + + foreach($subFolders as $subFolder) + add_folder_notify($subFolder,$userid,$recursefolder,$recursedoc); + } +} + +if (!isset($_GET["type"])) UI::exitError(getMLText("my_account"),getMLText("error_occured")); +if (!isset($_GET["action"])) UI::exitError(getMLText("my_account"),getMLText("error_occured")); + +if ($_GET["type"]=="document"){ + + if ($_GET["action"]=="add"){ + if (!isset($_POST["docidform2"])) UI::exitError(getMLText("my_account"),getMLText("error_occured")); + $documentid = $_POST["docidform2"]; + }else if ($_GET["action"]=="del"){ + if (!isset($_GET["id"])) UI::exitError(getMLText("my_account"),getMLText("error_occured")); + $documentid = $_GET["id"]; + + }else UI::exitError(getMLText("my_account"),getMLText("error_occured")); + + $document = getDocument($documentid); + + $userid=$user->getID(); + + if ($document->getAccessMode($user) < M_READ) + UI::exitError(getMLText("my_account"),getMLText("error_occured")); + + if ($_GET["action"]=="add") $document->addNotify($userid, true); + else if ($_GET["action"]=="del") $document->removeNotify($userid, true); + +}else if ($_GET["type"]=="folder"){ + + if ($_GET["action"]=="add"){ + if (!isset($_POST["targetidform1"])) UI::exitError(getMLText("my_account"),getMLText("error_occured")); + $folderid = $_POST["targetidform1"]; + }else if ($_GET["action"]=="del"){ + if (!isset($_GET["id"])) UI::exitError(getMLText("my_account"),getMLText("error_occured")); + $folderid = $_GET["id"]; + + }else UI::exitError(getMLText("my_account"),getMLText("error_occured")); + + $folder = getFolder($folderid); + + $userid=$user->getID(); + + if ($folder->getAccessMode($user) < M_READ) + UI::exitError(getMLText("my_account"),getMLText("error_occured")); + + if ($_GET["action"]=="add"){ + + $recursefolder = isset($_POST["recursefolder"]); + $recursedoc = isset($_POST["recursedoc"]); + + add_folder_notify($folder,$userid,$recursefolder,$recursedoc); + + }else if ($_GET["action"]=="del") $folder->removeNotify($userid, true); +} + +header("Location:../out/out.ManageNotify.php"); + +?> diff --git a/op/op.MoveDocument.php b/op/op.MoveDocument.php new file mode 100644 index 000000000..9592b8fa9 --- /dev/null +++ b/op/op.MoveDocument.php @@ -0,0 +1,73 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$oldFolder = $document->getFolder(); + +if (!isset($_GET["targetidform1"]) || !is_numeric($_GET["targetidform1"]) || $_GET["targetidform1"]<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_target_folder")); +} + +$targetid = $_GET["targetidform1"]; +$targetFolder = getFolder($targetid); + +if (!is_object($targetFolder)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_target_folder")); +} + +if (($document->getAccessMode($user) < M_READWRITE) || ($targetFolder->getAccessMode($user) < M_READWRITE)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if ($targetid != $oldFolder->getID()) { + if (!$document->setFolder($targetFolder)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } +} + +add_log_line(); + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.MoveFolder.php b/op/op.MoveFolder.php new file mode 100644 index 000000000..cb8a65a97 --- /dev/null +++ b/op/op.MoveFolder.php @@ -0,0 +1,71 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} +$folderid = $_GET["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +if ($folderid == $settings->_rootFolderID || !$folder->getParent()) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("cannot_move_root")); +} + +if (!isset($_GET["targetidform1"]) || !is_numeric($_GET["targetidform1"]) || intval($_GET["targetidform1"])<1) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$targetid = $_GET["targetidform1"]; +$targetFolder = getFolder($targetid); + +if (!is_object($targetFolder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +if ($folder->getAccessMode($user) < M_READWRITE || $targetFolder->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +if (!$folder->setParent($targetFolder)) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); +} + +add_log_line(); +header("Location:../out/out.ViewFolder.php?folderid=".$folderid."&showtree=".$_GET["showtree"]); + +?> diff --git a/op/op.OverrideContentStatus.php b/op/op.OverrideContentStatus.php new file mode 100644 index 000000000..72fdc6ac1 --- /dev/null +++ b/op/op.OverrideContentStatus.php @@ -0,0 +1,86 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_POST["version"]; +$content = $document->getContentByVersion($version); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +if (!isset($_POST["overrideStatus"]) || !is_numeric($_POST["overrideStatus"]) || + (intval($_POST["overrideStatus"])<-3 && intval($_POST["overrideStatus"])>2)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_status")); +} + +$overallStatus = $content->getStatus(); + +// status change control +if ($overallStatus["status"] == S_REJECTED || $overallStatus["status"] == S_EXPIRED || $overallStatus["status"] == S_DRAFT_REV || $overallStatus["status"] == S_DRAFT_APP ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_change_final_states")); +} + +$reviewStatus = $content->getReviewStatus(); +$approvalStatus = $content->getApprovalStatus(); +$overrideStatus = $_POST["overrideStatus"]; +$comment = sanitizeString($_POST["comment"]); + +if ($overrideStatus != $overallStatus["status"]) { + + if (!$content->setStatus($overrideStatus, $comment, $user)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } +} +add_log_line("?documentid=".$documentid); +header("Location:../out/out.DocumentVersionDetail.php?documentid=".$documentid."&version=".$version); + +?> diff --git a/op/op.RemoveArchive.php b/op/op.RemoveArchive.php new file mode 100644 index 000000000..0e102f081 --- /dev/null +++ b/op/op.RemoveArchive.php @@ -0,0 +1,48 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +if (!isset($_POST["arkname"]) || !file_exists($settings->_contentDir.$_POST["arkname"]) ) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); +} + +if (!removeFile($settings->_contentDir.$_POST["arkname"])) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); +} + +add_log_line("?arkname=".$_POST["arkname"]); +header("Location:../out/out.BackupTools.php"); + +?> diff --git a/op/op.RemoveDocument.php b/op/op.RemoveDocument.php new file mode 100644 index 000000000..a9fe21b65 --- /dev/null +++ b/op/op.RemoveDocument.php @@ -0,0 +1,59 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("access_denied")); +} + +$folder = $document->getFolder(); + +if (!$document->remove()) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("error_occured")); +} + +add_log_line("?documentid=".$documentid); + +header("Location:../out/out.ViewFolder.php?folderid=".$folder->getID()); + +?> diff --git a/op/op.RemoveDocumentFile.php b/op/op.RemoveDocumentFile.php new file mode 100644 index 000000000..2b5983437 --- /dev/null +++ b/op/op.RemoveDocumentFile.php @@ -0,0 +1,69 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if (!isset($_POST["fileid"]) || !is_numeric($_POST["fileid"]) || intval($_POST["fileid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_file_id")); +} + +$fileid = $_POST["fileid"]; +$file = getDocumentFile($fileid); + +if (!is_object($file)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_file_id")); +} + + +if (($document->getAccessMode($user) < M_ALL)&&($user->getID()!=$file->getUserID())) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!$document->removeDocumentFile($fileid)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +add_log_line("?documentid=".$documentid."&fileid=".$fileid); + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.RemoveDocumentLink.php b/op/op.RemoveDocumentLink.php new file mode 100644 index 000000000..3b5498071 --- /dev/null +++ b/op/op.RemoveDocumentLink.php @@ -0,0 +1,75 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if (!isset($_GET["linkid"]) || !is_numeric($_GET["linkid"]) || intval($_GET["linkid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_link_id")); +} + +$linkid = $_GET["linkid"]; +$link = getDocumentLink($linkid); + +if (!is_object($link)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_link_id")); +} + +$responsibleUser = $link->getUser(); +$accessMode = $document->getAccessMode($user); + +if ( + ($accessMode < M_READ) + || (($accessMode == M_READ) && ($responsibleUser->getID() != $user->getID())) + || (($accessMode > M_READ) && (!$user->isAdmin()) && ($responsibleUser->getID() != $user->getID()) && !$link->isPublic()) + ) +{ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!$document->removeDocumentLink($linkid)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +add_log_line("?documentid=".$documentid."&linkid=".$linkid); + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.RemoveDump.php b/op/op.RemoveDump.php new file mode 100644 index 000000000..f5f67ac4a --- /dev/null +++ b/op/op.RemoveDump.php @@ -0,0 +1,48 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +if (!isset($_POST["dumpname"]) || !file_exists($settings->_contentDir.$_POST["dumpname"]) ) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); +} + +if (!removeFile($settings->_contentDir.$_POST["dumpname"])) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); +} + +add_log_line("?dumpname=".$_POST["dumpname"]); +header("Location:../out/out.BackupTools.php"); + +?> diff --git a/op/op.RemoveEvent.php b/op/op.RemoveEvent.php new file mode 100644 index 000000000..60a7a5ae0 --- /dev/null +++ b/op/op.RemoveEvent.php @@ -0,0 +1,60 @@ +getID()!=$event["userID"])&&(!$user->isAdmin())){ + UI::exitError(getMLText("edit_event"),getMLText("access_denied")); +} + +$res = delEvent($_POST["eventid"]); + +if (is_bool($res) && !$res) { + UI::exitError(getMLText("edit_event"),getMLText("error_occured")); +} + +add_log_line("?id=".$_POST["eventid"]); + +$dt=getdate($event["start"]); + +header("Location:../out/out.Calendar.php?mode=w&day=".$dt["mday"]."&year=".$dt["year"]."&month=".$dt["mon"]); + +?> diff --git a/op/op.RemoveFolder.php b/op/op.RemoveFolder.php new file mode 100644 index 000000000..372e47889 --- /dev/null +++ b/op/op.RemoveFolder.php @@ -0,0 +1,63 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} +$folderid = $_GET["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +if ($folderid == $settings->_rootFolderID || !$folder->getParent()) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("cannot_rm_root")); +} + +if ($folder->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +$parent=$folder->getParent(); + +if (!$folder->remove()) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); +} + +add_log_line(); + +header("Location:../out/out.ViewFolder.php?folderid=".$parent->getID()."&showtree=".$_GET["showtree"]); + +?> diff --git a/op/op.RemoveFolderFiles.php b/op/op.RemoveFolderFiles.php new file mode 100644 index 000000000..b4eca47dd --- /dev/null +++ b/op/op.RemoveFolderFiles.php @@ -0,0 +1,74 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +function removeFolderFiles($folder) +{ + global $settings; + + $documents = $folder->getDocuments(); + foreach ($documents as $document) + removeDir($settings->_contentDir . $document->getDir()); + + $subFolders = $folder->getSubFolders(); + + foreach ($subFolders as $folder) + removeFolderFiles($folder); + + + return true; +} + + +if (!isset($_POST["folderid"]) || !is_numeric($_POST["folderid"]) || intval($_POST["folderid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); +} +$folderid = $_POST["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); +} + +if (!removeFolderFiles($folder)) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); +} + +add_log_line(); + +header("Location:../out/out.BackupTools.php"); + +?> diff --git a/op/op.RemoveLog.php b/op/op.RemoveLog.php new file mode 100644 index 000000000..868f8bbe1 --- /dev/null +++ b/op/op.RemoveLog.php @@ -0,0 +1,53 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +if (!isset($_POST["logname"]) || !file_exists($settings->_contentDir.$_POST["logname"]) ) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); +} + +if (@readlink($settings->_contentDir."current.log")==$settings->_contentDir.$_POST["logname"]){ + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +if (!removeFile($settings->_contentDir.$_POST["logname"])) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); +} + +add_log_line("?logname=".$_POST["logname"]); + +header("Location:../out/out.LogManagement.php"); + +?> diff --git a/op/op.RemoveVersion.php b/op/op.RemoveVersion.php new file mode 100644 index 000000000..67f439ec4 --- /dev/null +++ b/op/op.RemoveVersion.php @@ -0,0 +1,75 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version_num = $_POST["version"]; +$version = $document->getContentByVersion($version_num); + +if (!is_object($version)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +if (count($document->getContent())==1) { + if (!$document->remove()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } +} +else { + if (!$version->remove()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } +} + +add_log_line("?documentid=".$documentid."&version".$version); + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.ReviewDocument.php b/op/op.ReviewDocument.php new file mode 100644 index 000000000..cba4fc764 --- /dev/null +++ b/op/op.ReviewDocument.php @@ -0,0 +1,272 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_POST["version"]; +$content = $document->getContentByVersion($version); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// operation is admitted only for last deocument version +$latestContent = $document->getLatestContent(); +if ($latestContent->getVersion()!=$version) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} +// verify if document has expired +if ($document->hasExpired()){ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["reviewStatus"]) || !is_numeric($_POST["reviewStatus"]) || + (intval($_POST["reviewStatus"])!=1 && intval($_POST["reviewStatus"])!=-1)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_review_status")); +} + +// retrieve the review status for the current user. +$reviewStatus = $user->getReviewStatus($documentid, $version); +if (count($reviewStatus["indstatus"]) == 0 && count($reviewStatus["grpstatus"]) == 0) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if ($_POST["reviewType"] == "ind") { + + $indReviewer = true; + if (count($reviewStatus["indstatus"])==0) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + if ($reviewStatus["indstatus"][0]["status"]==-2) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + + // User is eligible to make this update. + + $comment = sanitizeString($_POST["comment"]); + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $reviewStatus["indstatus"][0]["reviewID"] ."', '". + $_POST["reviewStatus"] ."', '". $comment ."', NOW(), '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !res) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("review_update_failed")); + } + else { + // Send an email notification to the document updater. + $subject = $settings->_siteName.": ".$document->getName().", v.".$version." - ".getMLText("review_submit_email"); + $message = getMLText("review_submit_email")."\r\n"; + $message .= + getMLText("name").": ".$document->getName()."\r\n". + getMLText("version").": ".$version."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() .">\r\n". + getMLText("status").": ".getReviewStatusText($_POST["reviewStatus"])."\r\n". + getMLText("comment").": ".$comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$documentid."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toIndividual($user, $content->getUser(), $subject, $message); + + // Send notification to subscribers. + $nl=$document->getNotifyList(); + Email::toList($user, $nl["users"], $subject, $message); + foreach ($nl["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + } +} +else if ($_POST["reviewType"] == "grp") { + $grpReviewer=false; + foreach ($reviewStatus["grpstatus"] as $gs) { + if ($_POST["reviewGroup"] == $gs["required"]) { + if ($gs["status"]==-2) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + $grpStatus=$gs; + $grpReviewer=true; + break; + } + } + if (!$grpReviewer) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + } + + // User is eligible to make this update. + + $comment = sanitizeString($_POST["comment"]); + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $grpStatus["reviewID"] ."', '". + $_POST["reviewStatus"] ."', '". $comment ."', NOW(), '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !res) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("review_update_failed")); + } + else { + // Send an email notification to the document updater. + $grp = getGroup($grpStatus["required"]); + + $subject = $settings->_siteName.": ".$document->getName().", v.".$version." - ".getMLText("review_submit_email"); + $message = getMLText("review_submit_email")."\r\n"; + $message .= + getMLText("name").": ".$document->getName()."\r\n". + getMLText("user").": ".$user->getFullName()." <". $user->getEmail() .">\r\n". + getMLText("version").": ".$version."\r\n". + getMLText("status").": ".getReviewStatusText($_POST["reviewStatus"])."\r\n". + getMLText("comment").": ".$comment."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$documentid."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + Email::toIndividual($user, $content->getUser(), $subject, $message); + + // Send notification to subscribers. + $nl=$document->getNotifyList(); + Email::toList($user, $nl["users"], $subject, $message); + foreach ($nl["groups"] as $grp) { + Email::toGroup($user, $grp, $subject, $message); + } + } +} + +// +// Check to see if the overall status for the document version needs to be +// updated. +// + +if ($_POST["reviewStatus"]==-1){ + + $content->setStatus(S_REJECTED,$comment,$user); + +}else{ + + $docReviewStatus = $content->getReviewStatus(true); + if (is_bool($docReviewStatus) && !$docReviewStatus) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_retrieve_review_snapshot")); + } + $reviewCT = 0; + $reviewTotal = 0; + foreach ($docReviewStatus as $drstat) { + if ($drstat["status"] == 1) { + $reviewCT++; + } + if ($drstat["status"] != -2) { + $reviewTotal++; + } + } + // If all reviews have been received and there are no rejections, retrieve a + // count of the approvals required for this document. + if ($reviewCT == $reviewTotal) { + $docApprovalStatus = $content->getApprovalStatus(true); + if (is_bool($docApprovalStatus) && !$docApprovalStatus) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_retrieve_approval_snapshot")); + } + $approvalCT = 0; + $approvalTotal = 0; + foreach ($docApprovalStatus as $dastat) { + if ($dastat["status"] == 1) { + $approvalCT++; + } + if ($dastat["status"] != -2) { + $approvalTotal++; + } + } + // If the approvals received is less than the approvals total, then + // change status to pending approval. + if ($approvalCT<$approvalTotal) { + $newStatus=1; + } + else { + // Otherwise, change the status to released. + $newStatus=2; + } + if ($content->setStatus($newStatus, getMLText("automatic_status_update"), $user)) { + + // Notify approvers, if necessary. + if ($newStatus == S_DRAFT_APP) { + $requestUser = $document->getOwner(); + + $subject = $settings->_siteName.": ".$document->getName().", v.".$version." - ".getMLText("approval_request_email"); + $message = getMLText("approval_request_email")."\r\n"; + $message .= + getMLText("name").": ".$content->getOriginalFileName()."\r\n". + getMLText("version").": ".$version."\r\n". + getMLText("comment").": ".$content->getComment()."\r\n". + "URL: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$documentid."&version=".$version."\r\n"; + + $subject=mydmsDecodeString($subject); + $message=mydmsDecodeString($message); + + foreach ($docApprovalStatus as $dastat) { + + if ($dastat["status"] == 0) { + if ($dastat["type"] == 0) { + + $approver = getUser($dastat["required"]); + Email::toIndividual($document->getOwner(), $approver, $subject, $message); + } + else if ($dastat["type"] == 1) { + + $group = getGroup($dastat["required"]); + Email::toGroup($document->getOwner(), $group, $subject, $message); + } + } + } + } + } + } +} + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.Search.php b/op/op.Search.php new file mode 100644 index 000000000..e000644f3 --- /dev/null +++ b/op/op.Search.php @@ -0,0 +1,585 @@ +_rootFolderID; + } + else { + $folderid = $_GET["folderid"]; + } + header("Location: ../out/out.SearchForm.php?folderid=".$folderid); +} + +// +// Supporting functions. +// + +function makeTimeStamp($hour, $min, $sec, $year, $month, $day) { + $thirtyone = array (1, 3, 5, 7, 8, 10, 12); + $thirty = array (4, 6, 9, 11); + + // Very basic check that the terms are valid. Does not fail for illegal + // dates such as 31 Feb. + if (!is_numeric($hour) || !is_numeric($min) || !is_numeric($sec) || !is_numeric($year) || !is_numeric($month) || !is_numeric($day) || $month<1 || $month>12 || $day<1 || $day>31 || $hour<0 || $hour>23 || $min<0 || $min>59 || $sec<0 || $sec>59) { + return false; + } + $year = (int) $year; + $month = (int) $month; + $day = (int) $day; + + if (array_search($month, $thirtyone)) { + $max=31; + } + else if (array_search($month, $thirty)) { + $max=30; + } + else { + $max=(($year % 4 == 0) && ($year % 100 != 0 || $year % 400 == 0)) ? 29 : 28; + } + + // If the date falls out of bounds, set it to the maximum for the given + // month. Makes assumption about the user's intention, rather than failing + // for absolutely everything. + if ($day>$max) { + $day=$max; + } + + return mktime($hour, $min, $sec, $month, $day, $year); +} + +function getTime() { + if (function_exists('microtime')) { + $tm = microtime(); + $tm = explode(' ', $tm); + return (float) sprintf('%f', $tm[1] + $tm[0]); + } + return time(); +} + +function markQuery($str, $tag = "b") { + + GLOBAL $query; + $querywords = split(" ", $query); + + foreach ($querywords as $queryword) + $str = eregi_replace("($queryword)", "<" . $tag . ">\\1", $str); + + return $str; +} + + +// +// Parse all of the parameters for the search +// + +// Create the keyword search string. This search spans up to three columns +// in the database: keywords, name and comment. + +if (isset($_GET["query"]) && is_string($_GET["query"])) { + $query = sanitizeString($_GET["query"]); +} +else { + $query = ""; +} +// Split the search string into constituent keywords. +$tkeys=array(); +if (strlen($query)>0) { + $tkeys = split("[\t\r\n ,]+", $query); +} + +$mode = "AND"; +if (isset($_GET["mode"]) && is_numeric($_GET["mode"]) && $_GET["mode"]==0) { + $mode = "OR"; +} + +$searchin = array(); +if (is_array($_GET["searchin"])) { + foreach ($_GET["searchin"] as $si) { + if (isset($si) && is_numeric($si)) { + switch ($si) { + case 1: // keywords + case 2: // name + case 3: // comment + $searchin[$si] = $si; + break; + } + } + } +} + +// if none is checkd search all +if (count($searchin)==0) $searchin=array( 0, 1, 2, 3); + +$searchKey = ""; +// Assemble the arguments for the concatenation function. This allows the +// search to be carried across all the relevant fields. +$concatFunction = ""; +if (in_array(1, $searchin)) { + $concatFunction = "`tblDocuments`.`keywords`"; +} +if (in_array(2, $searchin)) { + $concatFunction = (strlen($concatFunction) == 0 ? "" : $concatFunction.", ")."`tblDocuments`.`name`"; +} +if (in_array(3, $searchin)) { + $concatFunction = (strlen($concatFunction) == 0 ? "" : $concatFunction.", ")."`tblDocuments`.`comment`"; +} + +if (strlen($concatFunction)>0 && count($tkeys)>0) { + $concatFunction = "CONCAT_WS(' ', ".$concatFunction.")"; + foreach ($tkeys as $key) { + $key = trim($key); + if (strlen($key)>0) { + $searchKey = (strlen($searchKey)==0 ? "" : $searchKey." ".$mode." ").$concatFunction." LIKE '%".$key."%'"; + } + } +} + +// Check to see if the search has been restricted to a particular sub-tree in +// the folder hierarchy. +$searchFolder = ""; +if (isset($_GET["targetidform1"]) && is_numeric($_GET["targetidform1"]) && $_GET["targetidform1"]>0) { + $targetid = $_GET["targetidform1"]; + $startFolder = getFolder($targetid); +} +else { + $targetid = $settings->_rootFolderID; + $startFolder = getFolder($targetid); +} +if (!is_object($startFolder)) { + UI::exitError(getMLText("search_results"),getMLText("invalid_folder_id")); +} + +if ($targetid != $settings->_rootFolderID) { + $searchFolder = "`tblDocuments`.`folderList` LIKE '%:".$targetid.":%'"; +} + +// Now that the target folder has been identified, it is possible to create +// the full navigation bar. +$folderPathHTML = getFolderPathHTML($startFolder, true); +UI::htmlStartPage(getMLText("search_results")); +UI::globalNavigation($startFolder); +UI::pageNavigation($folderPathHTML, "", $startFolder); +UI::contentHeading(getMLText("search_results")); + +// Check to see if the search has been restricted to a particular +// document owner. +$searchOwner = ""; +if (isset($_GET["ownerid"]) && is_numeric($_GET["ownerid"]) && $_GET["ownerid"]!=-1) { + if (!is_object(getUser($_GET["ownerid"]))) { + UI::contentContainer(getMLText("unknown_owner")); + UI::htmlEndPage(); + exit; + } + $ownerid = $_GET["ownerid"]; +} +else { + $ownerid = -1; +} +if ($ownerid != -1) { + $searchOwner = "`tblDocuments`.`owner` = '".$ownerid."'"; +} + +// Is the search restricted to documents created between two specific dates? +$searchCreateDate = ""; +if (isset($_GET["creationdate"]) && $_GET["creationdate"]!=null) { + $startdate = makeTimeStamp(0, 0, 0, $_GET["createstartyear"], $_GET["createstartmonth"], $_GET["createstartday"]); + if (is_bool($startdate)) { + UI::contentContainer(getMLText("invalid_create_date_start")); + UI::htmlEndPage(); + exit; + } + $stopdate = makeTimeStamp(23, 59, 59, $_GET["createendyear"], $_GET["createendmonth"], $_GET["createendday"]); + if (is_bool($stopdate)) { + UI::contentContainer(getMLText("invalid_create_date_end")); + UI::htmlEndPage(); + exit; + } + $searchCreateDate = "`tblDocuments`.`date` >= ".$startdate. " AND `tblDocuments`.`date` <= ".$stopdate; +} + +// Is the search restricted to documents last updated between two specific +// dates? Not currently used as a more sophisticated method for reporting +// updates is required. +/* +$searchLastUpdate = ""; +if (isset($_GET["lastupdate"]) && $_GET["lastupdate"]!=null) { + $lastupdate = true; + + $startdate = makeTimeStamp(0, 0, 0, $_GET["updatestartyear"], $_GET["updatestartmonth"], $_GET["updatestartday"]); + if (is_bool($startdate)) { + die ("invalid start date for last update date range"); + } + $stopdate = mktime(23,59,59, $updateendmonth, $updateendday, $updateendyear); + $stopdate = makeTimeStamp(23, 59, 59, $_GET["updateendyear"], $_GET["updateendmonth"], $_GET["updateendday"]); + if (is_bool($stopdate)) { + die ("invalid end date for last update date range"); + } + $searchLastUpdate = "`contentDate` >= ".$startdate. " AND `contentDate` <= ".$stopdate; +} +*/ + +// +// Get the page number to display. If the result set contains more than +// 25 entries, it is displayed across multiple pages. +// +// This requires that a page number variable be used to track which page the +// user is interested in, and an extra clause on the select statement. +// +// Default page to display is always one. +$pageNumber=1; +if (isset($_GET["pg"])) { + if (is_numeric($_GET["pg"]) && $_GET["pg"]>0) { + $pageNumber = (integer)$_GET["pg"]; + } + else if (!strcasecmp($_GET["pg"], "all")) { + $pageNumber = "all"; + } +} + + +// ------------------------------------- Suche starten -------------------------------------------- +$startTime = getTime(); + +// +// Construct the SQL query that will be used to search the database. +// + +if (!$db->createTemporaryTable("ttcontentid") || !$db->createTemporaryTable("ttstatid")) { + UI::contentContainer(getMLText("internal_error")); + UI::htmlEndPage(); + exit; +} + +//$searchQuery = "SELECT `tblDocuments`.*, ". +// "`tblDocumentContent`.`version`, ". +// "`tblDocumentStatusLog`.`status`, `tblDocumentLocks`.`userID` as `lockUser` ". + +$searchQuery = "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version`"; + +if (strlen($searchKey)>0) { + $searchQuery .= " AND (".$searchKey.")"; +} +if (strlen($searchFolder)>0) { + $searchQuery .= " AND ".$searchFolder; +} +if (strlen($searchOwner)>0) { + $searchQuery .= " AND (".$searchOwner.")"; +} +if (strlen($searchCreateDate)>0) { + $searchQuery .= " AND (".$searchCreateDate.")"; +} + +// status +$stlist = "("; +if (isset($_GET["pendingReview"])){ + if ($stlist != "(") $stlist .= ","; + $stlist .= S_DRAFT_REV; +} +if (isset($_GET["pendingApproval"])){ + if ($stlist != "(") $stlist .= ","; + $stlist .= S_DRAFT_APP; +} +if (isset($_GET["released"])){ + if ($stlist != "(") $stlist .= ","; + $stlist .= S_RELEASED; +} +if (isset($_GET["rejected"])){ + if ($stlist != "(") $stlist .= ","; + $stlist .= S_REJECTED; +} +if (isset($_GET["obsolete"])){ + if ($stlist != "(") $stlist .= ","; + $stlist .= S_OBSOLETE; +} +if (isset($_GET["expired"])){ + if ($stlist != "(") $stlist .= ","; + $stlist .= S_EXPIRED; +} +if ($stlist != "("){ + $stlist .= ")"; + $searchQuery .= " AND `tblDocumentStatusLog`.`status` IN ".$stlist; +} + +// Count the number of rows that the search will produce. +$resArr = $db->getResultArray("SELECT COUNT(*) AS num ".$searchQuery); +$totalDocs = 0; +if (is_numeric($resArr[0]["num"]) && $resArr[0]["num"]>0) { + $totalDocs = (integer)$resArr[0]["num"]; +} +$totalPages = (integer)($totalDocs/25); +if (($totalDocs%25) > 0) { + $totalPages++; +} +if (is_numeric($pageNumber) && $pageNumber>$totalPages) { + $pageNumber = $totalPages; +} + +// If there are no results from the count query, then there is no real need +// to run the full query. TODO: re-structure code to by-pass additional +// queries when no initial results are found. In the meantime, make sure that +// the page number is at least 1. +if (is_numeric($pageNumber) && $pageNumber==0) { + $pageNumber = 1; +} +// Prepare the complete search query, including the LIMIT clause. +$searchQuery = "SELECT `tblDocuments`.*, ". + "`tblDocumentContent`.`version`, ". + "`tblDocumentStatusLog`.`status`, `tblDocumentLocks`.`userID` as `lockUser` ".$searchQuery; + +if (is_numeric($pageNumber)) { + $searchQuery .= " LIMIT ".(($pageNumber-1)*25).", 25"; +} + +// Send the complete search query to the database. +$resArr = $db->getResultArray($searchQuery); + +$searchTime = getTime() - $startTime; +$searchTime = round($searchTime, 2); +// ---------------------------------- Ausgabe der Ergebnisse -------------------------------------- + +UI::contentContainerStart(); +?> + + + + + +
        + $totalDocs)); +} +?> + $searchTime));?>
        + +"; +print "\n\n"; +//print "\n"; +print "".getMLText("name")."\n"; +print "".getMLText("owner")."\n"; +print "".getMLText("status")."\n"; +print "".getMLText("version")."\n"; +print "".getMLText("comment")."\n"; +//print "".getMLText("reviewers")."\n"; +//print "".getMLText("approvers")."\n"; +print "\n\n\n"; + +$resultsFilteredByAccess = false; +foreach ($resArr as $docArr) { + + $document = new Document( + $docArr["id"], $docArr["name"], + $docArr["comment"], $docArr["date"], + $docArr["expires"], $docArr["owner"], + $docArr["folder"], $docArr["inheritAccess"], + $docArr["defaultAccess"], $docArr["lockUser"], + $docArr["keywords"], $docArr["sequence"]); + + if ($document->getAccessMode($user) < M_READ) { + $resultsFilteredByAccess = true; + } + else { + print ""; + //print ""; + if (in_array(2, $searchin)) { + $docName = markQuery($docArr["name"], "i"); + } + else { + $docName = $docArr["name"]; + } + print "/"; + $folder = getFolder($docArr["folder"]); + $path = $folder->getPath(); + for ($i = 1; $i < count($path); $i++) { + print $path[$i]->getName()."/"; + } + print $docName; + print ""; + + $owner = $document->getOwner(); + print "".$owner->getFullName().""; + print "".getOverallStatusText($docArr["status"]). ""; + + print "".$docArr["version"].""; + + if (in_array(3, $searchin)) $comment = markQuery($docArr["comment"]); + else $comment = $docArr["comment"]; + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + print "".$comment.""; + + /*print ""; + if (!$db->createTemporaryTable("ttreviewid")) { + print "-"; + } + else { + $queryStr="SELECT `tblDocumentReviewers`.*, `tblDocumentReviewLog`.`status`, ". + "`tblDocumentReviewLog`.`comment`, `tblDocumentReviewLog`.`date`, ". + "`tblDocumentReviewLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". + "FROM `tblDocumentReviewers` ". + "LEFT JOIN `tblDocumentReviewLog` USING (`reviewID`) ". + "LEFT JOIN `ttreviewid` on `ttreviewid`.`maxLogID` = `tblDocumentReviewLog`.`reviewLogID` ". + "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentReviewers`.`required`". + "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentReviewers`.`required`". + "WHERE `ttreviewid`.`maxLogID`=`tblDocumentReviewLog`.`reviewLogID` ". + "AND `tblDocumentReviewers`.`documentID` = '". $docArr["id"] ."' ". + "AND `tblDocumentReviewers`.`version` = '". $docArr["version"] ."' "; + $rstat = $db->getResultArray($queryStr); + if (!is_bool($rstat) && count($rstat)>0) { + print "
          "; + $liFlag=false; + foreach ($rstat as $r) { + if ($r["status"]!=-2) { + print ""; + $required = null; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + if (strlen($r["fullName"])==0) { + $reqName = getMLText("unknown_user").$r["required"]; + } + else { + $reqName = $r["fullName"]; + } + break; + case 1: // Reviewer is a group. + if (strlen($r["groupName"])==0) { + $reqName = getMLText("unknown_group").$r["required"]; + } + else { + $reqName = "".$r["groupName"].""; + } + break; + } + print "".$reqName.": "; + printReviewStatusText($r["status"], $r["date"]); + print ""; + $liFlag=true; + } + } + print "
        "; + } + else { + print "-"; + } + } + print "\n"; + if (!$db->createTemporaryTable("ttapproveid", $forceTemporaryTable)) { + print "-"; + } + else { + $queryStr="SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". + "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". + "`tblDocumentApproveLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". + "FROM `tblDocumentApprovers` ". + "LEFT JOIN `tblDocumentApproveLog` USING (`approveID`) ". + "LEFT JOIN `ttapproveid` on `ttapproveid`.`maxLogID` = `tblDocumentApproveLog`.`approveLogID` ". + "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentApprovers`.`required`". + "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentApprovers`.`required`". + "WHERE `ttapproveid`.`maxLogID`=`tblDocumentApproveLog`.`approveLogID` ". + "AND `tblDocumentApprovers`.`documentID` = '". $docArr["id"] ."' ". + "AND `tblDocumentApprovers`.`version` = '". $docArr["version"] ."'"; + $astat = $db->getResultArray($queryStr); + if (!is_bool($astat) && count($astat)>0) { + print "
          "; + $liFlag=false; + foreach ($astat as $a) { + if ($a["status"]!=-2) { + print ""; + $required = null; + switch ($a["type"]) { + case 0: // Approver is an individual. + if (strlen($a["fullName"])==0) { + $reqName = getMLText("unknown_user").$a["required"]; + } + else { + $reqName = $a["fullName"]; + } + break; + case 1: // Approver is a group. + if (strlen($a["groupName"])==0) { + $reqName = getMLText("unknown_group").$a["required"]; + } + else { + $reqName = "".$a["groupName"].""; + } + break; + } + print "".$reqName.": "; + printApprovalStatusText($a["status"], $a["date"]); + print ""; + $liFlag=true; + } + } + print "
        "; + } + else { + print "-"; + } + } + print ""; + */ + print "\n"; + } +} +if ($resultsFilteredByAccess) { + print "". getMLText("search_results_access_filtered") . ""; +} +print "\n"; + +UI::pageList($pageNumber, $totalPages, "../op/op.Search.php", $_GET); + +UI::contentContainerEnd(); +UI::htmlEndPage(); +?> diff --git a/op/op.SetExpires.php b/op/op.SetExpires.php new file mode 100644 index 000000000..df49d290d --- /dev/null +++ b/op/op.SetExpires.php @@ -0,0 +1,61 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +$expires = ($_POST["expires"] == "true") ? mktime(0,0,0, sanitizeString($_POST["expmonth"]), sanitizeString($_POST["expday"]), sanitizeString($_POST["expyear"])) : false; if (!$document->setExpires($expires)){ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +$document->verifyLastestContentExpriry(); + +add_log_line("?documentid=".$documentid); + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.SetReviewersApprovers.php b/op/op.SetReviewersApprovers.php new file mode 100644 index 000000000..18b2756a6 --- /dev/null +++ b/op/op.SetReviewersApprovers.php @@ -0,0 +1,402 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_POST["version"]; +$content = $document->getContentByVersion($version); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// control status. +$overallStatus = $content->getStatus(); +if ($overallStatus["status"]==S_REJECTED || $overallStatus["status"]==S_OBSOLETE ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_assign_invalid_state")); +} + +// Retrieve a list of all users and groups that have review / approve +// privileges. +$docAccess = $document->getApproversList(); +$accessIndex = array("i"=>array(), "g"=>array()); +foreach ($docAccess["users"] as $i=>$da) { + $accessIndex["i"][$da->getID()] = $i; +} +foreach ($docAccess["groups"] as $i=>$da) { + $accessIndex["g"][$da->getID()] = $i; +} + +// Retrieve list of currently assigned reviewers and approvers, along with +// their latest status. +$reviewStatus = $content->getReviewStatus(); +$approvalStatus = $content->getApprovalStatus(); +// Index the review results for easy cross-reference with the Approvers List. +$reviewIndex = array("i"=>array(), "g"=>array()); +foreach ($reviewStatus as $i=>$rs) { + if ($rs["status"]!=-2) { + if ($rs["type"]==0) { + $reviewIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $reviewIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } +} +// Index the approval results for easy cross-reference with the Approvers List. +$approvalIndex = array("i"=>array(), "g"=>array()); +foreach ($approvalStatus as $i=>$rs) { + if ($rs["status"]!=-2) { + if ($rs["type"]==0) { + $approvalIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $approvalIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } +} + +// Get the list of proposed reviewers, stripping out any duplicates. +$pIndRev = (isset($_POST["indReviewers"]) ? array_values(array_unique($_POST["indReviewers"])) : array()); +$pGrpRev = (isset($_POST["grpReviewers"]) ? array_values(array_unique($_POST["grpReviewers"])) : array()); +foreach ($pIndRev as $p) { + if (is_numeric($p)) { + if (isset($accessIndex["i"][$p])) { + // Proposed reviewer is on the list of possible reviewers. + if (!isset($reviewIndex["i"][$p])) { + // Proposed reviewer is not a current reviewer, so add as a new + // reviewer. + $res = $content->addIndReviewer($docAccess["users"][$accessIndex["i"][$p]], $user, true); + $unm = $docAccess["users"][$accessIndex["i"][$p]]->getFullName(); + $uml = $docAccess["users"][$accessIndex["i"][$p]]->getEmail(); + + switch ($res) { + case 0: + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_assigned")); + break; + case -4: + // email error + break; + } + } + else { + // Remove reviewer from the index of possible reviewers. If there are + // any reviewers left over in the list of possible reviewers, they + // will be removed from the review process for this document revision. + unset($reviewIndex["i"][$p]); + } + } + } +} +if (count($reviewIndex["i"]) > 0) { + foreach ($reviewIndex["i"] as $rx=>$rv) { + if ($rv["status"] == 0) { + // User is to be removed from the review list. + if (!isset($docAccess["users"][$accessIndex["i"][$rx]])) { + // User does not have any review privileges for this document + // revision or does not exist. + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $reviewStatus[$rv["idx"]]["reviewID"] ."', '-2', '".getMLText("removed_reviewer")."', NOW(), '". $user->getID() ."')"; + echo $queryStr; + $res = $db->getResult($queryStr); + } + else { + $res = $content->delIndReviewer($docAccess["users"][$accessIndex["i"][$rx]], $user, true); + $unm = $docAccess["users"][$accessIndex["i"][$rx]]->getFullName(); + $uml = $docAccess["users"][$accessIndex["i"][$rx]]->getEmail(); + switch ($res) { + case 0: + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_removed")); + break; + case -4: + // email error + break; + } + } + } + } +} +foreach ($pGrpRev as $p) { + if (is_numeric($p)) { + if (isset($accessIndex["g"][$p])) { + // Proposed reviewer is on the list of possible reviewers. + if (!isset($reviewIndex["g"][$p])) { + // Proposed reviewer is not a current reviewer, so add as a new + // reviewer. + $res = $content->addGrpReviewer($docAccess["groups"][$accessIndex["g"][$p]], $user, true); + $gnm = $docAccess["groups"][$accessIndex["g"][$p]]->getName(); + switch ($res) { + case 0: + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_assigned")); + break; + case -4: + // email error + break; + } + } + else { + // Remove reviewer from the index of possible reviewers. + unset($reviewIndex["g"][$p]); + } + } + } +} +if (count($reviewIndex["g"]) > 0) { + foreach ($reviewIndex["g"] as $rx=>$rv) { + if ($rv["status"] == 0) { + // Group is to be removed from the review list. + if (!isset($docAccess["groups"][$accessIndex["g"][$rx]])) { + // Group does not have any review privileges for this document + // revision or does not exist. + $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $reviewStatus[$rv["idx"]]["reviewID"] ."', '-2', '".getMLText("removed_reviewer")."', NOW(), '". $user->getID() ."')"; + echo $queryStr; + $res = $db->getResult($queryStr); + } + else { + $res = $content->delGrpReviewer($docAccess["groups"][$accessIndex["g"][$rx]], $user, true); + $gnm = $docAccess["groups"][$accessIndex["g"][$rx]]->getName(); + switch ($res) { + case 0: + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_removed")); + break; + case -4: + // email error + break; + } + } + } + } +} + +// Get the list of proposed approvers, stripping out any duplicates. +$pIndApp = (isset($_POST["indApprovers"]) ? array_values(array_unique($_POST["indApprovers"])) : array()); +$pGrpApp = (isset($_POST["grpApprovers"]) ? array_values(array_unique($_POST["grpApprovers"])) : array()); +foreach ($pIndApp as $p) { + if (is_numeric($p)) { + if (isset($accessIndex["i"][$p])) { + // Proposed approver is on the list of possible approvers. + if (!isset($approvalIndex["i"][$p])) { + // Proposed approver is not a current approver, so add as a new + // approver. + $res = $content->addIndApprover($docAccess["users"][$accessIndex["i"][$p]], $user, ($overallStatus["status"]==0 ? false : true)); + $unm = $docAccess["users"][$accessIndex["i"][$p]]->getFullName(); + $uml = $docAccess["users"][$accessIndex["i"][$p]]->getEmail(); + switch ($res) { + case 0: + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_assigned")); + break; + case -4: + // email error + break; + } + } + else { + // Remove approver from the index of possible approvers. + unset($approvalIndex["i"][$p]); + } + } + } +} +if (count($approvalIndex["i"]) > 0) { + foreach ($approvalIndex["i"] as $rx=>$rv) { + if ($rv["status"] == 0) { + // User is to be removed from the approvers list. + if (!isset($docAccess["users"][$accessIndex["i"][$rx]])) { + // User does not have any approval privileges for this document + // revision or does not exist. + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $approvalStatus[$rv["idx"]]["approveID"] ."', '-2', '".getMLText("removed_approver")."', NOW(), '". $user->getID() ."')"; + $res = $db->getResult($queryStr); + } + else { + $res = $content->delIndApprover($docAccess["users"][$accessIndex["i"][$rx]], $user, true); + $unm = $docAccess["users"][$accessIndex["i"][$rx]]->getFullName(); + $uml = $docAccess["users"][$accessIndex["i"][$rx]]->getEmail(); + switch ($res) { + case 0: + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_removed")); + break; + case -4: + // email error + break; + } + } + } + } +} +foreach ($pGrpApp as $p) { + if (is_numeric($p)) { + if (isset($accessIndex["g"][$p])) { + // Proposed approver is on the list of possible approvers. + if (!isset($approvalIndex["g"][$p])) { + // Proposed approver is not a current approver, so add as a new + // approver. + $res = $content->addGrpApprover($docAccess["groups"][$accessIndex["g"][$p]], $user, ($overallStatus["status"]==0 ? false : true)); + $gnm = $docAccess["groups"][$accessIndex["g"][$p]]->getName(); + switch ($res) { + case 0: + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_assigned")); + break; + case -4: + // email error + break; + } + } + else { + // Remove approver from the index of possible approvers. + unset($approvalIndex["g"][$p]); + } + } + } +} +if (count($approvalIndex["g"]) > 0) { + foreach ($approvalIndex["g"] as $rx=>$rv) { + if ($rv["status"] == 0) { + // User is to be removed from the approvers list. + if (!isset($docAccess["groups"][$accessIndex["g"][$rx]])) { + // Group does not have any approval privileges for this document + // revision or does not exist. + + $queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $approvalStatus[$rv["idx"]]["approveID"] ."', '-2', '".getMLText("removed_approver")."', NOW(), '". $user->getID() ."')"; + $res = $db->getResult($queryStr); + } + else { + $res = $content->delGrpApprover($docAccess["groups"][$accessIndex["g"][$rx]], $user, true); + $gnm = $docAccess["groups"][$accessIndex["g"][$rx]]->getName(); + switch ($res) { + case 0: + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_removed")); + break; + case -4: + // email error + break; + } + } + } + } +} + + + +$content->verifyStatus(false,$user); + +add_log_line("?documentid=".$documentid); +header("Location:../out/out.DocumentVersionDetail.php?documentid=".$documentid."&version=".$version); + +?> diff --git a/op/op.UnlockDocument.php b/op/op.UnlockDocument.php new file mode 100644 index 000000000..1e6a664db --- /dev/null +++ b/op/op.UnlockDocument.php @@ -0,0 +1,69 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!$document->isLocked()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_is_not_locked")); +} + +$lockingUser = $document->getLockingUser(); + +if (($lockingUser->getID() == $user->getID()) || ($document->getAccessMode($user) == M_ALL)) { + if (!$document->setLocked(false)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } +} +else { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} +add_log_line(); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php new file mode 100644 index 000000000..10a2c735f --- /dev/null +++ b/op/op.UpdateDocument.php @@ -0,0 +1,166 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = getDocument($documentid); +$folder = $document->getFolder(); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if ($document->isLocked()) { + $lockingUser = $document->getLockingUser(); + if (($lockingUser->getID() != $user->getID()) && ($document->getAccessMode($user) != M_ALL)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("no_update_cause_locked")); + } + else $document->setLocked(false); +} + +if (is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["size"] > 0 && $_FILES['userfile']['error']==0) { + + $comment = sanitizeString($_POST["comment"]); + $userfiletmp = $_FILES["userfile"]["tmp_name"]; + $userfiletype = sanitizeString($_FILES["userfile"]["type"]); + $userfilename = sanitizeString($_FILES["userfile"]["name"]); + + $lastDotIndex = strrpos(basename($userfilename), "."); + if (is_bool($lastDotIndex) && !$lastDotIndex) + $fileType = "."; + else + $fileType = substr($userfilename, $lastDotIndex); + + // Get the list of reviewers and approvers for this document. + $reviewers = array(); + $approvers = array(); + + // Retrieve the list of individual reviewers from the form. + $reviewers["i"] = array(); + if (isset($_POST["indReviewers"])) { + foreach ($_POST["indReviewers"] as $ind) { + $reviewers["i"][] = $ind; + } + } + // Retrieve the list of reviewer groups from the form. + $reviewers["g"] = array(); + if (isset($_POST["grpReviewers"])) { + foreach ($_POST["grpReviewers"] as $grp) { + $reviewers["g"][] = $grp; + } + } + + // Retrieve the list of individual approvers from the form. + $approvers["i"] = array(); + if (isset($_POST["indApprovers"])) { + foreach ($_POST["indApprovers"] as $ind) { + $approvers["i"][] = $ind; + } + } + // Retrieve the list of approver groups from the form. + $approvers["g"] = array(); + if (isset($_POST["grpApprovers"])) { + foreach ($_POST["grpApprovers"] as $grp) { + $approvers["g"][] = $grp; + } + } + + // add mandatory reviewers/approvers + $docAccess = $folder->getApproversList(); + $res=$user->getMandatoryReviewers(); + foreach ($res as $r){ + + if ($r['reviewerUserID']!=0){ + foreach ($docAccess["users"] as $usr) + if ($usr->getID()==$r['reviewerUserID']){ + $reviewers["i"][] = $r['reviewerUserID']; + break; + } + } + else if ($r['reviewerGroupID']!=0){ + foreach ($docAccess["groups"] as $grp) + if ($grp->getID()==$r['reviewerGroupID']){ + $reviewers["g"][] = $r['reviewerGroupID']; + break; + } + } + } + $res=$user->getMandatoryApprovers(); + foreach ($res as $r){ + + if ($r['approverUserID']!=0){ + foreach ($docAccess["users"] as $usr) + if ($usr->getID()==$r['approverUserID']){ + $approvers["i"][] = $r['approverUserID']; + break; + } + } + else if ($r['approverGroupID']!=0){ + foreach ($docAccess["groups"] as $grp) + if ($grp->getID()==$r['approverGroupID']){ + $approvers["g"][] = $r['approverGroupID']; + break; + } + } + } + + + $contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $reviewers, $approvers); + if (is_bool($contentResult) && !$contentResult) { + + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } + else { + $expires = ($_POST["expires"] == "true") ? mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]) : false; + + if (!$document->setExpires($expires)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } + } +} +else { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +add_log_line("?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/op/op.UserDefaultKeywords.php b/op/op.UserDefaultKeywords.php new file mode 100644 index 000000000..b143df182 --- /dev/null +++ b/op/op.UserDefaultKeywords.php @@ -0,0 +1,207 @@ +getID(), $name); + if (!$newCategory) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); + } + $categoryid=$newCategory->getID(); +} + + +//Kategorie löschen ---------------------------------------------------------------------------------- +else if ($action == "removecategory") { + + if (isset($_POST["categoryid"])) { + $categoryid = sanitizeString($_POST["categoryid"]); + } + else { + $categoryid = sanitizeString($_GET["categoryid"]); + } + $category = getKeywordCategory($categoryid); + if (is_object($category)) { + $owner = $category->getOwner(); + if ($owner->getID() != $user->getID()) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("access_denied")); + } + if (!$category->remove()) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); + } + } + else UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); + $categoryid=-1; +} + +//Kategorie bearbeiten: Neuer Name -------------------------------------------------------------------- +else if ($action == "editcategory") { + + if (isset($_POST["categoryid"])) { + $categoryid = sanitizeString($_POST["categoryid"]); + } + else { + $categoryid = sanitizeString($_GET["categoryid"]); + } + $category = getKeywordCategory($categoryid); + if (is_object($category)) { + $owner = $category->getOwner(); + if ($owner->getID() != $user->getID()) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("access_denied")); + } + if (isset($_POST["name"])) { + $name = sanitizeString($_POST["name"]); + } + else { + $name = sanitizeString($_GET["name"]); + } + + if (!$category->setName($name)) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); + } + } + else UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); +} + +//Kategorie bearbeiten: Neue Stichwortliste ---------------------------------------------------------- +else if ($action == "newkeywords") { + + if (isset($_POST["categoryid"])) { + $categoryid = sanitizeString($_POST["categoryid"]); + } + else { + $categoryid = sanitizeString($_GET["categoryid"]); + } + $category = getKeywordCategory($categoryid); + if (is_object($category)) { + $owner = $category->getOwner(); + if ($owner->getID() != $user->getID()) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("access_denied")); + } + + if (isset($_POST["keywords"])) { + $keywords = sanitizeString($_POST["keywords"]); + } + else { + $keywords = sanitizeString($_GET["keywords"]); + } + if (!$category->addKeywordList($keywords)) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); + } + } + else UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); +} + +//Kategorie bearbeiten: Stichwortliste bearbeiten ---------------------------------------------------------- +else if ($action == "editkeywords") { + + if (isset($_POST["categoryid"])) { + $categoryid = sanitizeString($_POST["categoryid"]); + } + else { + $categoryid = sanitizeString($_GET["categoryid"]); + } + $category = getKeywordCategory($categoryid); + if (is_object($category)) { + $owner = $category->getOwner(); + if ($owner->getID() != $user->getID()) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("access_denied")); + } + + if (isset($_POST["keywordsid"])) { + $keywordsid = sanitizeString($_POST["keywordsid"]); + } + else { + $keywordsid = sanitizeString($_GET["keywordsid"]); + } + if (!is_numeric($keywordsid)) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("unknown_keyword_category")); + } + + if (!$category->editKeywordList($keywordsid, $_POST["keywords"])) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); + } + } + else UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); +} + +//Kategorie bearbeiten: Neue Stichwortliste löschen ---------------------------------------------------------- +else if ($action == "removekeywords") { + + if (isset($_POST["categoryid"])) { + $categoryid = sanitizeString($_POST["categoryid"]); + } + else { + $categoryid = sanitizeString($_GET["categoryid"]); + } + $category = getKeywordCategory($categoryid); + if (is_object($category)) { + $owner = $category->getOwner(); + if ($owner->getID() != $user->getID()) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("access_denied")); + } + if (isset($_POST["keywordsid"])) { + $keywordsid = sanitizeString($_POST["keywordsid"]); + } + else { + $keywordsid = sanitizeString($_GET["keywordsid"]); + } + if (!is_numeric($keywordsid)) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("unknown_keyword_category")); + } + if (!$category->removeKeywordList($keywordsid)) { + UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); + } + } + else UI::exitError(getMLText("personal_default_keywords"),getMLText("error_occured")); +} + +header("Location:../out/out.UserDefaultKeywords.php?categoryid=".$categoryid); + +?> diff --git a/op/op.UsrMgr.php b/op/op.UsrMgr.php new file mode 100644 index 000000000..effcf9726 --- /dev/null +++ b/op/op.UsrMgr.php @@ -0,0 +1,237 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +if (isset($_POST["action"])) $action=$_POST["action"]; +else if (isset($_GET["action"])) $action=$_GET["action"]; +else $action=NULL; + +//Neuen Benutzer anlegen -------------------------------------------------------------------------- +if ($action == "adduser") { + + $login = sanitizeString($_POST["login"]); + $name = sanitizeString($_POST["name"]); + $email = sanitizeString($_POST["email"]); + $comment = sanitizeString($_POST["comment"]); + $isAdmin = (isset($_POST["isadmin"]) && $_POST["isadmin"]==1 ? 1 : 0); + $isHidden = (isset($_POST["ishidden"]) && $_POST["ishidden"]==1 ? 1 : 0); + + if (is_object(getUserByLogin($login))) { + UI::exitError(getMLText("admin_tools"),getMLText("user_exists")); + } + + $newUser = addUser($login, md5($_POST["pwd"]), $name, $email, $settings->_language, $settings->_theme, $comment, $isAdmin, $isHidden); + if ($newUser) { + + if (isset($_FILES["userfile"]) && is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["size"] > 0 && $_FILES['userfile']['error']==0) + { + $userfiletype = sanitizeString($_FILES["userfile"]["type"]); + $userfilename = sanitizeString($_FILES["userfile"]["name"]); + $lastDotIndex = strrpos(basename($userfilename), "."); + $fileType = substr($userfilename, $lastDotIndex); + if ($fileType != ".jpg" && $filetype != ".jpeg") + { + UI::exitError(getMLText("admin_tools"),getMLText("only_jpg_user_images")); + } + else + { + resizeImage($_FILES["userfile"]["tmp_name"]); + $newUser->setImage($_FILES["userfile"]["tmp_name"], $userfiletype); + } + } + } + else UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + + if (isset($_POST["usrReviewers"])){ + foreach ($_POST["usrReviewers"] as $revID) + $newUser->setMandatoryReviewer($revID,false); + } + + if (isset($_POST["grpReviewers"])){ + foreach ($_POST["grpReviewers"] as $revID) + $newUser->setMandatoryReviewer($revID,true); + } + + if (isset($_POST["usrApprovers"])){ + foreach ($_POST["usrApprovers"] as $appID) + $newUser->setMandatoryApprover($appID,false); + } + + if (isset($_POST["grpApprovers"])){ + foreach ($_POST["grpApprovers"] as $appID) + $newUser->setMandatoryApprover($appID,true); + } + + $userid=$newUser->getID(); + + add_log_line(".php&action=adduser&login=".$login); +} + +//Benutzer löschen -------------------------------------------------------------------------------- +else if ($action == "removeuser") { + + if (isset($_POST["userid"])) { + $userid = $_POST["userid"]; + } + else if (isset($_GET["userid"])) { + $userid = $_GET["userid"]; + } + + if ($userid==$settings->_adminID) { + UI::exitError(getMLText("admin_tools"),getMLText("cannot_delete_admin")); + } + if (!isset($userid) || !is_numeric($userid) || intval($userid)<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + $userToRemove = getUser($userid); + if (!is_object($userToRemove)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + if (!$userToRemove->remove()) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } + + add_log_line(".php&action=removeuser&userid=".$userid); + + $userid=-1; +} + +//Benutzer bearbeiten ----------------------------------------------------------------------------- +else if ($action == "edituser") { + + if (!isset($_POST["userid"]) || !is_numeric($_POST["userid"]) || intval($_POST["userid"])<1) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + $userid=$_POST["userid"]; + $editedUser = getUser($userid); + + if (!is_object($editedUser)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + + $login = sanitizeString($_POST["login"]); + $pwd = $_POST["pwd"]; + $name = sanitizeString($_POST["name"]); + $email = sanitizeString($_POST["email"]); + $comment = sanitizeString($_POST["comment"]); + $isAdmin = (isset($_POST["isadmin"]) && $_POST["isadmin"]==1 ? 1 : 0); + $isHidden = (isset($_POST["ishidden"]) && $_POST["ishidden"]==1 ? 1 : 0); + + if ($editedUser->getLogin() != $login) + $editedUser->setLogin($login); + if (isset($pwd) && ($pwd != "")) + $editedUser->setPwd(md5($pwd)); + if ($editedUser->getFullName() != $name) + $editedUser->setFullName($name); + if ($editedUser->getEmail() != $email) + $editedUser->setEmail($email); + if ($editedUser->getComment() != $comment) + $editedUser->setComment($comment); + if ($editedUser->isAdmin() != $isAdmin && $editedUser->getID()!=$settings->_adminID) + $editedUser->setAdmin($isAdmin); + if ($editedUser->isHidden() != $isHidden) + $editedUser->setHidden($isHidden); + + if (isset($_FILES['userfile']) && is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["size"] > 0 && $_FILES['userfile']['error']==0) + { + $userfiletype = sanitizeString($_FILES["userfile"]["type"]); + $userfilename = sanitizeString($_FILES["userfile"]["name"]); + $lastDotIndex = strrpos(basename($userfilename), "."); + $fileType = substr($userfilename, $lastDotIndex); + if ($fileType != ".jpg" && $filetype != ".jpeg") { + UI::exitError(getMLText("admin_tools"),getMLText("only_jpg_user_images")); + } + else { + resizeImage($_FILES["userfile"]["tmp_name"]); + $editedUser->setImage($_FILES["userfile"]["tmp_name"], $userfiletype); + } + } + + $editedUser->delMandatoryReviewers(); + + if (isset($_POST["usrReviewers"])) foreach ($_POST["usrReviewers"] as $revID) + $editedUser->setMandatoryReviewer($revID,false); + + if (isset($_POST["grpReviewers"])) foreach ($_POST["grpReviewers"] as $revID) + $editedUser->setMandatoryReviewer($revID,true); + + $editedUser->delMandatoryApprovers(); + + if (isset($_POST["usrApprovers"])) foreach ($_POST["usrApprovers"] as $appID) + $editedUser->setMandatoryApprover($appID,false); + + if (isset($_POST["grpApprovers"])) foreach ($_POST["grpApprovers"] as $appID) + $editedUser->setMandatoryApprover($appID,true); + + add_log_line(".php&action=edituser&userid=".$userid); + +} +else UI::exitError(getMLText("admin_tools"),getMLText("unknown_command")); + + +function resizeImage($imageFile) { + + // Not perfect. Creates a new image even if the old one is acceptable, + // and the output quality is low. Now uses the function imagecreatetruecolor(), + // though, so at least the pictures are in colour. + + // Originalbild einlesen + $origImg = imagecreatefromjpeg($imageFile); + $width = imagesx($origImg); + $height = imagesy($origImg); + // Thumbnail im Speicher erzeugen + $newHeight = 150; + $newWidth = ($width/$height) * $newHeight; + $newImg = imagecreatetruecolor($newWidth, $newHeight); + // Verkleinern + imagecopyresized($newImg, $origImg, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height); + // In File speichern + imagejpeg($newImg, $imageFile); + // Aufräumen + imagedestroy($origImg); + imagedestroy($newImg); + + return true; +} + +header("Location:../out/out.UsrMgr.php?userid=".$userid); + +?> diff --git a/op/op.ViewOnline.php b/op/op.ViewOnline.php new file mode 100644 index 000000000..c898af01e --- /dev/null +++ b/op/op.ViewOnline.php @@ -0,0 +1,76 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +$version = $_GET["version"]; + +if (!isset($version) || !is_numeric($version) || intval($version)<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$content = $document->getContentByVersion($version); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +if (isset($settings->_viewOnlineFileTypes) && is_array($settings->_viewOnlineFileTypes) && in_array(strtolower($content->getFileType()), $settings->_viewOnlineFileTypes)) { + header("Content-Type: " . $content->getMimeType()); +} +header("Content-Disposition: filename=\"" . mydmsDecodeString( $document->getName().$content->getFileType()) . "\""); +header("Content-Length: " . filesize($settings->_contentDir . $content->getPath())); +header("Expires: 0"); +header("Cache-Control: no-cache, must-revalidate"); +header("Pragma: no-cache"); + +readfile($settings->_contentDir . $content->getPath()); + +add_log_line(); + + +exit; +?> diff --git a/out/images/blank.png b/out/images/blank.png new file mode 100644 index 000000000..798191ab2 Binary files /dev/null and b/out/images/blank.png differ diff --git a/out/images/c.png b/out/images/c.png new file mode 100644 index 000000000..eab9d0c43 Binary files /dev/null and b/out/images/c.png differ diff --git a/out/images/del.gif b/out/images/del.gif new file mode 100644 index 000000000..3da837db2 Binary files /dev/null and b/out/images/del.gif differ diff --git a/out/images/docs.gif b/out/images/docs.gif new file mode 100644 index 000000000..2da561ebb Binary files /dev/null and b/out/images/docs.gif differ diff --git a/out/images/down.gif b/out/images/down.gif new file mode 100644 index 000000000..a8b0ef857 Binary files /dev/null and b/out/images/down.gif differ diff --git a/out/images/download.gif b/out/images/download.gif new file mode 100644 index 000000000..8714e230f Binary files /dev/null and b/out/images/download.gif differ diff --git a/out/images/download_header.gif b/out/images/download_header.gif new file mode 100644 index 000000000..a9eebc5cd Binary files /dev/null and b/out/images/download_header.gif differ diff --git a/out/images/dummy.gif b/out/images/dummy.gif new file mode 100644 index 000000000..0bf75f79b Binary files /dev/null and b/out/images/dummy.gif differ diff --git a/out/images/file.gif b/out/images/file.gif new file mode 100644 index 000000000..0df7b8410 Binary files /dev/null and b/out/images/file.gif differ diff --git a/out/images/folder_closed.gif b/out/images/folder_closed.gif new file mode 100644 index 000000000..2e3c71836 Binary files /dev/null and b/out/images/folder_closed.gif differ diff --git a/out/images/folder_opened.gif b/out/images/folder_opened.gif new file mode 100644 index 000000000..57750e7ff Binary files /dev/null and b/out/images/folder_opened.gif differ diff --git a/out/images/groupicon.gif b/out/images/groupicon.gif new file mode 100644 index 000000000..7076a3813 Binary files /dev/null and b/out/images/groupicon.gif differ diff --git a/out/images/icons/binary.png b/out/images/icons/binary.png new file mode 100644 index 000000000..45d87866f Binary files /dev/null and b/out/images/icons/binary.png differ diff --git a/out/images/icons/default.png b/out/images/icons/default.png new file mode 100644 index 000000000..90d884cf5 Binary files /dev/null and b/out/images/icons/default.png differ diff --git a/out/images/icons/document.png b/out/images/icons/document.png new file mode 100644 index 000000000..6c7c39434 Binary files /dev/null and b/out/images/icons/document.png differ diff --git a/out/images/icons/excel.png b/out/images/icons/excel.png new file mode 100644 index 000000000..0028777e8 Binary files /dev/null and b/out/images/icons/excel.png differ diff --git a/out/images/icons/gz.png b/out/images/icons/gz.png new file mode 100644 index 000000000..5bc5f4c66 Binary files /dev/null and b/out/images/icons/gz.png differ diff --git a/out/images/icons/html.png b/out/images/icons/html.png new file mode 100644 index 000000000..07fc9ada0 Binary files /dev/null and b/out/images/icons/html.png differ diff --git a/out/images/icons/image.png b/out/images/icons/image.png new file mode 100644 index 000000000..58cfb1afa Binary files /dev/null and b/out/images/icons/image.png differ diff --git a/out/images/icons/log.png b/out/images/icons/log.png new file mode 100644 index 000000000..7fce292a1 Binary files /dev/null and b/out/images/icons/log.png differ diff --git a/out/images/icons/midi.png b/out/images/icons/midi.png new file mode 100644 index 000000000..a193d289b Binary files /dev/null and b/out/images/icons/midi.png differ diff --git a/out/images/icons/ooo_drawing.png b/out/images/icons/ooo_drawing.png new file mode 100644 index 000000000..3a42a433f Binary files /dev/null and b/out/images/icons/ooo_drawing.png differ diff --git a/out/images/icons/ooo_formula.png b/out/images/icons/ooo_formula.png new file mode 100644 index 000000000..ee93b23b9 Binary files /dev/null and b/out/images/icons/ooo_formula.png differ diff --git a/out/images/icons/ooo_presentation.png b/out/images/icons/ooo_presentation.png new file mode 100644 index 000000000..43c2f1cf0 Binary files /dev/null and b/out/images/icons/ooo_presentation.png differ diff --git a/out/images/icons/ooo_spreadsheet.png b/out/images/icons/ooo_spreadsheet.png new file mode 100644 index 000000000..1afd66713 Binary files /dev/null and b/out/images/icons/ooo_spreadsheet.png differ diff --git a/out/images/icons/ooo_textdocument.png b/out/images/icons/ooo_textdocument.png new file mode 100644 index 000000000..8903864c2 Binary files /dev/null and b/out/images/icons/ooo_textdocument.png differ diff --git a/out/images/icons/pdf.png b/out/images/icons/pdf.png new file mode 100644 index 000000000..c376884de Binary files /dev/null and b/out/images/icons/pdf.png differ diff --git a/out/images/icons/powerpoint.png b/out/images/icons/powerpoint.png new file mode 100644 index 000000000..cc744e4bb Binary files /dev/null and b/out/images/icons/powerpoint.png differ diff --git a/out/images/icons/sound.png b/out/images/icons/sound.png new file mode 100644 index 000000000..47f6950ff Binary files /dev/null and b/out/images/icons/sound.png differ diff --git a/out/images/icons/source_c.png b/out/images/icons/source_c.png new file mode 100644 index 000000000..e420e79f0 Binary files /dev/null and b/out/images/icons/source_c.png differ diff --git a/out/images/icons/source_cpp.png b/out/images/icons/source_cpp.png new file mode 100644 index 000000000..667e8d753 Binary files /dev/null and b/out/images/icons/source_cpp.png differ diff --git a/out/images/icons/source_h.png b/out/images/icons/source_h.png new file mode 100644 index 000000000..fe0e995b6 Binary files /dev/null and b/out/images/icons/source_h.png differ diff --git a/out/images/icons/source_java.png b/out/images/icons/source_java.png new file mode 100644 index 000000000..92512ccf4 Binary files /dev/null and b/out/images/icons/source_java.png differ diff --git a/out/images/icons/source_py.png b/out/images/icons/source_py.png new file mode 100644 index 000000000..a28be9b71 Binary files /dev/null and b/out/images/icons/source_py.png differ diff --git a/out/images/icons/spreadsheet.png b/out/images/icons/spreadsheet.png new file mode 100644 index 000000000..eca3d52ba Binary files /dev/null and b/out/images/icons/spreadsheet.png differ diff --git a/out/images/icons/tar.png b/out/images/icons/tar.png new file mode 100644 index 000000000..8e3ea0b7c Binary files /dev/null and b/out/images/icons/tar.png differ diff --git a/out/images/icons/tex.png b/out/images/icons/tex.png new file mode 100644 index 000000000..feaa893a0 Binary files /dev/null and b/out/images/icons/tex.png differ diff --git a/out/images/icons/txt.png b/out/images/icons/txt.png new file mode 100644 index 000000000..46b2a9163 Binary files /dev/null and b/out/images/icons/txt.png differ diff --git a/out/images/icons/video.png b/out/images/icons/video.png new file mode 100644 index 000000000..f38de4ca3 Binary files /dev/null and b/out/images/icons/video.png differ diff --git a/out/images/icons/word.png b/out/images/icons/word.png new file mode 100644 index 000000000..1e4499779 Binary files /dev/null and b/out/images/icons/word.png differ diff --git a/out/images/infos.gif b/out/images/infos.gif new file mode 100644 index 000000000..1faaf88eb Binary files /dev/null and b/out/images/infos.gif differ diff --git a/out/images/line_vert.gif b/out/images/line_vert.gif new file mode 100644 index 000000000..31c4c87ed Binary files /dev/null and b/out/images/line_vert.gif differ diff --git a/out/images/line_vert_edit.gif b/out/images/line_vert_edit.gif new file mode 100644 index 000000000..f5f319f19 Binary files /dev/null and b/out/images/line_vert_edit.gif differ diff --git a/out/images/m.png b/out/images/m.png new file mode 100644 index 000000000..57a71472e Binary files /dev/null and b/out/images/m.png differ diff --git a/out/images/minus.png b/out/images/minus.png new file mode 100644 index 000000000..71e01cf2a Binary files /dev/null and b/out/images/minus.png differ diff --git a/out/images/p.png b/out/images/p.png new file mode 100644 index 000000000..2792fadbc Binary files /dev/null and b/out/images/p.png differ diff --git a/out/images/path_left.gif b/out/images/path_left.gif new file mode 100644 index 000000000..f98b77ad6 Binary files /dev/null and b/out/images/path_left.gif differ diff --git a/out/images/path_right.gif b/out/images/path_right.gif new file mode 100644 index 000000000..778485f9f Binary files /dev/null and b/out/images/path_right.gif differ diff --git a/out/images/plus.png b/out/images/plus.png new file mode 100644 index 000000000..4dfd09829 Binary files /dev/null and b/out/images/plus.png differ diff --git a/out/images/right.gif b/out/images/right.gif new file mode 100644 index 000000000..e84904e4e Binary files /dev/null and b/out/images/right.gif differ diff --git a/out/images/right_in.gif b/out/images/right_in.gif new file mode 100644 index 000000000..8c7ea7d5e Binary files /dev/null and b/out/images/right_in.gif differ diff --git a/out/images/right_in_plus.gif b/out/images/right_in_plus.gif new file mode 100644 index 000000000..f8fdb9b5f Binary files /dev/null and b/out/images/right_in_plus.gif differ diff --git a/out/images/right_in_to_down.gif b/out/images/right_in_to_down.gif new file mode 100644 index 000000000..9dc4b42cb Binary files /dev/null and b/out/images/right_in_to_down.gif differ diff --git a/out/images/right_last.gif b/out/images/right_last.gif new file mode 100644 index 000000000..9f58df734 Binary files /dev/null and b/out/images/right_last.gif differ diff --git a/out/images/save.gif b/out/images/save.gif new file mode 100644 index 000000000..c0b493a82 Binary files /dev/null and b/out/images/save.gif differ diff --git a/out/images/subfolders.gif b/out/images/subfolders.gif new file mode 100644 index 000000000..17666bd52 Binary files /dev/null and b/out/images/subfolders.gif differ diff --git a/out/images/to_down.gif b/out/images/to_down.gif new file mode 100644 index 000000000..856243121 Binary files /dev/null and b/out/images/to_down.gif differ diff --git a/out/images/usericon.gif b/out/images/usericon.gif new file mode 100644 index 000000000..5262d8204 Binary files /dev/null and b/out/images/usericon.gif differ diff --git a/out/images/view.gif b/out/images/view.gif new file mode 100644 index 000000000..4df0a1ad8 Binary files /dev/null and b/out/images/view.gif differ diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php new file mode 100644 index 000000000..b537ef2fb --- /dev/null +++ b/out/out.AddDocument.php @@ -0,0 +1,240 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} +$folderid = $_GET["folderid"]; +$folder = getFolder($folderid); +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +if ($folder->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("folder_title", array("foldername" => $folder->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($folderPathHTML, "view_folder", $folder); + +?> + + +getApproversList(); +?> + + + + +

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        :getDocuments());?>
        :
        : + +
        + +
        +
        :
        :
        :
        : +
        + + +
        : +
        + +
        + + + +
        :
        +
        +
          +getMandatoryReviewers(); + + foreach ($docAccess["users"] as $usr) { + + if ($usr->getID()==$user->getID()) continue; + + $mandatory=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print "
        • ". $usr->getFullName(); + else print "
        • ". $usr->getFullName(); + } +?> +
        +
        +
        :
        +
        +
          +getID()) $mandatory=true; + + if ($mandatory) print "
        • ".$grp->getName(); + else print "
        • ".$grp->getName(); + } +?> +
        +
        + + + +
        :
        +
        +
          +getMandatoryApprovers(); + + foreach ($docAccess["users"] as $usr) { + + if ($usr->getID()==$user->getID()) continue; + + $mandatory=false; + foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print "
        • ". $usr->getFullName(); + else print "
        • ". $usr->getFullName(); + } +?> +
        +
        +
        :
        +
        +
          +getID()) $mandatory=true; + + if ($mandatory) print "
        • ".$grp->getName(); + else print "
        • ".$grp->getName(); + + } +?> +
        +
        + +

        +

        ">

        +
        + diff --git a/out/out.AddEvent.php b/out/out.AddEvent.php new file mode 100644 index 000000000..67286d6b2 --- /dev/null +++ b/out/out.AddEvent.php @@ -0,0 +1,88 @@ + + + +
        + + + + + + + + + + + + + + + + + + + + +
        :
        :
        :
        :

        ">
        +
        + diff --git a/out/out.AddFile.php b/out/out.AddFile.php new file mode 100644 index 000000000..7dad75021 --- /dev/null +++ b/out/out.AddFile.php @@ -0,0 +1,113 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); + +?> + + + + + + +

        + +
        + + + + + + + + + + + + + + +
        :
        :
        :
        + +

        ">

        +
        + diff --git a/out/out.AddSubFolder.php b/out/out.AddSubFolder.php new file mode 100644 index 000000000..ca8cee59a --- /dev/null +++ b/out/out.AddSubFolder.php @@ -0,0 +1,104 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} +$folderid = $_GET["folderid"]; +$folder = getFolder($folderid); +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +if ($folder->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} +?> + + $folder->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($folderPathHTML, "view_folder", $folder); +UI::contentHeading(getMLText("add_subfolder")); +UI::contentContainerStart(); +?> + + +
        + + + + + + + + + + + + + + + + + + +
        :
        :
        :getSubFolders());?>

        ">
        +
        + diff --git a/out/out.AdminTools.php b/out/out.AdminTools.php new file mode 100644 index 000000000..980dd9051 --- /dev/null +++ b/out/out.AdminTools.php @@ -0,0 +1,56 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("admin_tools")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("admin_tools"), "admin_tools"); +UI::contentContainerStart(); +?> + + diff --git a/out/out.ApprovalSummary.php b/out/out.ApprovalSummary.php new file mode 100644 index 000000000..b909b7ce7 --- /dev/null +++ b/out/out.ApprovalSummary.php @@ -0,0 +1,190 @@ +createTemporaryTable("ttstatid")) { + UI::exitError(getMLText("approval_summary"),getMLText("internal_error_exit")); +} + +UI::htmlStartPage(getMLText("approval_summary")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("my_documents"), "my_documents"); +UI::contentHeading(getMLText("approval_summary")); +UI::contentContainerStart(); + +// TODO: verificare scadenza + +// Get document list for the current user. +$approvalStatus = $user->getApprovalStatus(); + +// reverse order +$approvalStatus["indstatus"]=array_reverse($approvalStatus["indstatus"],true); +$approvalStatus["grpstatus"]=array_reverse($approvalStatus["grpstatus"],true); + +// Create a comma separated list of all the documentIDs whose information is +// required. +$dList = array(); +foreach ($approvalStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } +} +foreach ($approvalStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } +} +$docCSV = ""; +foreach ($dList as $d) { + $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; +} + +if (strlen($docCSV)>0) { + + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentStatus` ". + "LEFT JOIN `tblDocumentStatusLog` USING (`statusID`) ". + "LEFT JOIN `ttstatid` on `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". + "ORDER BY `statusDate` DESC"; + + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && !$resArr) { + UI::exitError(getMLText("approval_summary"),getMLText("internal_error_exit")); + } + // Create an array to hold all of these results, and index the array by + // document id. This makes it easier to retrieve document ID information + // later on and saves us having to repeatedly poll the database every time + // new document information is required. + $docIdx = array(); + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + $docIdx[$res["id"]][$res["version"]] = $res; + } +} + +$iRev = array(); +$printheader = true; +foreach ($approvalStatus["indstatus"] as $st) { + + if (isset($docIdx[$st["documentID"]][$st["version"]])) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader = false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + if ($st["status"]!=-2) { + $iRev[] = $st["documentID"]; + } +} +if (!$printheader) { + echo "\n
        ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
        ".$docIdx[$st["documentID"]][$st["version"]]["name"]."".$docIdx[$st["documentID"]][$st["version"]]["ownerName"]."".getOverallStatusText($docIdx[$st["documentID"]][$st["version"]]["status"])."".$st["version"]."".$st["date"]." ". $docIdx[$st["documentID"]][$st["version"]]["statusName"] ."".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."
        \n"; +}else{ + printMLText("empty_notify_list"); +} + +UI::contentContainerEnd(); +UI::contentHeading(getMLText("group_approval_summary")); +UI::contentContainerStart(); + +$printheader = true; +foreach ($approvalStatus["grpstatus"] as $st) { + + if (!in_array($st["documentID"], $iRev) && isset($docIdx[$st["documentID"]][$st["version"]])) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader = false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } +} +if (!$printheader) { + echo "\n
        ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
        ".$docIdx[$st["documentID"]][$st["version"]]["name"]."".$docIdx[$st["documentID"]][$st["version"]]["ownerName"]."".getOverallStatusText($docIdx[$st["documentID"]][$st["version"]]["status"])."".$st["version"]."".$st["date"]." ". $docIdx[$st["documentID"]][$st["version"]]["statusName"] ."".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."
        \n"; +}else{ + printMLText("empty_notify_list"); +} + +UI::contentContainerEnd(); +UI::htmlEndPage(); + +?> diff --git a/out/out.ApproveDocument.php b/out/out.ApproveDocument.php new file mode 100644 index 000000000..b82e94db0 --- /dev/null +++ b/out/out.ApproveDocument.php @@ -0,0 +1,242 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} +$version = $_GET["version"]; +$content = $document->getContentByVersion($version); +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// operation is admitted only for last deocument version +$latestContent = $document->getLatestContent(); +if ($latestContent->getVersion()!=$version) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} +// verify if document has expired +if ($document->hasExpired()){ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +// retrieve the approval status for the current user. +$approvalStatus = $user->getApprovalStatus($documentid, $version); +if (count($approvalStatus["indstatus"]) == 0 && count($approvalStatus["grpstatus"]) == 0) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("no_action")); +} + +$indApprover = true; +if (count($approvalStatus["indstatus"])==0){ + $indApprover = false; +} +else if ($approvalStatus["indstatus"][0]["status"]==-2) { + $indApprover = false; +} + +$grpApprover=false; +foreach ($approvalStatus["grpstatus"] as $grpStatus) { + if (($grpStatus["status"]!=-2)&&(isset($grpStatus["status"]))) { + $grpApprover=true; + } +} + +if (!$indApprover && !$grpApprover) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("no_action")); +} + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); +UI::contentHeading(getMLText("submit_approval")); + +?> + + +"; + print "".getMLText("status").""; + print "".getMLText("comment").""; + print "".getMLText("last_update").""; + print ""; + print ""; + printApprovalStatusText($approvalStatus["indstatus"][0]["status"]); + print ""; + print "".$approvalStatus["indstatus"][0]["comment"].""; + $indUser = getUser($approvalStatus["indstatus"][0]["userID"]); + print "".$approvalStatus["indstatus"][0]["date"]." - ". $indUser->getFullname() .""; + print "
        \n"; + } +?> +
        + + + + +
        : +
        : +
        + + + + +
        +
        +"; + print "".getMLText("status").""; + print "".getMLText("comment").""; + print "".getMLText("last_update").""; + print ""; + print ""; + printApprovalStatusText($approvalStatus["grpstatus"][0]["status"]); + print ""; + print "".$approvalStatus["grpstatus"][0]["comment"].""; + $indUser = getUser($approvalStatus["grpstatus"][0]["userID"]); + print "".$approvalStatus["grpstatus"][0]["date"]." - ". $indUser->getFullname() .""; + print "
        \n"; + } + + $grpSelectBox = ""; + foreach ($approvalStatus["grpstatus"] as $grp) { + if ($grp["status"]!=-2) { + + $g=getGroup($grpStatus["required"]); + + if ($grp["status"] != -2) { + $grpSelectBox .= (strlen($grpSelectBox)==0 ? "": ""). + ""; + } + } + } + if (strlen($grpSelectBox)>0) { +?> +
        + + + + + + + + +
        : +
        : +
        : + +
        + + + +
        +
        + +

        + diff --git a/out/out.BackupTools.php b/out/out.BackupTools.php new file mode 100644 index 000000000..822463730 --- /dev/null +++ b/out/out.BackupTools.php @@ -0,0 +1,188 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("backup_tools")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("admin_tools"), "admin_tools"); + +// versioning file creation //////////////////////////////////////////////////// + +UI::contentHeading(getMLText("versioning_file_creation")); +UI::contentContainerStart(); +print "

        ".getMLText("versioning_file_creation_warning")."

        \n"; + +print "
        "; +UI::printFolderChooser("form1",M_READWRITE); +print ""; +print "
        \n"; + +UI::contentContainerEnd(); + +// archive creation //////////////////////////////////////////////////////////// + +UI::contentHeading(getMLText("archive_creation")); +UI::contentContainerStart(); +print "

        ".getMLText("archive_creation_warning")."

        \n"; + +print "
        "; +UI::printFolderChooser("form2",M_READWRITE); +print "".getMLText("human_readable"); +print ""; +print "
        \n"; + + +// list backup files +UI::contentSubHeading(getMLText("backup_list")); + +$print_header=true; + +$handle = opendir($settings->_contentDir); +$entries = array(); +while ($e = readdir($handle)){ + if (is_dir($settings->_contentDir.$e)) continue; + if (strpos($e,".tar.gz")==FALSE) continue; + $entries[] = $e; +} +closedir($handle); + +sort($entries); +$entries = array_reverse($entries); + +foreach ($entries as $entry){ + + if ($print_header){ + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $print_header=false; + } + + $folderid=substr($entry,strpos($entry,"_")+1); + $folder=getFolder((int)$folderid); + + print "\n"; + print "\n"; + if (is_object($folder)) print "\n"; + else print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; +} + +if ($print_header) printMLText("empty_notify_list"); +else print "
        ".getMLText("folder")."".getMLText("creation_date")."".getMLText("file_size")."
        ".$entry."".$folder->getName()."".getMLText("unknown_id")."".getLongReadableDate($entry)."".formatted_size(filesize($settings->_contentDir.$entry))."
        \n"; + +UI::contentContainerEnd(); + +// dump creation /////////////////////////////////////////////////////////////// + +UI::contentHeading(getMLText("dump_creation")); +UI::contentContainerStart(); +print "

        ".getMLText("dump_creation_warning")."

        \n"; + +print "
        "; +print ""; +print "
        \n"; + +// list backup files +UI::contentSubHeading(getMLText("dump_list")); + +$print_header=true; + +$handle = opendir($settings->_contentDir); +$entries = array(); +while ($e = readdir($handle)){ + if (is_dir($settings->_contentDir.$e)) continue; + if (strpos($e,".sql.gz")==FALSE) continue; + $entries[] = $e; +} +closedir($handle); + +sort($entries); +$entries = array_reverse($entries); + +foreach ($entries as $entry){ + + if ($print_header){ + print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $print_header=false; + } + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; +} + +if ($print_header) printMLText("empty_notify_list"); +else print "
        ".getMLText("creation_date")."".getMLText("file_size")."
        ".$entry."".getLongReadableDate($entry)."".formatted_size(filesize($settings->_contentDir.$entry))."
        \n"; + +UI::contentContainerEnd(); + +// files deletion ////////////////////////////////////////////////////////////// + +UI::contentHeading(getMLText("files_deletion")); +UI::contentContainerStart(); +print "

        ".getMLText("files_deletion_warning")."

        \n"; + +print "
        "; +UI::printFolderChooser("form3",M_READWRITE); +print ""; +print "
        \n"; + +UI::contentContainerEnd(); + +UI::htmlEndPage(); +?> diff --git a/out/out.Calendar.php b/out/out.Calendar.php new file mode 100644 index 000000000..d8c118172 --- /dev/null +++ b/out/out.Calendar.php @@ -0,0 +1,183 @@ + "; + print " "; + print " "; + + printYearTable($year); + UI::contentContainerEnd(); + +}else if ($mode=="m"){ + + if (!isset($dayNamesLong)) generateCalendarArrays(); + if (!isset($monthNames)) generateCalendarArrays(); + + UI::contentHeading(getMLText("month_view")." : ".$monthNames[$month-1]. " ".$year); + UI::contentContainerStart(); + + print " "; + print " "; + print " "; + + $days=getDaysInMonth($month, $year); + $today = getdate(time()); + + $events = getEventsInInterval(mktime(0,0,0, $month, 1, $year), mktime(23,59,59, $month, $days, $year)); + + echo "\n"; + + for ($i=1; $i<=$days; $i++){ + + // separate weeks + $date = getdate(mktime(12, 0, 0, $month, $i, $year)); + if (($date["wday"]==$settings->_firstDayOfWeek) && ($i!=1)) + echo "\n"; + + // highlight today + $class = ($year == $today["year"] && $month == $today["mon"] && $i == $today["mday"]) ? "todayHeader" : "header"; + + echo ""; + echo ""; + echo ""; + + if ($class=="todayHeader") $class="today"; + else $class=""; + + $xdate=mktime(0, 0, 0, $month, $i, $year); + foreach ($events as $event){ + if (($event["start"]<=$xdate)&&($event["stop"]>=$xdate)){ + + if (strlen($event['name']) > 25) $event['name'] = substr($event['name'], 0, 22) . "..."; + print ""; + }else{ + print ""; + } + } + + echo "\n"; + } + echo "
         
        ".$i."".$dayNamesLong[$date["wday"]]."".$event['name']." 
        \n"; + + UI::contentContainerEnd(); + +}else{ + + if (!isset($dayNamesLong)) generateCalendarArrays(); + if (!isset($monthNames)) generateCalendarArrays(); + + // get the week interval - TODO: $GET + $datestart=getdate(mktime(0,0,0,$month,$day,$year)); + while($datestart["wday"]!=$settings->_firstDayOfWeek){ + $datestart=getdate(mktime(0,0,0,$datestart["mon"],$datestart["mday"]-1,$datestart["year"])); + } + + $datestop=getdate(mktime(23,59,59,$month,$day,$year)); + if ($datestop["wday"]==$settings->_firstDayOfWeek){ + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]+1,$datestop["year"])); + } + while($datestop["wday"]!=$settings->_firstDayOfWeek){ + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]+1,$datestop["year"])); + } + $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]-1,$datestop["year"])); + + $starttime=mktime(0,0,0,$datestart["mon"],$datestart["mday"],$datestart["year"]); + $stoptime=mktime(23,59,59,$datestop["mon"],$datestop["mday"],$datestop["year"]); + + $today = getdate(time()); + $events = getEventsInInterval($starttime,$stoptime); + + UI::contentHeading(getMLText("week_view")." : ".getReadableDate(mktime(12, 0, 0, $month, $day, $year))); + UI::contentContainerStart(); + + print " "; + print " "; + print " "; + + echo "\n"; + + for ($i=$starttime; $i<$stoptime; $i += 86400){ + + $date = getdate($i); + + // highlight today + $class = ($date["year"] == $today["year"] && $date["mon"] == $today["mon"] && $date["mday"] == $today["mday"]) ? "todayHeader" : "header"; + + echo ""; + echo ""; + echo ""; + + if ($class=="todayHeader") $class="today"; + else $class=""; + + foreach ($events as $event){ + if (($event["start"]<=$i)&&($event["stop"]>=$i)){ + print ""; + }else{ + print ""; + } + } + + echo "\n"; + } + echo "
        ".getReadableDate($i)."".$dayNamesLong[$date["wday"]]."".$event['name']." 
        \n"; + + UI::contentContainerEnd(); +} + +UI::htmlEndPage(); +?> diff --git a/out/out.DefaultKeywords.php b/out/out.DefaultKeywords.php new file mode 100644 index 000000000..51c620119 --- /dev/null +++ b/out/out.DefaultKeywords.php @@ -0,0 +1,188 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("admin_tools")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("admin_tools"), "admin_tools"); + +$categories = getAllUserKeywordCategories($settings->_adminID); +?> + + + + + + + + + + + getOwner(); + if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue; + + print " + +
        : + +    + getID()."\" style=\"display : none;\">"; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
        + +
        : +
        + + +   + "> +
        +
        + +
        : + getKeywordLists(); + if (count($lists) == 0) + print getMLText("no_default_keywords"); + else + foreach ($lists as $list) { + ?> +
        + + "> + + "> + "> + + &action=removekeywords">" border="0"> +

        + +
        "> + + + +
        +
        + + + + + diff --git a/out/out.DocumentAccess.php b/out/out.DocumentAccess.php new file mode 100644 index 000000000..2cbd280a1 --- /dev/null +++ b/out/out.DocumentAccess.php @@ -0,0 +1,241 @@ +\n"; + print "\t\n"; + print "\t\n"; + print "\t\n"; + print "\t\n"; + print "\n"; +} + +if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); + +?> + + + +isAdmin()) { + + UI::contentSubHeading(getMLText("set_owner")); +?> +
        + + + : + "> +
        +inheritsAccess()) { + printMLText("inherits_access_msg", array( + "copyurl" => "../op/op.DocumentAccess.php?documentid=".$documentid."&action=notinherit&mode=copy", + "emptyurl" => "../op/op.DocumentAccess.php?documentid=".$documentid."&action=notinherit&mode=empty")); + UI::contentContainerEnd(); + UI::htmlEndPage(); + exit(); +} +printMLText("does_not_inherit_access_msg", array("inheriturl" => "../op/op.DocumentAccess.php?documentid=".$documentid."&action=inherit")); + +$accessList = $document->getAccessList(); + +UI::contentSubHeading(getMLText("default_access")); + +?> +
        + + + getDefaultAccess()); ?> + "> +
        + +"; + + foreach ($accessList["users"] as $userAccess) { + $userObj = $userAccess->getUser(); + print "
        \n"; + print "\n"; + print "\n"; + print "getID()."\">\n"; + print "\n"; + print "\n"; + print "". $userObj->getFullName() . "\n"; + print "\n"; + printAccessModeSelection($userAccess->getMode()); + print "\n"; + print "\n"; + print "".getMLText("save")." "; + print "getID()."\">".getMLText("delete"); + print "\n"; + print "
        \n"; + } + + foreach ($accessList["groups"] as $groupAccess) { + $groupObj = $groupAccess->getGroup(); + $mode = $groupAccess->getMode(); + print "
        "; + print ""; + print ""; + print "getID()."\">"; + print ""; + print ""; + print "". $groupObj->getName() . ""; + print ""; + printAccessModeSelection($groupAccess->getMode()); + print "\n"; + print "\n"; + print "".getMLText("save")." "; + print "getID()."\">".getMLText("delete"); + print ""; + print "
        "; + } + + print "
        "; +} +?> +
        + + + + + + + + + + + + + + + + + + +
        : + +
        : + +
        : + +
        ">
        +
        + + diff --git a/out/out.DocumentChooser.php b/out/out.DocumentChooser.php new file mode 100644 index 000000000..36e889b33 --- /dev/null +++ b/out/out.DocumentChooser.php @@ -0,0 +1,159 @@ +getSubFolders(), $user, M_READ); + $documents = filterAccess($folder->getDocuments(), $user, M_READ); + + if ($level+1 < count($path)) + $nextFolderID = $path[$level+1]->getID(); + else + $nextFolderID = -1; + + if ($level == 0) { + print "
          \n"; + } + print "
        • \n"; + print " 0) UI::printImgPath("minus.png"); + else UI::printImgPath("blank.png"); + print "\" border=0>\n"; + if ($folder->getAccessMode($user) >= M_READ) { + print "getID() . ", '" . sanitizeString($folder->getName()) . "')\">"; + print "".$folder->getName()."\n"; + } + else + print "".$folder->getName()."\n"; + print "
        • \n"; + + print "
            "; + + for ($i = 0; $i < count($subFolders); $i++) { + if ($subFolders[$i]->getID() == $nextFolderID) + printTree($path, $level+1); + else { + print "
          • \n"; + $subFolders_ = filterAccess($subFolders[$i]->getSubFolders(), $user, M_READ); + $documents_ = filterAccess($subFolders[$i]->getDocuments(), $user, M_READ); + + if (count($subFolders_) + count($documents_) > 0) + print "getID()."\">"; + else + print ""; + print "".$subFolders[$i]->getName()."\n"; + print "
          • "; + } + } + for ($i = 0; $i < count($documents); $i++) { + print "
          • \n"; + print ""; + print "getID().",'".sanitizeString($documents[$i]->getName())."');\">".$documents[$i]->getName().""; + print "
          • "; + } + + print "
          \n"; + if ($level == 0) { + print "
        \n"; + } + +} + +UI::htmlStartPage(getMLText("choose_target_document")); +UI::globalBanner(); +UI::pageNavigation(getMLText("choose_target_document")); +?> + + + +getPath()); + UI::contentContainerEnd(); +?> + + + + diff --git a/out/out.DocumentNotify.php b/out/out.DocumentNotify.php new file mode 100644 index 000000000..c2c176c70 --- /dev/null +++ b/out/out.DocumentNotify.php @@ -0,0 +1,164 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +$notifyList = $document->getNotifyList(); + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); + +?> + + +\n"; +if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) { + print "".getMLText("empty_notify_list").""; +} +else { + foreach ($notifyList["users"] as $userNotify) { + print ""; + print ""; + print "" . $userNotify->getFullName() . ""; + if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { + print "getID()."\">".getMLText("delete").""; + }else print ""; + print ""; + $userNotifyIDs[] = $userNotify->getID(); + } + foreach ($notifyList["groups"] as $groupNotify) { + print ""; + print ""; + print "" . $groupNotify->getName() . ""; + if ($user->isAdmin() || $groupNotify->isMember($user,true)) { + print "getID()."\">".getMLText("delete").""; + }else print ""; + print ""; + $groupNotifyIDs[] = $groupNotify->getID(); + } +} +print "\n"; + +?> +
        + +
        + + + + + + + + + + + + + + +
        : + +
        : + +
        ">
        +
        + + diff --git a/out/out.DocumentVersionDetail.php b/out/out.DocumentVersionDetail.php new file mode 100644 index 000000000..ba2c96e13 --- /dev/null +++ b/out/out.DocumentVersionDetail.php @@ -0,0 +1,278 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_GET["version"]; +$version = $document->getContentByVersion($version); + +if (!is_object($version)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// if version is last got out.ViewDocument +$latestContent = $document->getLatestContent(); +if ($latestContent->getVersion()==$version->getVersion()) { + header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +} + +$status = $version->getStatus(); +$reviewStatus = $version->getReviewStatus(); +$approvalStatus = $version->getApprovalStatus(); + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); +UI::contentHeading(getMLText("document_infos")); +UI::contentContainerStart(); + +?> + + + + + + + + + + + + + + + + + +isLocked()) { + $lockingUser = $document->getLockingUser(); +?> + + + + + + +
        : +getOwner(); +print "getEmail()."\">".$owner->getFullName().""; +?> +
        :getComment();?>
        :getDate()); ?>
        :getKeywords();?>
        : $lockingUser->getEmail(), "username" => $lockingUser->getFullName()));?>
        +_contentDir . $version->getPath()); + +UI::contentHeading(getMLText("details_version", array ("version" => $version->getVersion()))); +UI::contentContainerStart(); +print ""; +print "\n\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n\n\n"; +print "\n"; +print "\n"; +print "\n"; + +print "\n"; + +print ""; +print ""; +print ""; +print "\n
        ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
        ".$version->getVersion()."
          \n"; +print "
        • ".$version->getOriginalFileName()."
        • \n"; + +if ($file_exists) print "
        • ". formatted_size(filesize($settings->_contentDir . $version->getPath())) ." ".$version->getMimeType()."
        • "; +else print "
        • ".getMLText("document_deleted")."
        • "; + +$updatingUser = $version->getUser(); +print "
        • ".getMLText("uploaded_by")." getEmail()."\">".$updatingUser->getFullName()."
        • "; +print "
        • ".getLongReadableDate($version->getDate())."
        • "; +print "
        ".$version->getComment()."".getOverallStatusText($status["status"]).""; + +if (($document->getAccessMode($user) >= M_READWRITE)) { + print ""; +} +else { + print " "; +} + +echo "
        \n"; + + +print "\n"; + +if (is_array($reviewStatus) && count($reviewStatus)>0) { + + print "\n"; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + + foreach ($reviewStatus as $r) { + $required = null; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = $required->getFullName(); + } + break; + case 1: // Reviewer is a group. + $required = getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = $required->getName(); + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + } +} + +if (is_array($approvalStatus) && count($approvalStatus)>0) { + + print "\n"; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + + foreach ($approvalStatus as $a) { + $required = null; + switch ($a["type"]) { + case 0: // Approver is an individual. + $required = getUser($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = $required->getFullName(); + } + break; + case 1: // Approver is a group. + $required = getGroup($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = $required->getName(); + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + } +} + +print "
        \n"; + UI::contentSubHeading(getMLText("reviewers")); + print "
        ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
        ".$reqName."
        • ".$r["date"]."
        • "; + $updateUser = getUser($r["userID"]); + print "
        • ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$r["userID"]."'")."
        ".$r["comment"]."".getReviewStatusText($r["status"])."
        \n"; + UI::contentSubHeading(getMLText("approvers")); + print "
        ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
        ".$reqName."
        • ".$a["date"]."
        • "; + $updateUser = getUser($a["userID"]); + print "
        • ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$a["userID"]."'")."
        ".$a["comment"]."".getApprovalStatusText($a["status"])."
        \n"; + +UI::contentContainerEnd(); +UI::htmlEndPage(); +?> diff --git a/out/out.EditComment.php b/out/out.EditComment.php new file mode 100644 index 000000000..820d63bcc --- /dev/null +++ b/out/out.EditComment.php @@ -0,0 +1,98 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$versionid = $_GET["version"]; +$version = $document->getContentByVersion($versionid); + +if (!is_object($version)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); + +?> + + + +
        + + + + + + + + + + +
        :

        ">
        +
        + diff --git a/out/out.EditDocument.php b/out/out.EditDocument.php new file mode 100644 index 000000000..43e595da5 --- /dev/null +++ b/out/out.EditDocument.php @@ -0,0 +1,126 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); + +?> + + +getName()); +UI::contentContainerStart(); +?> +
        + + + + + + + + + + + + + + + getAccessMode($user) > M_READ) + { + print ""; + print ""; + print ""; + } + ?> + + + +
        :
        :
        : +
        + + +
        " . getMLText("sequence") . ":"; + UI::printSequenceChooser($folder->getDocuments(), $document->getID()); + print "

        ">
        +
        + diff --git a/out/out.EditEvent.php b/out/out.EditEvent.php new file mode 100644 index 000000000..8ad3cad1b --- /dev/null +++ b/out/out.EditEvent.php @@ -0,0 +1,105 @@ +getID()!=$event["userID"])&&(!$user->isAdmin())){ + UI::exitError(getMLText("edit_event"),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("calendar")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("calendar"), "calendar"); + +UI::contentHeading(getMLText("edit_event")); +UI::contentContainerStart(); +?> + + +
        + + "> + + + + + + + + + + + + + + + + + + + + + +
        :
        :
        :" size="60">
        :

        ">
        +
        + diff --git a/out/out.EditFolder.php b/out/out.EditFolder.php new file mode 100644 index 000000000..acd195a6d --- /dev/null +++ b/out/out.EditFolder.php @@ -0,0 +1,113 @@ + getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderid = $_GET["folderid"]; +$folder = getFolder($folderid); + +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +if ($folder->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("folder_title", array("foldername" => $folder->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($folderPathHTML, "view_folder", $folder); + +?> + + + + +
        + + + + + + + + + + + +getID() == $settings->_rootFolderID) ? false : $folder->getParent(); +if ($parent && $parent->getAccessMode($user) > M_READ) { + print ""; + print ""; + print "\n"; +} +?> + + + +
        :
        :
        " . getMLText("sequence") . ":"; + UI::printSequenceChooser($parent->getSubFolders(), $folder->getID()); + print "
        ">
        +
        + diff --git a/out/out.EditUserData.php b/out/out.EditUserData.php new file mode 100644 index 000000000..837b94d2d --- /dev/null +++ b/out/out.EditUserData.php @@ -0,0 +1,116 @@ + + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + +_enableUserImage){ +?> + + + + + + + + + + + + + +
        :
        :
        :
        :
        :
        : + hasImage()) + print "getImageURL()."\">"; + else printMLText("no_user_image"); + ?> +
        :
        ">
        +
        + + diff --git a/out/out.FolderAccess.php b/out/out.FolderAccess.php new file mode 100644 index 000000000..c0db89ac3 --- /dev/null +++ b/out/out.FolderAccess.php @@ -0,0 +1,241 @@ +\n"; + print "\t"). + ""; + } + + } + } + if (strlen($grpSelectBox)>0) { +?> +
        + + + + + + + + +
        : +
        : +
        : + +
        + + + +
        +
        + +

        + diff --git a/out/out.ReviewSummary.php b/out/out.ReviewSummary.php new file mode 100644 index 000000000..8a0018917 --- /dev/null +++ b/out/out.ReviewSummary.php @@ -0,0 +1,189 @@ +createTemporaryTable("ttstatid")) { + UI::exitError(getMLText("review_summary"),getMLText("internal_error_exit")); +} + +UI::htmlStartPage(getMLText("my_documents")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("my_documents"), "my_documents"); + +UI::contentHeading(getMLText("review_summary")); +UI::contentContainerStart(); + +// TODO: verificare scadenza + +// Get document list for the current user. +$reviewStatus = $user->getReviewStatus(); + +// reverse order +$reviewStatus["indstatus"]=array_reverse($reviewStatus["indstatus"],true); +$reviewStatus["grpstatus"]=array_reverse($reviewStatus["grpstatus"],true); + +// Create a comma separated list of all the documentIDs whose information is +// required. +$dList = array(); +foreach ($reviewStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } +} +foreach ($reviewStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } +} +$docCSV = ""; +foreach ($dList as $d) { + $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; +} + +if (strlen($docCSV)>0) { + + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentStatus` ". + "LEFT JOIN `tblDocumentStatusLog` USING (`statusID`) ". + "LEFT JOIN `ttstatid` on `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". + "ORDER BY `sequence`"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + UI::exitError(getMLText("review_summary"),getMLText("internal_error_exit")); + } + // Create an array to hold all of these results, and index the array by + // document id. This makes it easier to retrieve document ID information + // later on and saves us having to repeatedly poll the database every time + // new document information is required. + $docIdx = array(); + foreach ($resArr as $res) { + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + $docIdx[$res["id"]][$res["version"]] = $res; + } +} + +$printheader=true; +$iRev = array(); +foreach ($reviewStatus["indstatus"] as $st) { + if (isset($docIdx[$st["documentID"]][$st["version"]])) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + if ($st["status"]!=-2) { + $iRev[] = $st["documentID"]; + } +} +if (!$printheader) { + echo "\n
        ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
        ".$docIdx[$st["documentID"]][$st["version"]]["name"]."".$docIdx[$st["documentID"]][$st["version"]]["ownerName"]."".getOverallStatusText($docIdx[$st["documentID"]][$st["version"]]["status"])."".$st["version"]."".$st["date"]." ". $docIdx[$st["documentID"]][$st["version"]]["statusName"] ."".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."
        "; +}else{ + printMLText("empty_notify_list"); +} + +UI::contentContainerEnd(); +UI::contentHeading(getMLText("group_review_summary")); +UI::contentContainerStart(); + +$printheader=true; +foreach ($reviewStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $iRev) && isset($docIdx[$st["documentID"]][$st["version"]])) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } +} +if (!$printheader) { + echo "\n
        ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
        ".$docIdx[$st["documentID"]][$st["version"]]["name"]."".$docIdx[$st["documentID"]][$st["version"]]["ownerName"]."".getOverallStatusText($docIdx[$st["documentID"]][$st["version"]]["status"])."".$st["version"]."".$st["date"]." ". $docIdx[$st["documentID"]][$st["version"]]["statusName"] ."".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."
        "; +}else{ + printMLText("empty_notify_list"); +} + + +UI::contentContainerEnd(); +UI::htmlEndPage(); + +?> diff --git a/out/out.SearchForm.php b/out/out.SearchForm.php new file mode 100644 index 000000000..9d9603a16 --- /dev/null +++ b/out/out.SearchForm.php @@ -0,0 +1,172 @@ +_rootFolderID; + $folder = getFolder($folderid); +} +else { + $folderid = $_GET["folderid"]; + $folder = getFolder($folderid); +} +if (!is_object($folder)) { + UI::exitError(getMLText("search"),getMLText("invalid_folder_id")); +} + +$folderPathHTML = getFolderPathHTML($folder, true); + +UI::htmlStartPage(getMLText("search")); +UI::globalNavigation($folder); +UI::pageNavigation($folderPathHTML, "", $folder); + +?> + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + +\n\n"; +echo "\n\n"; +*/ +?> + + + + +
        : + + +
        :
          +
        • +
        • +
        • +
        +
        : +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        +
        : + +
        :
        : + + +
        ".getMLText("last_update").":"; +printMLText("between"); +print "  "; +UI::printDateChooser(-1, "updatestart"); +print "  "; +printMLText("and"); +print "  "; +UI::printDateChooser(-1, "updateend"); +echo "
        ">
        + +
        + + diff --git a/out/out.SetExpires.php b/out/out.SetExpires.php new file mode 100644 index 000000000..04192af00 --- /dev/null +++ b/out/out.SetExpires.php @@ -0,0 +1,81 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); +UI::contentHeading(getMLText("set_expiry")); +UI::contentContainerStart(); + +?> + +
        + + + + + + + +
        : + expires()?"":"checked") ?> >
        + expires()?"checked":"") ?> >expires()?$document->getExpires():-1), "exp");?> +
        + +

        +"> +

        + +
        + diff --git a/out/out.SetReviewersApprovers.php b/out/out.SetReviewersApprovers.php new file mode 100644 index 000000000..6db895917 --- /dev/null +++ b/out/out.SetReviewersApprovers.php @@ -0,0 +1,271 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"]<1)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_GET["version"]; +$content = $document->getContentByVersion($version); +$overallStatus = $content->getStatus(); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// control for document state +if ($overallStatus["status"]==S_REJECTED || $overallStatus["status"]==S_OBSOLETE ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_assign_invalid_state")); +} + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); +UI::contentHeading(getMLText("change_assignments")); + +// Retrieve a list of all users and groups that have review / approve privileges. +$docAccess = $document->getApproversList(); + +// Retrieve list of currently assigned reviewers and approvers, along with +// their latest status. +$reviewStatus = $content->getReviewStatus(); +$approvalStatus = $content->getApprovalStatus(); + +// Index the review results for easy cross-reference with the Approvers List. +$reviewIndex = array("i"=>array(), "g"=>array()); +foreach ($reviewStatus as $i=>$rs) { + if ($rs["type"]==0) { + $reviewIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $reviewIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } +} + +// Index the approval results for easy cross-reference with the Approvers List. +$approvalIndex = array("i"=>array(), "g"=>array()); +foreach ($approvalStatus as $i=>$rs) { + if ($rs["type"]==0) { + $approvalIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $approvalIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } +} +?> + + + +
        + + + +
        :
        +
        +
          +getMandatoryReviewers(); + +foreach ($docAccess["users"] as $usr) { + + $mandatory=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory){ + + print "
        • ". $usr->getFullName()." <".$usr->getEmail().">"; + print ""; + + }else if (isset($reviewIndex["i"][$usr->getID()])) { + + switch ($reviewIndex["i"][$usr->getID()]["status"]) { + case 0: + print "
        • ".$usr->getFullName(); + break; + case -2: + print "
        • ".$usr->getFullName(); + break; + default: + print "
        • ".$usr->getFullName(); + break; + } + } + else { + print "
        • ". $usr->getFullName(); + } +} +?> +
        +
        +
        :
        +
        +
          +getID()) $mandatory=true; + + if ($mandatory){ + + print "
        • ".$group->getName(); + print ""; + + }else if (isset($reviewIndex["g"][$group->getID()])) { + + switch ($reviewIndex["g"][$group->getID()]["status"]) { + case 0: + print "
        • ".$group->getName(); + break; + case -2: + print "
        • ".$group->getName(); + break; + default: + print "
        • ".$group->getName(); + break; + } + } + else { + print "
        • ".$group->getName(); + } +} +?> +
        +
        + + + +
        :
        +
        +
          +getMandatoryApprovers(); + +foreach ($docAccess["users"] as $usr) { + + $mandatory=false; + foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory){ + + print "
        • ". $usr->getFullName()." <".$usr->getEmail().">"; + print ""; + + }else if (isset($approvalIndex["i"][$usr->getID()])) { + + switch ($approvalIndex["i"][$usr->getID()]["status"]) { + case 0: + print "
        • ".$usr->getFullName(); + break; + case -2: + print "
        • ".$usr->getFullName(); + break; + default: + print "
        • ".$usr->getFullName(); + break; + } + } + else { + print "
        • ". $usr->getFullName(); + } +} +?> +
        +
        +
        :
        +
        +
          +getID()) $mandatory=true; + + if ($mandatory){ + + print "
        • ".$group->getName(); + print ""; + + }else if (isset($approvalIndex["g"][$group->getID()])) { + + switch ($approvalIndex["g"][$group->getID()]["status"]) { + case 0: + print "
        • ".$group->getName(); + break; + case -2: + print "
        • ".$group->getName(); + break; + default: + print "
        • ".$group->getName(); + break; + } + } + else { + print "
        • ".$group->getName(); + } +} +?> +
        +
        + +

        + + +"> +

        +
        + diff --git a/out/out.Statistic.php b/out/out.Statistic.php new file mode 100644 index 000000000..14d084778 --- /dev/null +++ b/out/out.Statistic.php @@ -0,0 +1,235 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("folders_and_documents_statistic")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("admin_tools"), "admin_tools"); + +?> + + + + +inheritsAccess() ? "black" : getAccessColor($folder->getDefaultAccess()); + + print "
      • "; + print "getID()."\">".$folder->getName() .""; + + $owner = $folder->getOwner(); + $color = getAccessColor(M_ALL); + print " [".$owner->getFullName()."] "; + + if (! $folder->inheritsAccess()) + printAccessList($folder); + + $subFolders = $folder->getSubFolders(); + $documents = $folder->getDocuments(); + + print "
          "; + + foreach ($subFolders as $sub) $folder_size += printFolder($sub); + foreach ($documents as $document){ + $doc_count++; + $folder_size += printDocument($document); + } + + print "
        "; + + print "".formatted_size($folder_size).", ".$doc_count." ".getMLText("documents")."\n"; + + print "
      • "; + + return $folder_size; +} + +function printDocument($document) +{ + global $document_count,$file_count,$settings,$storage_size; + + $document_count++; + + $local_file_count=0; + $folder_size=0; + + if (file_exists($settings->_contentDir.$document->getDir())){ + $handle = opendir($settings->_contentDir.$document->getDir()); + while ($entry = readdir($handle) ) + { + if (is_dir($settings->_contentDir.$document->getDir().$entry)) continue; + else{ + $local_file_count++; + $folder_size += filesize($settings->_contentDir.$document->getDir().$entry); + } + + } + closedir($handle); + } + $storage_size += $folder_size; + + $color = $document->inheritsAccess() ? "black" : getAccessColor($document->getDefaultAccess()); + print "
      • "; + print "getID()."\">".$document->getName().""; + + $owner = $document->getOwner(); + $color = getAccessColor(M_ALL); + print " [".$owner->getFullName()."] "; + + if (! $document->inheritsAccess()) printAccessList($document); + + print "".formatted_size($folder_size).", ".$local_file_count." ".getMLText("files")."\n"; + + print "
      • "; + + $file_count += $local_file_count; + return $folder_size; +} + +function printAccessList($obj) +{ + $accessList = $obj->getAccessList(); + if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0) + return; + + print " ("; + + for ($i = 0; $i < count($accessList["groups"]); $i++) + { + $group = $accessList["groups"][$i]->getGroup(); + $color = getAccessColor($accessList["groups"][$i]->getMode()); + print "".$group->getName().""; + if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0) + print ", "; + } + for ($i = 0; $i < count($accessList["users"]); $i++) + { + $user = $accessList["users"][$i]->getUser(); + $color = getAccessColor($accessList["users"][$i]->getMode()); + print "".$user->getFullName().""; + if ($i+1 < count($accessList["users"])) + print ", "; + } + print ")"; +} + +UI::contentHeading(getMLText("folders_and_documents_statistic")); +UI::contentContainerStart(); + +print ""; + +print ""; + +print "
        \n"; + +print "
          \n"; +print "
        • ".getMLText("access_inheritance")."
        • "; +print "
        • ".getMLText("access_mode_all")."
        • "; +print "
        • ".getMLText("access_mode_readwrite")."
        • "; +print "
        • ".getMLText("access_mode_read")."
        • "; +print "
        • ".getMLText("access_mode_none")."
        • "; +print "
        \n"; + +print "
        \n"; + +print "
          \n"; +printFolder(getFolder($settings->_rootFolderID)); +print "
        \n"; + +print "
        "; + +print "
          \n"; +print "
        • ".getMLText("folders").": ".$folder_count."
        • \n"; +print "
        • ".getMLText("documents").": ".$document_count."
        • \n"; +print "
        • ".getMLText("files").": ".$file_count."
        • \n"; +print "
        • ".getMLText("storage_size").": ".formatted_size($storage_size)."
        • \n"; +print "
        \n"; + +print "
        \n"; + +UI::contentContainerEnd(); +UI::htmlEndPage(); + +?> diff --git a/out/out.UpdateDocument.php b/out/out.UpdateDocument.php new file mode 100644 index 000000000..02fab184f --- /dev/null +++ b/out/out.UpdateDocument.php @@ -0,0 +1,229 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName().""; + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); + +?> + + + +getName()); +UI::contentContainerStart(); + +if ($document->isLocked()) { + + $lockingUser = $document->getLockingUser(); + + print "
        "; + + //print ""; + + printMLText("update_locked_msg", array("username" => $lockingUser->getFullName(), "email" => $lockingUser->getEmail())); + + if ($lockingUser->getID() == $user->getID()) + printMLText("unlock_cause_locking_user"); + else if ($document->getAccessMode($user) == M_ALL) + printMLText("unlock_cause_access_mode_all"); + else + { + printMLText("no_update_cause_locked"); + //print ""; + print "
        "; + UI::contentContainerEnd(); + UI::htmlEndPage(); + exit; + } + //print ""; + print "
        "; +} + +// Retrieve a list of all users and groups that have review / approve +// privileges. +$docAccess = $document->getApproversList(); +?> + +
        + + + + + + + + + + + + + + + + + + + + + + + +
        :
        : + +
        : + expires()) print " checked";?>>
        + expires()) print " checked";?>> +
        + + + +
        :
        +
        +
          +getMandatoryReviewers(); + + foreach ($docAccess["users"] as $usr) { + + if ($usr->getID()==$user->getID()) continue; + + $mandatory=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print "
        • ". $usr->getFullName(); + else print "
        • ". $usr->getFullName(); + } +?> +
        +
        +
        :
        +
        +
          +getID()) $mandatory=true; + + if ($mandatory) print "
        • ".$grp->getName(); + else print "
        • ".$grp->getName(); + } +?> +
        +
        + + + +
        :
        +
        +
          +getMandatoryApprovers(); + + foreach ($docAccess["users"] as $usr) { + + if ($usr->getID()==$user->getID()) continue; + + $mandatory=false; + foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true; + + if ($mandatory) print "
        • ". $usr->getFullName(); + else print "
        • ". $usr->getFullName(); + } +?> +
        +
        +
        :
        +
        +
          +getID()) $mandatory=true; + + if ($mandatory) print "
        • ".$grp->getName(); + else print "
        • ".$grp->getName(); + + } +?> +
        +
        +
        ">
        +
        + + diff --git a/out/out.UserDefaultKeywords.php b/out/out.UserDefaultKeywords.php new file mode 100644 index 000000000..ea28cb8fc --- /dev/null +++ b/out/out.UserDefaultKeywords.php @@ -0,0 +1,179 @@ +getID()); + +UI::htmlStartPage(getMLText("edit_default_keywords")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("my_account"), "my_account"); +?> + + + + + + + + + + +
        : + +    + + getOwner(); + if ($owner->getID() != $user->getID()) continue; + + print "getID()."\" style=\"display : none;\">"; + ?> + + + + + + + + + + + + + + + + + + + + "> + + + + +
        + +
        + +
        : +
        getID()?>"> + + + + "> +
        +
        + +
        : + getKeywordLists(); + if (count($lists) == 0) + print getMLText("no_default_keywords"); + else + foreach ($lists as $list) { + ?> +
        getID().".".$list["id"]?>"> + + "> + + "> + " border="0"> + + &action=removekeywords">" border=0> +
        +
        + +
        "> + + + +
        +
        + + + + + diff --git a/out/out.UserImage.php b/out/out.UserImage.php new file mode 100644 index 000000000..e7e010cdc --- /dev/null +++ b/out/out.UserImage.php @@ -0,0 +1,50 @@ +hasImage()) + die ("Kein Bild verfügbar"); + +$queryStr = "SELECT * FROM tblUserImages WHERE userID = " . $userid; +$resArr = $db->getResultArray($queryStr); +if (is_bool($resArr) && $resArr == false) + return false; + +$resArr = $resArr[0]; + +header("ContentType: " . $resArr["mimeType"]); + +print base64_decode($resArr["image"]); +exit; + +?> diff --git a/out/out.UserList.php b/out/out.UserList.php new file mode 100644 index 000000000..7eecd486d --- /dev/null +++ b/out/out.UserList.php @@ -0,0 +1,103 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("admin_tools")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("admin_tools"), "admin_tools"); +UI::contentHeading(getMLText("user_list")); +UI::contentContainerStart(); + +$users = getAllUsers(); +for ($i = 0; $i < count($users); $i++) { + $currUser = $users[$i]; + if ($currUser->getID() == $settings->_guestID) + continue; + + UI::contentSubHeading(getMLText("user") . ": \"" . $currUser->getFullName() . "\""); +?> + + + + + + + + + + + + + + + + + + + + + + + + + +
        :getLogin();?>
        :getFullName();?>
        :getEmail();?>
        :getComment();?>
        : + getGroups(); + if (count($groups) == 0) { + printMLText("no_groups"); + } + else { + for ($j = 0; $j < count($groups); $j++) { + print $groups[$j]->getName(); + if ($j +1 < count($groups)) + print ", "; + } + } + ?> +
        : + hasImage()) + print "getImageURL()."\">"; + else + printMLText("no_user_image"); + ?> +
        + diff --git a/out/out.UsrMgr.php b/out/out.UsrMgr.php new file mode 100644 index 000000000..3b51d9540 --- /dev/null +++ b/out/out.UsrMgr.php @@ -0,0 +1,411 @@ +isAdmin()) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +$users = getAllUsers(); + +if (is_bool($users)) { + UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); +} + +$groups = getAllGroups(); + +if (is_bool($groups)) { + UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); +} + + +UI::htmlStartPage(getMLText("admin_tools")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("admin_tools"), "admin_tools"); + +?> + + + + + + + + + + getID() == $settings->_adminID) || ($currUser->getID() == $settings->_guestID)) + continue; + + print " + +
        : + +   +getID()."\" style=\"display : none;\">"; + + UI::contentSubHeading(getMLText("user")." : ".$currUser->getLogin()); + ?> + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _enableUserImage){ ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
        :
        :
        :
        :
        :
        :
        :isAdmin() ? " checked='checked'" : "");?>>
        :isHidden() ? " checked='checked'" : "");?>>
        : + hasImage()) + print "getImageURL()."\">"; + else + printMLText("no_user_image"); + ?> +
        :
        : +
        :
        +
        +
          + getMandatoryReviewers(); + + foreach ($users as $usr) { + + if (($usr->getID() == $settings->_guestID) || ($usr->getID() == $currUser->getID())) + continue; + + $checked=false; + foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $checked=true; + + print "
        • ".$usr->getLogin()."
        • \n"; + } + ?> +
        +
        +
        :
        +
        +
          + getID()) $checked=true; + + print "
        • ".$grp->getName()."
        • \n"; + } + ?> +
        +
        +
        : +
        :
        +
        +
          + getMandatoryApprovers(); + + foreach ($users as $usr) { + + if (($usr->getID() == $settings->_guestID) || ($usr->getID() == $currUser->getID())) + continue; + + $checked=false; + foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $checked=true; + + print "
        • ".$usr->getLogin()."
        • \n"; + } + ?> +
        +
        +
        :
        +
        +
          + getID()) $checked=true; + + print "
        • ".$grp->getName()."
        • \n"; + } + ?> +
        +
        +
        ">
        +
        +
        + + + + + diff --git a/out/out.UsrView.php b/out/out.UsrView.php new file mode 100644 index 000000000..297b7c4d5 --- /dev/null +++ b/out/out.UsrView.php @@ -0,0 +1,86 @@ +_enableUsersView) { + UI::exitError(getMLText("my_account"),getMLText("access_denied")); +} + +$users = getAllUsers(); + +if (is_bool($users)) { + UI::exitError(getMLText("my_account"),getMLText("internal_error")); +} + +UI::htmlStartPage(getMLText("my_account")); +UI::globalNavigation(); +UI::pageNavigation(getMLText("my_account"), "my_account"); + +UI::contentHeading(getMLText("users")); +UI::contentContainerStart(); + +echo "\n"; +echo "\n\n"; +echo "\n"; +echo "\n"; +echo "\n"; +if ($settings->_enableUserImage) echo "\n"; +echo "\n\n"; + +foreach ($users as $currUser) { + + if (($currUser->getID() == $settings->_adminID) || ($currUser->getID() == $settings->_guestID)) + continue; + + if ($currUser->isHidden()=="1") continue; + + echo "\n"; + + print ""; + + print ""; + print ""; + + if ($settings->_enableUserImage){ + print ""; + } + + echo "\n"; +} + +echo "
        ".getMLText("name")."".getMLText("email")."".getMLText("comment")."".getMLText("user_image")."
        ".$currUser->getFullName()."getEmail()."\">".$currUser->getEmail()."".$currUser->getComment().""; + if ($currUser->hasImage()) print "getImageURL()."\">"; + else printMLText("no_user_image"); + print "
        \n"; + +UI::contentContainerEnd(); +UI::htmlEndPage(); +?> diff --git a/out/out.ViewDocument (copia).php b/out/out.ViewDocument (copia).php new file mode 100644 index 000000000..9ace53724 --- /dev/null +++ b/out/out.ViewDocument (copia).php @@ -0,0 +1,515 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName(); + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if ($document->verifyLastestContentExpriry()){ + header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +} + +$versions = $document->getContent(); +$latestContent = $document->getLatestContent(); +$status = $latestContent->getStatus(); +$reviewStatus = $latestContent->getReviewStatus(); +$approvalStatus = $latestContent->getApprovalStatus(); + +// verify if file exists +$file_exists=file_exists($settings->_contentDir . $latestContent->getPath()); + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); +UI::contentHeading(getMLText("document_infos")); +UI::contentContainerStart(); + +?> + +isLocked()) { + $lockingUser = $document->getLockingUser(); +?> + + + + + + + + + + + + + + + + + + + + + +
        : $lockingUser->getEmail(), "username" => $lockingUser->getFullName()));?>
        : +getOwner(); +print "getEmail()."\">".$owner->getFullName().""; +?> +
        :getComment();?>
        :getDate()); ?>
        :getKeywords();?>
        +"; +print "\n\n"; +print "\n"; +print "".getMLText("version")."\n"; +print "".getMLText("file")."\n"; +print "".getMLText("comment")."\n"; +print "".getMLText("status")."\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "".$latestContent->getVersion()."\n"; + +print "
          \n"; +print "
        • ".$latestContent->getOriginalFileName() ."
        • \n"; + +if ($file_exists) + print "
        • ". formatted_size(filesize($settings->_contentDir . $latestContent->getPath())) ." ".$latestContent->getMimeType()."
        • "; +else print "
        • ".$latestContent->getMimeType()." - ".getMLText("document_deleted")."
        • "; + +$updatingUser = $latestContent->getUser(); +print "
        • ".getMLText("uploaded_by")." getEmail()."\">".$updatingUser->getFullName()." - ".getLongReadableDate($latestContent->getDate())."
        • "; + +print "
        \n"; +print "".$latestContent->getComment().""; + +print "
        • ".getOverallStatusText($status["status"]); +if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_EXPIRED ){ + print "hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires()))."
        • "; +} +print ""; + +print ""; + +print "
            "; +if (($document->getAccessMode($user) >= M_READWRITE) && (count($versions) > 1)) { + print "
          • getVersion()."\">".getMLText("rm_version")."
          • "; +} +if ($document->getAccessMode($user) == M_ALL) { + if ( $status["status"]==S_RELEASED || $status["status"]==S_OBSOLETE ){ + print "
          • ".getMLText("change_status")."
          • "; + } + if ( $status["status"]==S_RELEASED || $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP ){ + print "
          • ".getMLText("change_assignments")."
          • "; + } + if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_EXPIRED ){ + print "
          • ".getMLText("set_expiry")."
          • "; + } +} +if ($document->getAccessMode($user) >= M_READWRITE) { + print "
          • getVersion()."\">".getMLText("edit_comment")."
          • "; +} + +print "
          • ".getMLText("versioning_info")."
          • "; + +// +// Display a link if the user is a reviewer or approver for this document. +// +$userRStat = $user->getReviewStatus($documentid, $latestContent->getVersion()); +$userAStat = $user->getApprovalStatus($documentid, $latestContent->getVersion()); +$is_reviewer = false; +$is_approver = false; + +if (!is_bool($userRStat)) { + if (count($userRStat["indstatus"])>0) { + if ($userRStat["indstatus"][0]["status"]==0) { + $is_reviewer = true; + } + } + else { + foreach ($userRStat["grpstatus"] as $grpstatus) { + if ($grpstatus["status"]==0) { + $is_reviewer = true; + break; + } + } + } +} +if (!is_bool($userAStat)) { + if (count($userAStat["indstatus"])>0) { + if ($userAStat["indstatus"][0]["status"]==0) { + $is_approver = true; + } + } + else { + foreach ($userAStat["grpstatus"] as $grpstatus) { + if ($grpstatus["status"]==0) { + $is_approver = true; + break; + } + } + } +} + +if ($is_reviewer && $status["status"]==S_DRAFT_REV) { + print "
          • getVersion()."\">".getMLText("submit_review")."
          • "; +} +else if ($is_approver && $status["status"]==S_DRAFT_APP) { + print "
          • getVersion()."\">".getMLText("submit_approval")."
          • "; +} + +print "
          "; +echo ""; +print "\n\n"; + +print "\n"; + +if (is_array($reviewStatus) && count($reviewStatus)>0) { + + UI::contentSubHeading(getMLText("reviewers")); + + //print "
          \n"; + print "\n\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($reviewStatus as $r) { + $required = null; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = $required->getFullName(); + } + break; + case 1: // Reviewer is a group. + $required = getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".$required->getName().""; + } + break; + } + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } + print "\n
          ".getMLText("name")."".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
          ".$reqName."".getReviewStatusText($r["status"])."".$r["comment"]."".$r["date"]; + $updateUser = getUser($r["userID"]); + print " - ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$r["userID"]."'"); + print "
          \n"; + print "\n"; +} + +if (is_array($approvalStatus) && count($approvalStatus)>0) { + + UI::contentSubHeading(getMLText("approvers")); + + //print "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($approvalStatus as $a) { + $required = null; + switch ($a["type"]) { + case 0: // Approver is an individual. + $required = getUser($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = $required->getFullName(); + } + break; + case 1: // Approver is a group. + $required = getGroup($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".$required->getName().""; + } + break; + } + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } + //print "\n
          ".getMLText("name")."".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
          ".$reqName."".getApprovalStatusText($a["status"])."".$a["comment"]."".$a["date"]; + $updateUser = getUser($a["userID"]); + print " - ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$a["userID"]."'"); + print "
          \n"; + print "\n"; +} + +print "\n"; + +UI::contentContainerEnd(); + +UI::contentHeading(getMLText("previous_versions")); +UI::contentContainerStart(); + +if (count($versions)>1) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + for ($i = count($versions)-2; $i >= 0; $i--) { + $version = $versions[$i]; + $vstat = $version->getStatus(); + $comment = $version->getComment(); + + // verify if file exists + $file_exists=file_exists($settings->_contentDir . $version->getPath()); + + print "\n"; + print "\n"; + print "\n"; + print ""; + print ""; + print "\n\n"; + } + print "\n
          ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
          ".$version->getVersion()."
            \n"; + print "
          • ".$version->getOriginalFileName()."
          • \n"; + if ($file_exists) print "
          • ". formatted_size(filesize($settings->_contentDir . $version->getPath())) ." ".$version->getMimeType()."
          • "; + else print "
          • ". $version->getMimeType()." - ".getMLText("document_deleted")."
          • "; + $updatingUser = $version->getUser(); + print "
          • ".getMLText("uploaded_by")." getEmail()."\">".$updatingUser->getFullName()." - ".getLongReadableDate($version->getDate())."
          • "; + print "
          \n"; + print "
          ".$version->getComment()."".getOverallStatusText($vstat["status"]).""; + print ""; + print "
          \n"; +} +else printMLText("empty_notify_list"); + +UI::contentContainerEnd(); + +UI::contentHeading(getMLText("linked_files")); +UI::contentContainerStart(); + +$files = $document->getDocumentFiles(); + +if (count($files) > 0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach($files as $file) { + + $file_exists=file_exists($settings->_contentDir . $file->getPath()); + + $responsibleUser = $file->getUser(); + + print ""; + print ""; + + print ""; + + print ""; + + print ""; + + print ""; + } + print "\n
          ".getMLText("name")."".getMLText("file")."".getMLText("comment")."
          ".$file->getName()."
            \n"; + print "
          • ".$file->getOriginalFileName() ."
          • \n"; + if ($file_exists) + print "
          • ". filesize($settings->_contentDir . $file->getPath()) ." bytes ".$file->getMimeType()."
          • "; + else print "
          • ".$file->getMimeType()." - ".getMLText("document_deleted")."
          • "; + + print "
          • ".getMLText("uploaded_by")." getEmail()."\">".$responsibleUser->getFullName()." - ".getLongReadableDate($file->getDate())."
          • "; + + print "
          ".$file->getComment().""; + if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID())) + print "getID()."\">".getMLText("delete").""; + print "
          \n"; + +} +else printMLText("empty_notify_list"); + +if ($document->getAccessMode($user) >= M_READWRITE) + print "\n"; + +UI::contentContainerEnd(); + + +UI::contentHeading(getMLText("linked_documents")); +UI::contentContainerStart(); +$links = $document->getDocumentLinks(); +$links = filterDocumentLinks($user, $links); + +if (count($links) > 0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach($links as $link) { + $responsibleUser = $link->getUser(); + $targetDoc = $link->getTarget(); + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + } + print "\n
          ".getMLText("name")."".getMLText("comment")."".getMLText("document_link_by")."".getMLText("document_link_public")."
          getID()."\" class=\"linklist\">".$targetDoc->getName()."".$targetDoc->getComment()."".$responsibleUser->getFullName()."" . (($link->isPublic()) ? getMLText("yes") : getMLText("no")) . ""; + if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) + print "getID()."\">".getMLText("delete").""; + print "
          \n"; +} +else printMLText("empty_notify_list"); + +if ($user->getID() != $settings->_guestID){ +?> +
          + + + + + + + getAccessMode($user) >= M_READWRITE) { + print ""; + print ""; + } + ?> + + + +
          :
          ".getMLText("document_link_public")."
            "; + print "
          • " . getMLText("yes")."
          • "; + print "
          • " . getMLText("no")."
          • "; + print "
          ">
          +
          + diff --git a/out/out.ViewDocument.php b/out/out.ViewDocument.php new file mode 100644 index 000000000..6f0ba57d3 --- /dev/null +++ b/out/out.ViewDocument.php @@ -0,0 +1,520 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); +$docPathHTML = getFolderPathHTML($folder, true). " / ".$document->getName(); + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if ($document->verifyLastestContentExpriry()){ + header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +} + +$versions = $document->getContent(); +$latestContent = $document->getLatestContent(); +$status = $latestContent->getStatus(); +$reviewStatus = $latestContent->getReviewStatus(); +$approvalStatus = $latestContent->getApprovalStatus(); + +// verify if file exists +$file_exists=file_exists($settings->_contentDir . $latestContent->getPath()); + +UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); +UI::globalNavigation($folder); +UI::pageNavigation($docPathHTML, "view_document"); +UI::contentHeading(getMLText("document_infos")); +UI::contentContainerStart(); + +?> + +isLocked()) { + $lockingUser = $document->getLockingUser(); +?> + + + + + + + + + + + + + + + + + + + + +
          $lockingUser->getEmail(), "username" => $lockingUser->getFullName()));?>
          : +getOwner(); +print "getEmail()."\">".$owner->getFullName().""; +?> +
          :getComment();?>
          :getDate()); ?>
          :getKeywords();?>
          +"; +print "\n\n"; +print "\n"; +print "".getMLText("version")."\n"; +print "".getMLText("file")."\n"; +print "".getMLText("comment")."\n"; +print "".getMLText("status")."\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "".$latestContent->getVersion()."\n"; + +print "
            \n"; +print "
          • ".$latestContent->getOriginalFileName() ."
          • \n"; + +if ($file_exists) + print "
          • ". formatted_size(filesize($settings->_contentDir . $latestContent->getPath())) ." ".$latestContent->getMimeType()."
          • "; +else print "
          • ".getMLText("document_deleted")."
          • "; + +$updatingUser = $latestContent->getUser(); +print "
          • ".getMLText("uploaded_by")." getEmail()."\">".$updatingUser->getFullName()."
          • "; +print "
          • ".getLongReadableDate($latestContent->getDate())."
          • "; + +print "
          \n"; +print "".$latestContent->getComment().""; + +print "".getOverallStatusText($status["status"]); +if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_EXPIRED ){ + print "
          hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires())).""; +} +print ""; + +print ""; + +print ""; +echo ""; +print "\n\n"; + +// +// retrieve if the user is a reviewer or approver for this document. +// +$userRStat = $user->getReviewStatus($documentid, $latestContent->getVersion()); +$userAStat = $user->getApprovalStatus($documentid, $latestContent->getVersion()); +$is_reviewer = false; +$is_approver = false; + +if (!is_bool($userRStat)) { + if (count($userRStat["indstatus"])>0) { + if ($userRStat["indstatus"][0]["status"]==0) { + $is_reviewer = true; + } + } + else { + foreach ($userRStat["grpstatus"] as $grpstatus) { + if ($grpstatus["status"]==0) { + $is_reviewer = true; + break; + } + } + } +} +if (!is_bool($userAStat)) { + if (count($userAStat["indstatus"])>0) { + if ($userAStat["indstatus"][0]["status"]==0) { + $is_approver = true; + } + } + else { + foreach ($userAStat["grpstatus"] as $grpstatus) { + if ($grpstatus["status"]==0) { + $is_approver = true; + break; + } + } + } +} + + +print "\n"; + +if (is_array($reviewStatus) && count($reviewStatus)>0) { + + print ""; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + + foreach ($reviewStatus as $r) { + $required = null; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = $required->getFullName(); + } + break; + case 1: // Reviewer is a group. + $required = getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".$required->getName().""; + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } +} + +if (is_array($approvalStatus) && count($approvalStatus)>0) { + + print ""; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + + foreach ($approvalStatus as $a) { + $required = null; + switch ($a["type"]) { + case 0: // Approver is an individual. + $required = getUser($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = $required->getFullName(); + } + break; + case 1: // Approver is a group. + $required = getGroup($a["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".$required->getName().""; + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } +} + +print "
          \n"; + UI::contentSubHeading(getMLText("reviewers")); + print "
          ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
          ".$reqName."
          • ".$r["date"]."
          • "; + $updateUser = getUser($r["userID"]); + print "
          • ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$r["userID"]."'")."
          ".$r["comment"]."".getReviewStatusText($r["status"])."
          \n"; + UI::contentSubHeading(getMLText("approvers")); + print "
          ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
          ".$reqName."
          • ".$a["date"]."
          • "; + $updateUser = getUser($a["userID"]); + print "
          • ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$a["userID"]."'")."
          ".$a["comment"]."".getApprovalStatusText($a["status"])."
          \n"; + +UI::contentContainerEnd(); + +UI::contentHeading(getMLText("previous_versions")); +UI::contentContainerStart(); + +if (count($versions)>1) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + for ($i = count($versions)-2; $i >= 0; $i--) { + $version = $versions[$i]; + $vstat = $version->getStatus(); + $comment = $version->getComment(); + + // verify if file exists + $file_exists=file_exists($settings->_contentDir . $version->getPath()); + + print "\n"; + print "\n"; + print "\n"; + print ""; + print ""; + print "\n\n"; + } + print "\n
          ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
          ".$version->getVersion()."
            \n"; + print "
          • ".$version->getOriginalFileName()."
          • \n"; + if ($file_exists) print "
          • ". formatted_size(filesize($settings->_contentDir . $version->getPath())) ." ".$version->getMimeType()."
          • "; + else print "
          • ".getMLText("document_deleted")."
          • "; + $updatingUser = $version->getUser(); + print "
          • ".getMLText("uploaded_by")." getEmail()."\">".$updatingUser->getFullName()."
          • "; + print "
          • ".getLongReadableDate($version->getDate())."
          • "; + print "
          \n"; + print "
          ".$version->getComment()."".getOverallStatusText($vstat["status"]).""; + print ""; + print "
          \n"; +} +else printMLText("empty_notify_list"); + +UI::contentContainerEnd(); + +UI::contentHeading(getMLText("linked_files")); +UI::contentContainerStart(); + +$files = $document->getDocumentFiles(); + +if (count($files) > 0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach($files as $file) { + + $file_exists=file_exists($settings->_contentDir . $file->getPath()); + + $responsibleUser = $file->getUser(); + + print ""; + print ""; + + print ""; + + print ""; + + print ""; + } + print "\n
          ".getMLText("file")."".getMLText("comment")."
            \n"; + print "
          • ".$file->getOriginalFileName() ."
          • \n"; + if ($file_exists) + print "
          • ". filesize($settings->_contentDir . $file->getPath()) ." bytes ".$file->getMimeType()."
          • "; + else print "
          • ".$file->getMimeType()." - ".getMLText("document_deleted")."
          • "; + + print "
          • ".getMLText("uploaded_by")." getEmail()."\">".$responsibleUser->getFullName()."
          • "; + print "
          • ".getLongReadableDate($file->getDate())."
          • "; + + print "
          ".$file->getComment().""; + if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID())) + print "getID()."\">".getMLText("delete").""; + print "
          \n"; + +} +else printMLText("empty_notify_list"); + +if ($document->getAccessMode($user) >= M_READWRITE){ + print "
          "; + print "\n"; +} +UI::contentContainerEnd(); + + +UI::contentHeading(getMLText("linked_documents")); +UI::contentContainerStart(); +$links = $document->getDocumentLinks(); +$links = filterDocumentLinks($user, $links); + +if (count($links) > 0) { + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach($links as $link) { + $responsibleUser = $link->getUser(); + $targetDoc = $link->getTarget(); + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + } + print "\n
          ".getMLText("comment")."".getMLText("document_link_by")."
          getID()."\" class=\"linklist\">".$targetDoc->getName()."".$targetDoc->getComment()."".$responsibleUser->getFullName(); + if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) + print "
          ".getMLText("document_link_public").":".(($link->isPublic()) ? getMLText("yes") : getMLText("no")); + print "
          "; + if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) + print "getID()."\">".getMLText("delete").""; + print "
          \n"; +} +else printMLText("empty_notify_list"); + +if ($user->getID() != $settings->_guestID){ +?> +
          +
          + + + + + + + getAccessMode($user) >= M_READWRITE) { + print ""; + print ""; + } + ?> + + + +
          :
          ".getMLText("document_link_public")."
            "; + print "
          • " . getMLText("yes")."
          • "; + print "
          • " . getMLText("no")."
          • "; + print "
          ">
          +
          + diff --git a/out/out.ViewEvent.php b/out/out.ViewEvent.php new file mode 100644 index 000000000..55fcff35e --- /dev/null +++ b/out/out.ViewEvent.php @@ -0,0 +1,105 @@ +"; + +echo ""; +echo "".getMLText("name").": "; +echo "".$event["name"].""; +echo ""; + +echo ""; +echo "".getMLText("comment").": "; +echo "".$event["comment"].""; +echo ""; + +echo ""; +echo "".getMLText("from").": "; +echo "".getReadableDate($event["start"]).""; +echo ""; + +echo ""; +echo "".getMLText("to").": "; +echo "".getReadableDate($event["stop"]).""; +echo ""; + +echo ""; +echo "".getMLText("last_update").": "; +echo "".getLongReadableDate($event["date"]).""; +echo ""; + +echo ""; +echo "".getMLText("user").": "; +echo "".(is_object($u)?$u->getFullName():getMLText("unknown_user")).""; +echo ""; + +echo ""; + +UI::contentContainerEnd(); + +if (($user->getID()==$event["userID"])||($user->isAdmin())){ + + UI::contentHeading(getMLText("edit")); + UI::contentContainerStart(); + + print ""; + + UI::contentContainerEnd(); +} + + + +UI::htmlEndPage(); +?> diff --git a/out/out.ViewFolder.php b/out/out.ViewFolder.php new file mode 100644 index 000000000..cece6ea36 --- /dev/null +++ b/out/out.ViewFolder.php @@ -0,0 +1,147 @@ +_rootFolderID; +} +else { + $folderid = $_GET["folderid"]; +} +$folder = getFolder($folderid); +if (!is_object($folder)) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); +} + +$showtree=showtree(); + +if (isset($_GET["orderby"]) && strlen($_GET["orderby"])==1 ) { + $orderby=$_GET["orderby"]; +}else $orderby=""; + +$folderPathHTML = getFolderPathHTML($folder); + +if ($folder->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("access_denied")); +} + +UI::htmlStartPage(getMLText("folder_title", array("foldername" => $folder->getName()))); + +UI::globalNavigation($folder); +UI::pageNavigation($folderPathHTML, "view_folder", $folder); + +if ($settings->_enableFolderTree) UI::printTreeNavigation($folderid,$showtree); + +UI::contentHeading(getMLText("folder_infos")); + +$owner = $folder->getOwner(); +UI::contentContainer("\n\n". + "\n". + "\n\n\n". + "\n". + "\n\n
          ".getMLText("owner").":getEmail()."\">".$owner->getFullName()."". + "
          ".getMLText("comment").":".$folder->getComment()."
          \n"); + +UI::contentHeading(getMLText("folder_contents")); +UI::contentContainerStart(); + +$subFolders = $folder->getSubFolders($orderby); +$subFolders = filterAccess($subFolders, $user, M_READ); +$documents = $folder->getDocuments($orderby); +$documents = filterAccess($documents, $user, M_READ); + +if ((count($subFolders) > 0)||(count($documents) > 0)){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; +} +else printMLText("empty_notify_list"); + + +foreach($subFolders as $subFolder) { + + $owner = $subFolder->getOwner(); + $comment = $subFolder->getComment(); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + $subsub = $subFolder->getSubFolders(); + $subsub = filterAccess($subsub, $user, M_READ); + $subdoc = $subFolder->getDocuments(); + $subdoc = filterAccess($subdoc, $user, M_READ); + + print ""; + print ""; + print "\n"; + print ""; + print ""; + print ""; + print "\n"; +} + +foreach($documents as $document) { + + $owner = $document->getOwner(); + $comment = $document->getComment(); + if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; + $docID = $document->getID(); + $latestContent = $document->getLatestContent(); + $version = $latestContent->getVersion(); + $status = $latestContent->getStatus(); + + print ""; + + if (file_exists($settings->_contentDir . $latestContent->getPath())) + print ""; + else print ""; + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; +} + +if ((count($subFolders) > 0)||(count($documents) > 0)) echo "\n
          ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."
          getID()."&showtree=".$showtree."\">" . $subFolder->getName() . "".$owner->getFullName()."".count($subsub)." ".getMLText("folders").", ".count($subdoc)." ".getMLText("documents")."".$comment."
          getFileType())."\" title=\"".$latestContent->getMimeType()."\">getFileType())."\" title=\"".$latestContent->getMimeType()."\">" . $document->getName() . "".$owner->getFullName()."".getOverallStatusText($status["status"])."".$version."".$comment."
          \n"; + +UI::contentContainerEnd(); + +if ($settings->_enableFolderTree) print ""; + +UI::htmlEndPage(); +?> diff --git a/out/styles.css b/out/styles.css new file mode 100644 index 000000000..0692e2bcf --- /dev/null +++ b/out/styles.css @@ -0,0 +1,152 @@ +/* a { text-decoration: none; } + a:hover { text-decoration: underline; } + + .titlebar { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 12pt; + color : White; + font-weight: bold; + } + + .header1 { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 11pt; + font-style : italic; + color : #000080; + } + + .foldertree { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .foldertree_selectable { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: blue; + } + + .foldertree_inpath { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + font-style: italic; + } + + .foldertree_active { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 9pt; + color: black; + font-weight: bold; + } + + .path { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .editfolder { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .editdocument { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .infos { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .filelist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .subfolderlist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .linklist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .boxHeader { + color : White; + font-style : italic; + font-size : 11pt; + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + } + + .pageHeader { + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 13pt; + font-weight: bold; + color: #000080; + } + + .inputDescription { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + font-style: italic; + } + + .notifylist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .inheritAccess + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .accessList + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .defaultAccess + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .msgLocked + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .standardText + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .groupMembers + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black;*/ diff --git a/reset_db.sql b/reset_db.sql new file mode 100644 index 000000000..fc1b3e639 --- /dev/null +++ b/reset_db.sql @@ -0,0 +1,432 @@ +-- +-- Table structure for table `tblACLs` +-- + +DROP TABLE `tblACLs` ; +CREATE TABLE `tblACLs` ( + `id` int(11) NOT NULL auto_increment, + `target` int(11) NOT NULL default '0', + `targetType` tinyint(4) NOT NULL default '0', + `userID` int(11) NOT NULL default '-1', + `groupID` int(11) NOT NULL default '-1', + `mode` tinyint(4) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentApproveLog` +-- + +DROP TABLE `tblDocumentApproveLog` ; +CREATE TABLE `tblDocumentApproveLog` ( + `approveLogID` int(11) NOT NULL auto_increment, + `approveID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`approveLogID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentApprovers` +-- + +DROP TABLE `tblDocumentApprovers` ; +CREATE TABLE `tblDocumentApprovers` ( + `approveID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `type` tinyint(4) NOT NULL default '0', + `required` int(11) NOT NULL default '0', + PRIMARY KEY (`approveID`), + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentContent` +-- + +DROP TABLE `tblDocumentContent` ; +CREATE TABLE `tblDocumentContent` ( + `document` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL auto_increment, + `comment` text, + `date` int(12) default NULL, + `createdBy` int(11) default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(70) NOT NULL default '', + PRIMARY KEY (`document`,`version`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentLinks` +-- + +DROP TABLE `tblDocumentLinks` ; +CREATE TABLE `tblDocumentLinks` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) NOT NULL default '0', + `target` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `public` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentFiles` +-- + +DROP TABLE `tblDocumentFiles` ; +CREATE TABLE `tblDocumentFiles` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `comment` text, + `name` varchar(150) default NULL, + `date` int(12) default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(70) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentLocks` +-- + +DROP TABLE `tblDocumentLocks` ; +CREATE TABLE `tblDocumentLocks` ( + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`document`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentReviewLog` +-- + +DROP TABLE `tblDocumentReviewLog` ; +CREATE TABLE `tblDocumentReviewLog` ( + `reviewLogID` int(11) NOT NULL auto_increment, + `reviewID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`reviewLogID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentReviewers` +-- + +DROP TABLE `tblDocumentReviewers` ; +CREATE TABLE `tblDocumentReviewers` ( + `reviewID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `type` tinyint(4) NOT NULL default '0', + `required` int(11) NOT NULL default '0', + PRIMARY KEY (`reviewID`), + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentStatus` +-- + +DROP TABLE `tblDocumentStatus` ; +CREATE TABLE `tblDocumentStatus` ( + `statusID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`statusID`), + UNIQUE KEY `documentID` (`documentID`,`version`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentStatusLog` +-- + +DROP TABLE `tblDocumentStatusLog` ; +CREATE TABLE `tblDocumentStatusLog` ( + `statusLogID` int(11) NOT NULL auto_increment, + `statusID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`statusLogID`), + KEY `statusID` (`statusID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocuments` +-- + +DROP TABLE `tblDocuments` ; +CREATE TABLE `tblDocuments` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(150) default NULL, + `comment` text, + `date` int(12) default NULL, + `expires` int(12) default NULL, + `owner` int(11) default NULL, + `folder` int(11) default NULL, + `folderList` text NOT NULL, + `inheritAccess` tinyint(1) NOT NULL default '1', + `defaultAccess` tinyint(4) NOT NULL default '0', + `locked` int(11) NOT NULL default '-1', + `keywords` text NOT NULL, + `sequence` double NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblFolders` +-- + +DROP TABLE `tblFolders` ; +CREATE TABLE `tblFolders` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(70) default NULL, + `parent` int(11) default NULL, + `comment` text, + `owner` int(11) default NULL, + `inheritAccess` tinyint(1) NOT NULL default '1', + `defaultAccess` tinyint(4) NOT NULL default '0', + `sequence` double NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `parent` (`parent`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblGroupMembers` +-- + +DROP TABLE `tblGroupMembers` ; +CREATE TABLE `tblGroupMembers` ( + `groupID` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `manager` smallint(1) NOT NULL default '0', + PRIMARY KEY (`groupID`,`userID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblGroups` +-- + +DROP TABLE `tblGroups` ; +CREATE TABLE `tblGroups` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(50) default NULL, + `comment` text NOT NULL, + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblKeywordCategories` +-- + +DROP TABLE `tblKeywordCategories` ; +CREATE TABLE `tblKeywordCategories` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(255) NOT NULL default '', + `owner` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblKeywords` +-- + +DROP TABLE `tblKeywords` ; +CREATE TABLE `tblKeywords` ( + `id` int(11) NOT NULL auto_increment, + `category` int(11) NOT NULL default '0', + `keywords` text NOT NULL, + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblNotify` +-- + +DROP TABLE `tblNotify` ; +CREATE TABLE `tblNotify` ( + `target` int(11) NOT NULL default '0', + `targetType` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '-1', + `groupID` int(11) NOT NULL default '-1', + PRIMARY KEY (`target`,`targetType`,`userID`,`groupID`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblSessions` +-- + +DROP TABLE `tblSessions` ; +CREATE TABLE `tblSessions` ( + `id` varchar(50) NOT NULL default '', + `userID` int(11) NOT NULL default '0', + `lastAccess` int(11) NOT NULL default '0', + `theme` varchar(30) NOT NULL default '', + `language` varchar(30) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblUserImages` +-- + +DROP TABLE `tblUserImages` ; +CREATE TABLE `tblUserImages` ( + `id` int(11) NOT NULL auto_increment, + `userID` int(11) NOT NULL default '0', + `image` blob NOT NULL, + `mimeType` varchar(10) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblUsers` +-- + +DROP TABLE `tblUsers` ; +CREATE TABLE `tblUsers` ( + `id` int(11) NOT NULL auto_increment, + `login` varchar(50) default NULL, + `pwd` varchar(50) default NULL, + `fullName` varchar(100) default NULL, + `email` varchar(70) default NULL, + `language` varchar(32) NOT NULL, + `theme` varchar(32) NOT NULL, + `comment` text NOT NULL, + `isAdmin` smallint(1) NOT NULL default '0', + `hidden` smallint(1) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- dirID is the current target content subdirectory. The last file loaded +-- into MyDMS will be physically stored here. Is updated every time a new +-- file is uploaded. +-- +-- dirPath is a essentially a foreign key from tblPathList, referencing the +-- parent directory path for dirID, relative to MyDMS's _contentDir. +-- + +DROP TABLE `tblDirPath` ; +CREATE TABLE `tblDirPath` ( + `dirID` int(11) NOT NULL auto_increment, + `dirPath` varchar(255) NOT NULL, + PRIMARY KEY (`dirPath`,`dirID`) +) ; + +-- -------------------------------------------------------- + +DROP TABLE `tblPathList` ; +CREATE TABLE `tblPathList` ( + `id` int(11) NOT NULL auto_increment, + `parentPath` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for mandatory reviewers +-- + +DROP TABLE `tblMandatoryReviewers` ; +CREATE TABLE `tblMandatoryReviewers` ( + `userID` int(11) NOT NULL default '0', + `reviewerUserID` int(11) NOT NULL default '0', + `reviewerGroupID` int(11) NOT NULL default '0', + PRIMARY KEY (`userID`,`reviewerUserID`,`reviewerGroupID`) +) ; + +-- +-- Table structure for mandatory approvers +-- + +DROP TABLE `tblMandatoryApprovers` ; +CREATE TABLE `tblMandatoryApprovers` ( + `userID` int(11) NOT NULL default '0', + `approverUserID` int(11) NOT NULL default '0', + `approverGroupID` int(11) NOT NULL default '0', + PRIMARY KEY (`userID`,`approverUserID`,`approverGroupID`) +) ; + +-- +-- Table structure for events (calendar) +-- + +DROP TABLE `tblEvents` ; +CREATE TABLE `tblEvents` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(150) default NULL, + `comment` text, + `start` int(12) default NULL, + `stop` int(12) default NULL, + `date` int(12) default NULL, + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`id`) +) ; + + +-- +-- Initial content for database +-- + +INSERT INTO tblFolders VALUES (1, 'DMS', 0, 'DMS root', 1, 0, 2, 0); +INSERT INTO tblUsers VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'address@server.com', '', '', '', 1, 0); +INSERT INTO tblUsers VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', 0, 0); diff --git a/runNotifyMailer.bat b/runNotifyMailer.bat new file mode 100644 index 000000000..8cd89fff1 --- /dev/null +++ b/runNotifyMailer.bat @@ -0,0 +1,2 @@ +cd E:\web\php\dms\app\op + diff --git a/styles/blue/favicon.ico b/styles/blue/favicon.ico new file mode 100644 index 000000000..de626d5de Binary files /dev/null and b/styles/blue/favicon.ico differ diff --git a/styles/blue/img/bg-global-tl.png b/styles/blue/img/bg-global-tl.png new file mode 100644 index 000000000..99c68e0d7 Binary files /dev/null and b/styles/blue/img/bg-global-tl.png differ diff --git a/styles/blue/img/bg-global-tr.png b/styles/blue/img/bg-global-tr.png new file mode 100644 index 000000000..82613fbed Binary files /dev/null and b/styles/blue/img/bg-global-tr.png differ diff --git a/styles/blue/img/bg-global.png b/styles/blue/img/bg-global.png new file mode 100644 index 000000000..dc7ebd41f Binary files /dev/null and b/styles/blue/img/bg-global.png differ diff --git a/styles/blue/img/blue-gradient-48px.png b/styles/blue/img/blue-gradient-48px.png new file mode 100644 index 000000000..f15e66937 Binary files /dev/null and b/styles/blue/img/blue-gradient-48px.png differ diff --git a/styles/blue/img/blue-gradient.png b/styles/blue/img/blue-gradient.png new file mode 100644 index 000000000..bb1dfd82a Binary files /dev/null and b/styles/blue/img/blue-gradient.png differ diff --git a/styles/blue/img/content-bl.png b/styles/blue/img/content-bl.png new file mode 100644 index 000000000..369b26081 Binary files /dev/null and b/styles/blue/img/content-bl.png differ diff --git a/styles/blue/img/content-br.png b/styles/blue/img/content-br.png new file mode 100644 index 000000000..60c3603e7 Binary files /dev/null and b/styles/blue/img/content-br.png differ diff --git a/styles/blue/img/content-gradient.png b/styles/blue/img/content-gradient.png new file mode 100644 index 000000000..e3122e182 Binary files /dev/null and b/styles/blue/img/content-gradient.png differ diff --git a/styles/blue/img/edge.png b/styles/blue/img/edge.png new file mode 100644 index 000000000..b1a4b9389 Binary files /dev/null and b/styles/blue/img/edge.png differ diff --git a/styles/blue/img/small-blue-gradient.png b/styles/blue/img/small-blue-gradient.png new file mode 100644 index 000000000..b91f3eef7 Binary files /dev/null and b/styles/blue/img/small-blue-gradient.png differ diff --git a/styles/blue/img/small-grey-gradient.png b/styles/blue/img/small-grey-gradient.png new file mode 100644 index 000000000..38194f416 Binary files /dev/null and b/styles/blue/img/small-grey-gradient.png differ diff --git a/styles/blue/style.css b/styles/blue/style.css new file mode 100644 index 000000000..b13c7f0a0 --- /dev/null +++ b/styles/blue/style.css @@ -0,0 +1,512 @@ +/* Copyright (C) 2006-2008 Malcolm Cowe +*/ +body { + font-size: 76%; + font-family: sans-serif; +} +body.login { + width: 50%; + margin-left: auto; + margin-right: auto; +} +.headingContainer { + background: #35566c url(img/blue-gradient.png) repeat-x bottom; + border: 1px solid rgb(53,85,107); + position: relative; +} +/* IE6 Hack */ +* html .headingContainer { + position: relative; +} +.localNavContainer { + padding: 2px; + margin-bottom: 0.4em; + background: #35566c; + border: 1px solid rgb(53,85,107); + position: relative; +} +a:link { + color: rgb(231,111,0); + text-decoration: none; +} +a:visited { + color: rgb(231,111,0); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a:active { + color: rgb(231,111,0); + text-decoration: none; +} +.headingContainer a:link { + color: white; +} +.headingContainer a:visited { + color: white; +} +.localNavContainer a:link { + color: white; +} +.localNavContainer a:visited { + color: white; +} +.contentHeading a:link { + color: white; +} +.contentHeading a:visited { + color: white; +} +.localNav a:link { + text-decoration: none; +} +.localNav a:visited { + text-decoration: none; +} +.localNav a:hover { + text-decoration: underline; +} +.globalNav a:link { + color: rgb(192,102,0); + text-decoration: none; +} +.globalNav a:visited { + color: rgb(192,102,0); + text-decoration: none; +} +.globalNav a:hover { + color: rgb(192,102,0); + text-decoration: underline; +} +.globalNav a:active { + color: rgb(192,102,0); +} +.mainHeading { + padding: 2px 4px 0px 4px; + font-size: 1.5em; + font-weight: bold; + color: white; + position: absolute; + bottom: 0px; +} +/* IE6 Hack */ +* html .mainHeading { + position: relative; +} +.contentHeading { + background: #35566c url(img/blue-gradient.png) repeat-x bottom; + color: white; + padding: 2px 4px 2px 4px; + margin-top: 10px; + font-size: 1.2em; + font-weight: bold; +} +.contentSubHeading { + font-weight: bold; + border-bottom: 1px solid; + margin-top: 1em; + margin-bottom: 2px; +} +.contentSubHeading#first { + margin-top: 0; + margin-bottom: 2px; +} + +#logo { + float:left; + margin-right: 5px; +} + +.siteName { + background: url(img/bg-global-tl.png) no-repeat top left; + padding: 2px 4px 2px 4px; + font-size: 1.6em; + font-weight: bold; + /*width: 40%; */ +} + +.siteNameLogin { + background: url(img/bg-global-tl.png) no-repeat top left; + padding: 2px 4px 0px 4px; + font-size: 3em; + font-weight: bold; + font-style: italic; + color: #fff; +} +.globalBox { + background: url(img/bg-global.png) repeat-x top left; + position: relative; + height: 4em; +} + +/* IE6 Hack */ +* html .globalBox { + position: relative; +} + +.globalBox#noNav { + height: 4em; +} +.globalBox div#signatory { + padding-left: 55px; + position: absolute; + bottom: 1px; +} + +/* IE6 Hack */ +* html .globalBox div#signatory { + position: relative; +} + +.globalNav { + padding: 4px; + list-style-type: none; + margin: 0px; + text-align: right; + float:right; +} + +/* IE6 Hack */ +* html .globalNav { + position: relative; +} + +.globalNav li { + display: inline; + padding: 0px 4px 0px 4px; + border-left: 1px solid; + } +.globalNav li#first { + border-left: none; + padding: 0px 4px 0px 0px; +} +.globalNav li form { + display: inline; +} +.globalNav li input { + font-size: 0.8em; + border: 1px solid; + padding: 1px; +} +.globalNav li input#searchButton { + border-left:0; + padding: 0px; +} +.localNav { + padding:1px; + margin: 0px; + text-align: center; + list-style-type: none; + text-align:left; + color: white; + text-transform: uppercase; +} +.localNav li { + display: inline; + padding: 0px 4px 0px 4px; + border-left: 1px solid; +} +.localNav li#first { + border-left: none; +} +.globalTR { + background: url(img/bg-global-tr.png) no-repeat top right; + float: right; + width: 8px; + height: 8px; +} +.smallText { + font-size: 0.8em; +} +.contentContainer { + padding: 0px; + width: 100%; + margin: auto; +} +.content { + background: url(img/content-gradient.png) repeat-x bottom left; + background-color: white; + margin-top: 0.2em; + padding: 0; + border-top: 1px solid #e0e0e0; +} +.content-l { + background: url(img/edge.png) repeat-y bottom left; +} +.content-r { + background: url(img/edge.png) repeat-y bottom right; +} +.content-br { + background: url(img/content-br.png) no-repeat bottom right; +} +.content-bl { + background: url(img/content-bl.png) no-repeat bottom left; + padding: 0.6em 1em; +} +.content input, .content select { + font-size: 0.8em; + border: 1px solid; +} +.content textarea { + border: 1px solid; + font-family: sans-serif; + font-size: 1.0em; +} +td { + vertical-align: top; +} +table.folderView { + border-collapse: collapse; + width: 100%; +} +table.folderView thead tr { + border-bottom: 1px solid rgb(189, 190, 192); +} +table.folderView th, table.folderView td { + padding: 0.1em 0.4em; +} +table.folderView th { + text-align: left; +} +table.folderView td { + border-bottom: 1px solid rgb(224, 224, 224); +} +table.folderView td.center { + text-align: center; +} +table.folderView tr.folder { + border-bottom: 1px solid rgb(224, 224, 224); + background: rgb(240, 240, 240); +} +table.defaultView { + border-collapse: collapse; +} +table.defaultView thead tr { + border-bottom: 1px solid rgb(189, 190, 192); +} +table.defaultView th, table.defaultView td { + padding: 0.1em 0.4em; +} +table.defaultView th { + text-align: left; +} +table.defaultView td { + border-bottom: 1px solid rgb(224, 224, 224); +} +table.defaultView td.center { + text-align: center; +} +table.defaultView tr.folder { + border-bottom: 1px solid rgb(224, 224, 224); + background: rgb(240, 240, 240); +} +td#userImage { + border: 1px solid rgb(189, 190, 192); +} +img.userImage { + height: 72px; +} +img.mimeicon { + height: 18px; + vertical-align: middle; + border: none; +} +img.treeicon { + border: none; + padding-right: 0.1em; +} +input.mimeicon { + height: 18px; + vertical-align: middle; + border: none; +} +ul.reviewer { + padding: 0; + margin: 0; +} +ul.reviewer li { + list-style: none; + padding: 0.1em 0em; + border-top: 1px solid rgb(163, 184, 203); +} +ul.reviewer li.first { + border-top: none; +} +ul.actions { + padding: 0; + margin: 0; +} +ul.actions li { + list-style: none; + padding: 0 0 0.1em 0; +} +ul.actions li.first { + border-top: none; +} +dl.documentDetail { + margin: 0; +} +dl.documentDetail dt { + font-weight: bold; +} +.cbSelectTitle { + float:left; + width: 6em; +} +.cbSelectContainer { + overflow:auto; + height: 8em; + border: 1px solid; + padding: 0.2em 0; + margin: 0.2em 0; +} +.cbSelectContainer.empty { + height: 1em; +} +.cbSelectList { + padding: 0.1em; +} +.cbSelectItem { + list-style-type: none; +} +div.pageList{ + border: 1px solid #ddd; + padding: 3px; + margin-top: 15px; + margin-bottom: 15px; +} +div.pageList span.selected{ + font-weight: bold; + color: #fff; + background-color: #35566c; + padding: 1px; +} +/* + * I rather foolishly decided to have the title of the page exist at the + * bottom of the containing DIV element. This means using absolute + * positioning in order to get the desired effect in a way that is consistent. + * However, this causes problems when the fonts are scaled as overlap can + * occur with other elements, leading to unclean layout (since absolute + * positioning removes the element from the document flow). My solution is to + * place an empty element in the page directly before the title that remains + * in the document flow. This fakes a margin around the title. + * I've also applied this to the login form in the global navigation section. + */ +span.absSpacerNorm { + display: block; + height: 1.4em; + line-height: 14px; + font-size: 1.2em; +} + +span.absSpacerTitle { + display: block; + min-height: 1.8em; + font-size: 1.5em; + padding-top: 0.2em; + visibility: hidden; +} + +.disclaimer { + margin-top: 1em; + padding: 3px; + text-align: center; + border: 1px solid #000; +} + +.footNote { + text-align: center; + margin-top: 1em; +} +.legend{ + list-style: none; + border: 1px solid black; + padding: 5px; +} + +/* these are used in help only */ + +h1{ + font-size: 140%; + font-weight: bold; + background: #35566c; + color: #fff; +} + +h2{ + font-size: 110%; + font-weight: bold; + border-bottom: 1px solid #999; +} +/* these are used in calendar */ + +table.calendaryear td.today{ + border: 1px solid #000; + font-weight: bold; +} + +table.calendaryear td.header{ + font-weight: bold; +} + +table.calendaryear td{ + border: 1px solid #000; + padding : 10px; +} + +table.calendaryear table td{ + border: 0; + padding : 1px; +} + +table.calendarmonth , table.calendarweek { + margin-top: 1em; +} + +table.calendarmonth td, table.calendarweek td{ + border-bottom: 1px solid #ddd; + padding-left: 1em; + padding-right: 1em; +} + +table.calendarmonth td.separator, table.calendarweek td.separator{ + border: 0; + padding: 0; + margin:0; +} + +table.calendarmonth td.header, table.calendarmonth td.todayHeader, table.calendarweek td.header, table.calendarweek td.todayHeader{ + border: 1px solid #000; + background: #eee; + font-weight: bold; + padding: 1px; + color: #222; + padding-left: 1em; + padding-right: 1em; + padding-bottom: 1em; +} + +table.calendarmonth td.header a, table.calendarmonth td.todayHeader a, table.calendarweek td.header a, table.calendarweek td.todayHeader a{ + color: #000; +} + + +table.calendarmonth td.today, table.calendarweek td.today{ + background: #ddd; +} + +table.calendarmonth td.todayHeader, table.calendarweek td.todayHeader,table.calendarmonth td.todayHeader a, table.calendarweek td.todayHeader a{ + background: #000; + color: #eee; +} + +table.calendarweek td.header, table.calendarweek td.todayHeader{ + padding-bottom: 2em; +} + +table.searchform td{ + padding-top: 5px; + padding-bottom: 10px; + padding-right: 5px; +} diff --git a/styles/changes.txt b/styles/changes.txt new file mode 100644 index 000000000..460c590f3 --- /dev/null +++ b/styles/changes.txt @@ -0,0 +1,470 @@ +------------------------------------------------------------------- + Changes in version 1.7.2 +------------------------------------------------------------------- + +- Style Sheet modifications to improve IE6 compatibility, contributed by + Juan Lago (thanks Juan!). This fixes some placement issues with elements + that have the position attribute set to "absolute". + +- The div elements that are used to clear floats have been fixed so that they + have zero height in IE6. It is not enough to specify "height: 0"; one must + also set "font-size:0" otherwise IE6 will set the height of the element to + match the standard font size. + +- UI layout improvements. Various changes to the user interface to improve + the page flow and allow for further expansion in the future. The context + menu bar has been separated from the page heading into its own container + underneath the title. It's a more logical place to present the menu, and + will allow for the easy addition of further sub-headings in the future + without compromising the page flow. + +- The last dependency on the original theme system has been eliminated with + the introduction of updated chooser dialogues for selecting files and + folders. These dialogues have the new themes and the code has been revamped, + replacing the old table structures with unordered lists. + +- LDAP update. A minor change to the LDAP authentication code to allow for + the use of URIs to identify the server name (e.g. ldaps://host.com). + Also, the LDAP version is set to 3 in order to support secure connections. + +- New language translations for Czech and Slovak. Contributed by SF user + helix84 (thanks!). + + +------------------------------------------------------------------- + Changes in version 1.7.1 +------------------------------------------------------------------- + +- Re-vamped Notification system allows users to receive an email when a + document or folder is changed. This is a new, event-based mechanism that + notifies the user as soon as the change has been made and replaces the + cron mechanism originally developed. Any user that has read access to a + document or folder can subscribe to be notified of changes. Users that + have been assigned as reviewers or approvers for a document are + automatically added to the notification system for that document. + + A new page has been created for users to assist with the management of + their notification subscriptions. This can be found in the "My Account" + section under "Notification List". + +- The test used to identify HTTPS connections has been improved so that it + correctly identifies IIS servers that have ISAPI enabled but are not + using HTTPS protocol. + + +------------------------------------------------------------------- + Changes in version 1.7.0 +------------------------------------------------------------------- + +- Fixes to CSS display bugs. Minor updates to the display. + +- Improved handling of character escape sequences. + +- Review / Approve dates added to folder views and search results. + +- New file system directory management code to accommodate limitations in the + underlying filesystem which restrict the number of files that MyDMS can + store. MyDMS now uses a nested directory structure to store files, rather + than a flat one. However, note that individual files are still stored one + per directory in order to preserve compatibility with older versions of + MyDMS. + + For details of the problem and the solution implemented, please refer to: + + http://mydms.sf.net/2007/08/15/new-file-system-storage-structure/ + +- Hungarian translation. + +- And as a bonus, there is a Drupal theme compatible with MyDMS. + + +------------------------------------------------------------------- + Changes in version 1.6.1 +------------------------------------------------------------------- + +- Theme and language choice are now saved as user attributes between + sessions. Read update-1.6.1.txt for changes to database schema. + +- Link to document review / approval page from out.ViewDocument.php. + +- French translation. + +- Brazilian Portuguese translation. + +- Traditional Chinese translation. + +- Relaxation of criteria for selecting reviewers / approvers. Users now only + require read access to be eligible reviewers or approvers. + +- Documents are now displayed in the correct sequence in the folder view. + +- Documents can be downloaded directly from the folder view by clicking their + icon. + +- Document icons in the folder view now reflect the document type. + +- Empty passwords are not accepted, even when JS is disabled in the browser. + +- New restricted access mode rejects login from users who are not entered + into the internal database, even if LDAP authentication was successful. + + +------------------------------------------------------------------- + Changes in version 1.6.0 +------------------------------------------------------------------- + +- Introduction of a document workflow system that manages the life-cycle of a + document, including review and approval stages. + + Details: + + Document Class: + Created new methods: + Document::addIndReviewer() + Document::addGrpReviewer() + Document::addIndApprover() + Document::addGrpApprover() + + Changes to: + Document::addContent() + + New Class: Email. + + out.AddDocument.php + op.AddDocument.php + Changes to allow selection of reviewers and approvers. + + Group Class: + Changes to: + Group::getUsers() -- query optimised + New Methods: + Group::getReviewStatus() + Group::getApprovalStatus() + + User Class: + New Methods: + User::getReviewStatus() + User::getApprovalStatus() + + Class Folder: + Changes to: + Folder::addDocument() -- accept reviewers, approvers as parameters. + + New Class: AddContentResultSet. + + Database: + Document version field changed from TINYINT to unsigned SMALLINT throughout + database. + `tblGroupMembers`: + `id` field removed as it is unnecessary. + Created a primary of `groupID`, `userID`. + + DocumentContent Class: + Created new methods: + DocumentContent::getStatus() + DocumentContent::getReviewStatus() + DocumentContent::getApprovalStatus() + DocumentContent::delIndReviewer() + DocumentContent::delGrpReviewer() + DocumentContent::delIndApprover() + DocumentContent::delGrpApprover() + + out.ViewDocument.php + op.ViewDocument.php + Changes to incorporate display of workflow status. + Links to allow user to change status of a document revision. + + out.UpdateDocument.php + op.UpdateDocument.php + Changes to allow selection of reviewers and approvers. + + out.Login.php + op.Login.php + redirect user to originally requested URL upon successful login. + + out.ReviewDocument.php + op.ReviewDocument.php + out.ApproveDocument.php + op.ApproveDocument.php + Created to enable users to review and approve documents. + + out.OverrideContentStatus.php + op.OverrideContentStatus.php + Allows document owner or site administrator to override the status of a + document. + + out.SetReviewersApprovers.php + op.SetReviewersApprovers.php + Allows document owner or site administrator to re-assign reviewers and + approvers to a document revision that is pending review or approval. + + out.ActionSummary.php + Lists all the documents owned by current user that are pending review or + approval. Lists all documents that are awaiting review or approval by the + user. + + Search page now allows user to search for documents pending review or + approval. Search results display overall document status. + +- Admin user cannot be deleted, and admin privilege cannot be removed from + the admin user. Previously, both actions were possible. + +- Users can be assigned administrative privileges in the User Manager. + +- Deleting document revisions or the document itself notifies all affected + users by email, deletes entries from all status logs. + + +------------------------------------------------------------------- + Changes in version 1.5.1 +------------------------------------------------------------------- + +- Fixed a bug in the keyword editing code which was preventing users from + adding default keywords into global keyword categories. + +------------------------------------------------------------------- + Changes in version 1.5.0 +------------------------------------------------------------------- + +- Optimised search. Improved the performance of the search function by + placing more of the work on the database and by applying indexes to some of + the tables. Sub-folder searches are also dramatically improved due to the + incorporation of a folderList field in the tblDocuments table. + +- Optimised display. New compact theme significantly reduces the page load + times. This is the default theme. The original is still available as a + selection. + +- Changed file download headers such that downloading works with IE over SSL. + +- Changed all instances of $HTTP_COOKIES_VARS, which has been deprecated, to + $_COOKIE. + +- Replaced all short open tags ( +
        + + +   + + + + + + + +
        :
        + + + diff --git a/themes/default/DocumentPageStart.html b/themes/default/DocumentPageStart.html new file mode 100644 index 000000000..b3e808dee --- /dev/null +++ b/themes/default/DocumentPageStart.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + +
        + + + + + + +
        " width="53" height="19" border="0" alt="">" width="42" height="19" border="0" alt="">
        +
        +
          diff --git a/themes/default/EndBox.html b/themes/default/EndBox.html new file mode 100644 index 000000000..3451fac7d --- /dev/null +++ b/themes/default/EndBox.html @@ -0,0 +1,26 @@ + + +
        + + + diff --git a/themes/default/FolderPageEnd.html b/themes/default/FolderPageEnd.html new file mode 100644 index 000000000..571042790 --- /dev/null +++ b/themes/default/FolderPageEnd.html @@ -0,0 +1,34 @@ + +
      + + +   + + + + + + + +
      :
      + + + diff --git a/themes/default/FolderPageStart.html b/themes/default/FolderPageStart.html new file mode 100644 index 000000000..b3e808dee --- /dev/null +++ b/themes/default/FolderPageStart.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + +
      + + + + + + +
      " width="53" height="19" border="0" alt="">" width="42" height="19" border="0" alt="">
      +
      +
        diff --git a/themes/default/HTMLFoot.html b/themes/default/HTMLFoot.html new file mode 100644 index 000000000..0a5732e0a --- /dev/null +++ b/themes/default/HTMLFoot.html @@ -0,0 +1,21 @@ + + + diff --git a/themes/default/HTMLHead.html b/themes/default/HTMLHead.html new file mode 100644 index 000000000..da24a4fcd --- /dev/null +++ b/themes/default/HTMLHead.html @@ -0,0 +1,26 @@ + + + + + <?php echo $title?> + + + diff --git a/themes/default/NextBox.html b/themes/default/NextBox.html new file mode 100644 index 000000000..4350b81e3 --- /dev/null +++ b/themes/default/NextBox.html @@ -0,0 +1,42 @@ + + +
      + + + +   + + + + + + + +
       :
      + + + + + + + + + + + + + + + + +
      diff --git a/themes/default/StartBox.html b/themes/default/StartBox.html new file mode 100644 index 000000000..9057e790c --- /dev/null +++ b/themes/default/StartBox.html @@ -0,0 +1,35 @@ + + + + + + + + + +
      + + + + +
       :
      +
      + + + + + + + + + + + + +
      diff --git a/themes/default/TitleBar.html b/themes/default/TitleBar.html new file mode 100644 index 000000000..cf643910b --- /dev/null +++ b/themes/default/TitleBar.html @@ -0,0 +1,26 @@ + + + + + + + +
      diff --git a/themes/default/styles.css b/themes/default/styles.css new file mode 100644 index 000000000..69d0f8466 --- /dev/null +++ b/themes/default/styles.css @@ -0,0 +1,189 @@ +a { text-decoration: none; } +a:hover { text-decoration: underline; } + +.titlebar { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + background-color : #000080; + font-size : 12pt; + color : White; + font-weight: bold; +} + +.header1 { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 11pt; + font-style : italic; + color : #000080; +} + +.foldertree { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.foldertree_inpath { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + font-style: italic; +} + +.foldertree_active { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 9pt; + color: black; + font-weight: bold; +} + +.path { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + background-color : #A0A1CE; + font-size : 10pt; + color: black; +} + +.editfolder { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + background-color : #A0A1CE; + font-size : 10pt; + color: black; +} + +.editdocument { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + background-color : #A0A1CE; + font-size : 10pt; + color: black; +} + +.infos { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.filelist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.subfolderlist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.linklist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.boxHeader { + color : White; + background-color : #000080; + font-style : italic; + font-size : 11pt; + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; +} + +.boxBorder { + border: 1pt solid #000080; +} + +.pageHeader { + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 13pt; + font-weight: bold; + color: #000080; +} + + .inputDescription { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + font-style: italic; +} + +.notifylist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.inheritAccess +{ + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.accessList +{ + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.defaultAccess +{ + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.msgLocked +{ + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.standardText +{ + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.groupMembers +{ + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; +} + +.hline +{ + background-color : #000080; +} + +.mimeicon { + height: 24px; + width: 24px; + border: 0; +} + +/* + * Classes for Checkbox Selection 'Widget'. + */ +.cbSelectTitle { + float:left; + width: 6em; +} +.cbSelectContainer { + overflow:auto; + height: 6em; + border: thin solid; +} +.cbSelectList { + padding: 0.1em; +} +.cbSelectItem{ + list-style-type: none; +} +.cbSelectMargin { + margin-top:0.2em; +} diff --git a/themes/original/DocumentPageEnd.html b/themes/original/DocumentPageEnd.html new file mode 100644 index 000000000..eff0c582f --- /dev/null +++ b/themes/original/DocumentPageEnd.html @@ -0,0 +1,45 @@ + + +
      "> +   + + + + + + +
      + : + + +
      +
      "> +   +  
      diff --git a/themes/original/DocumentPageStart.html b/themes/original/DocumentPageStart.html new file mode 100644 index 000000000..ba2d941c5 --- /dev/null +++ b/themes/original/DocumentPageStart.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + +
      +   + + + "> +   + + +
      +  

      + getPath(), 0, $document, false); ?> +

      "> +   + + + + + + + +
      " + width="53" height="19" border="0" alt=""> + + " + width="42" height="19" border="0" alt="">
      +
      "> +   + +
        diff --git a/themes/original/EndBox.html b/themes/original/EndBox.html new file mode 100644 index 000000000..af82e108f --- /dev/null +++ b/themes/original/EndBox.html @@ -0,0 +1,25 @@ + + +
      +
      diff --git a/themes/original/FolderPageEnd.html b/themes/original/FolderPageEnd.html new file mode 100644 index 000000000..81f1271b4 --- /dev/null +++ b/themes/original/FolderPageEnd.html @@ -0,0 +1,46 @@ + + + +
      "> +   + + + + + + +
      + : + + +
      +
      "> +   +  
      diff --git a/themes/original/FolderPageStart.html b/themes/original/FolderPageStart.html new file mode 100644 index 000000000..49f2509aa --- /dev/null +++ b/themes/original/FolderPageStart.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + +
      +   + + + "> +   + + +
      +  

      + getPath(), 0, $folder, true); ?> +

      "> +   + + + + + + + +
      " + width="53" height="19" border="0" alt=""> + + " + width="42" height="19" border="0" alt="">
      +
      "> +   + +
        diff --git a/themes/original/HTMLFoot.html b/themes/original/HTMLFoot.html new file mode 100644 index 000000000..99e3068ea --- /dev/null +++ b/themes/original/HTMLFoot.html @@ -0,0 +1,20 @@ + + + diff --git a/themes/original/HTMLHead.html b/themes/original/HTMLHead.html new file mode 100644 index 000000000..debc509b3 --- /dev/null +++ b/themes/original/HTMLHead.html @@ -0,0 +1,25 @@ + + + + + <?php echo $title?> + + + diff --git a/themes/original/NextBox.html b/themes/original/NextBox.html new file mode 100644 index 000000000..d809b7c94 --- /dev/null +++ b/themes/original/NextBox.html @@ -0,0 +1,42 @@ + + +
      + + + +   + + + + + + + +
       :
      + + + + + + + +
      diff --git a/themes/original/StartBox.html b/themes/original/StartBox.html new file mode 100644 index 000000000..9d6b0abe7 --- /dev/null +++ b/themes/original/StartBox.html @@ -0,0 +1,35 @@ + + + + + + + + +
      + + + + +
       :
      +
      + + +
      diff --git a/themes/original/TitleBar.html b/themes/original/TitleBar.html new file mode 100644 index 000000000..f71e4d86d --- /dev/null +++ b/themes/original/TitleBar.html @@ -0,0 +1,27 @@ + + + + + + + +
      + +
      diff --git a/themes/original/styles.css b/themes/original/styles.css new file mode 100644 index 000000000..7b7856637 --- /dev/null +++ b/themes/original/styles.css @@ -0,0 +1,161 @@ + a { text-decoration: none; } + a:hover { text-decoration: underline; } + + .titlebar { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + background-color : #000080; + font-size : 12pt; + color : White; + font-weight: bold; + } + + .header1 { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 11pt; + font-style : italic; + color : #000080; + } + + .foldertree { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .foldertree_inpath { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + font-style: italic; + } + + .foldertree_active { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 9pt; + color: black; + font-weight: bold; + } + + .path { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + background-color : #A0A1CE; + font-size : 10pt; + color: black; + } + + .editfolder { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + background-color : #A0A1CE; + font-size : 10pt; + color: black; + } + + .editdocument { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + background-color : #A0A1CE; + font-size : 10pt; + color: black; + } + + .infos { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .filelist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .subfolderlist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .linklist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .boxHeader { + color : White; + background-color : #000080; + font-style : italic; + font-size : 11pt; + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + } + + .boxBorder { + border: 1pt solid #000080; + } + + .pageHeader { + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 13pt; + font-weight: bold; + color: #000080; + } + + .inputDescription { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + font-style: italic; + } + + .notifylist { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .inheritAccess + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .accessList + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .defaultAccess + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .msgLocked + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .standardText + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .groupMembers + { + font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size : 10pt; + color: black; + } + + .hline + { + background-color : #000080; + } diff --git a/update/update.php b/update/update.php new file mode 100644 index 000000000..46c96a555 --- /dev/null +++ b/update/update.php @@ -0,0 +1,122 @@ +"; + +if (!$user->isAdmin()) { + print "ERROR: You must be administrator to execute the update"; + die; +} + +function update_content() +{ + + GLOBAL $db,$settings; + + // create temp folder + if (!makedir($settings->_contentDir."/temp")) return false; + + // for all contents + $queryStr = "SELECT * FROM tblDocumentContent"; + $contents = $db->getResultArray($queryStr); + + if (is_bool($contents)&&!$contents) return false; + + for ($i=0;$i_contentDir."/temp/".$contents[$i]["document"]) return false; + + // move every content in temp/documentID/version.fileType + $source = $settings->_contentDir."/".$settings->_contentOffsetDir."/".$i."/data".$contents[$i]["fileType"]; + $target = $settings->_contentDir."/temp/".$contents[$i]["document"]."/".$contents[$i]["version"].$contents[$i]["fileType"]; + if (!copyFile($source, $target) return false; + } + + + // change directory + if (!renameDir($settings->_contentDir."/".$settings->_contentOffsetDir,$settings->_contentDir."/old") return false; + if (!renameDir($settings->_contentDir."/temp",$settings->_contentDir."/".$settings->_contentOffsetDir) return false; + + return true; +} + +function update_db() +{ + GLOBAL $db,$settings; + + // for all contents + $queryStr = "SELECT * FROM tblDocumentContent"; + $contents = $db->getResultArray($queryStr); + + if (is_bool($contents)&&!$contents) return false; + + for ($i=0;$i_contentOffsetDir."/".$contents[$i]["document"]." WHERE id = ".$i; + if (!$db->getResult($queryStr)) return false; + + } + + // run the update-2.0.sql + $fd = fopen ("update.sql", "r"); + + if (is_bool($fd)&&!$fd) return false; + + $queryStr = fread($fd, filesize("update.sql")); + + if (is_bool($queryStr)&&!$queryStr) return false; + + fclose ($fd); + if (!$db->getResult($queryStr)) return false; + + return true; +} + + +print "Updating ...please wait
      "; + + +if (!update_content()) { + print "ERROR: An error occurred during the directory reordering"; + die; +} + +if (!update_db()) { + print "ERROR: An error occurred during the DB update"; + die; +} + +print "Update done
      "; + + print ""; + +?> diff --git a/update/update.sql b/update/update.sql new file mode 100644 index 000000000..b89e0ac44 --- /dev/null +++ b/update/update.sql @@ -0,0 +1,33 @@ +-- mysql -uroot -ppassword mydms < update-2.0.sql + + +-- -------------------------------------------------------- + +-- +-- New table for document-related files +-- + +CREATE TABLE `tblDocumentFiles` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `comment` text, + `name` varchar(150) default NULL, + `date` int(12) default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(70) NOT NULL default '', + PRIMARY KEY (`id`) +) ; + +-- -------------------------------------------------------- + +-- +-- Not longer required by new filesystem structure +-- + +DROP TABLE `tblDirPath`; +DROP TABLE `tblPathList`; + +