- lots of documentation added

This commit is contained in:
steinm 2010-11-30 12:23:46 +00:00
parent 1f9cd66663
commit 06dd5ec89e
10 changed files with 371 additions and 264 deletions

View File

@ -1,21 +1,19 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2010 Uwe Steinmann * Implementation of the document management system
// *
// This program is free software; you can redistribute it and/or modify * @category DMS
// it under the terms of the GNU General Public License as published by * @package LetoDMS
// the Free Software Foundation; either version 2 of the License, or * @license GPL 2
// (at your option) any later version. * @version @version@
// * @author Uwe Steinmann <uwe@steinmann.cx>
// This program is distributed in the hope that it will be useful, * @copyright Copyright (C) 2010, Uwe Steinmann
// but WITHOUT ANY WARRANTY; without even the implied warranty of * @version Release: @package_version@
// 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.
/**
* Include some files
*/
require_once("inc.AccessUtils.php"); require_once("inc.AccessUtils.php");
require_once("inc.FileUtils.php"); require_once("inc.FileUtils.php");
require_once("inc.ClassAccess.php"); require_once("inc.ClassAccess.php");
@ -26,61 +24,54 @@ require_once("inc.ClassUser.php");
require_once("inc.ClassKeywords.php"); require_once("inc.ClassKeywords.php");
/** /**
* Class to represent the complete document management * Class to represent the complete document management system
* *
* @category DMS * @category DMS
* @package LetoDMS * @package LetoDMS
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx> * @author Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2010, Uwe Steinmann * @copyright Copyright (C) 2010, Uwe Steinmann
* @version Release: @package_version@ * @version Release: @package_version@
*/ */
class LetoDMS_DMS { class LetoDMS_DMS {
/** /**
* @var object $db reference to database object * @var object $db reference to database object. This must be an instance
* of {@link LetoDMS_DatabaseAccess}.
* @access protected * @access protected
*/ */
protected $db; protected $db;
/** /**
* @var object $user reference to currently logged in user * @var object $user reference to currently logged in user. This must be
* an instance of {@link LetoDMS_User}.
* @access public * @access public
*/ */
public $user; public $user;
/** /**
* @var string $contentDir location in file system where all the * @var string $contentDir location in the file system where all the
* data stores are located. * data stores are located. This should be an absolute path.
* @access public * @access public
*/ */
public $contentDir; public $contentDir;
/** /**
* @var string $contentOffsetDir location in file system relative to * @var string $contentOffsetDir location in the file system relative to
* @var $contentDir where all the documents belonging to a * {@link $contentDir} where all the documents belonging to a
* data stored are saved * data store are saved. This is basically a subdirectory of
* {@link $contentDir}. It is very helpful if several instances
* of the dms shall be used in parallel. This is often used with
* a separate database for each instance of the dms.
* @access public * @access public
*/ */
public $contentOffsetDir; public $contentOffsetDir;
/**
* @var integer $guestID ID of user treated as a guest with limited
* access rights
* @access public
*/
public $guestID;
/** /**
* @var integer $rootFolderID ID of root folder * @var integer $rootFolderID ID of root folder
* @access public * @access public
*/ */
public $rootFolderID; public $rootFolderID;
/**
* @var boolean $enableGuestLogin set to true if guest login is allowed
* @access public
*/
public $enableGuestLogin;
/** /**
* @var boolean $enableConverting set to true if conversion of content is desired * @var boolean $enableConverting set to true if conversion of content is desired
* @access public * @access public
@ -143,7 +134,6 @@ class LetoDMS_DMS {
$this->contentDir = $contentDir; $this->contentDir = $contentDir;
$this->contentOffsetDir = $contentOffsetDir; $this->contentOffsetDir = $contentOffsetDir;
$this->rootFolderID = 1; $this->rootFolderID = 1;
$this->guestID = 2;
$this->enableAdminRevApp = false; $this->enableAdminRevApp = false;
$this->enableConverting = false; $this->enableConverting = false;
$this->convertFileTypes = array(); $this->convertFileTypes = array();
@ -157,14 +147,6 @@ class LetoDMS_DMS {
$this->rootFolderID = $id; $this->rootFolderID = $id;
} /* }}} */ } /* }}} */
function setGuestID($id) { /* {{{ */
$this->guestID = $id;
} /* }}} */
function setEnableGuestLogin($enable) { /* {{{ */
$this->enableGuestLogin = $enable;
} /* }}} */
function setEnableAdminRevApp($enable) { /* {{{ */ function setEnableAdminRevApp($enable) { /* {{{ */
$this->enableAdminRevApp = $enable; $this->enableAdminRevApp = $enable;
} /* }}} */ } /* }}} */
@ -576,6 +558,11 @@ class LetoDMS_DMS {
return $group; return $group;
} /* }}} */ } /* }}} */
/**
* Get a list of all groups
*
* @return array array of instances of {@link LetoDMS_Group}
*/
function getAllGroups() { /* {{{ */ function getAllGroups() { /* {{{ */
$queryStr = "SELECT * FROM tblGroups ORDER BY name"; $queryStr = "SELECT * FROM tblGroups ORDER BY name";
$resArr = $this->db->getResultArray($queryStr); $resArr = $this->db->getResultArray($queryStr);
@ -595,6 +582,14 @@ class LetoDMS_DMS {
return $groups; return $groups;
} /* }}} */ } /* }}} */
/**
* Create a new user group
*
* @param string $name name of group
* @param string $comment comment of group
* @return object/boolean instance of {@link LetoDMS_Group} or false in
* case of an error.
*/
function addGroup($name, $comment) { /* {{{ */ function addGroup($name, $comment) { /* {{{ */
if (is_object($this->getGroupByName($name))) { if (is_object($this->getGroupByName($name))) {
return false; return false;

View File

@ -34,7 +34,6 @@ define("S_EXPIRED", -3);
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, 2010 Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, 2010 Uwe Steinmann
* @version Release: @package_version@ * @version Release: @package_version@
*/ */
// these are the document information (all versions)
class LetoDMS_Document { /* {{{ */ class LetoDMS_Document { /* {{{ */
var $_id; var $_id;
var $_name; var $_name;
@ -1320,17 +1319,26 @@ class LetoDMS_Document { /* {{{ */
} /* }}} */ } /* }}} */
} /* }}} */ } /* }}} */
/* --------------------------------------------------------------------- */
/** /**
* Die Datei wird als "data.ext" (z.b. data.txt) gespeichert. Getrennt davon wird in der DB der ursprüngliche * Class to represent content of a document
* 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 * Each document has content attached to it, often called a 'version' of the
* deutschen Umlauten, während Windows wiederum den Doppelpunkt in Dateinamen nicht verwenden kann. * document. The document content represents a file on the disk with some
* Der ursprüngliche Dateiname wird nur zum Download verwendet (siehe op.Download.pgp) * meta data stored in the database. A document content has a version number
* which is incremented with each replacement of the old content. Old versions
* are kept unless they are explicitly deleted by
* {@link LetoDMS_Document::removeContent()}.
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli,
* Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/ */
// these are the version information
class LetoDMS_DocumentContent { /* {{{ */ class LetoDMS_DocumentContent { /* {{{ */
// if status is released and there are reviewers set status draft_rev // if status is released and there are reviewers set status draft_rev
@ -2030,8 +2038,24 @@ class LetoDMS_DocumentContent { /* {{{ */
} /* }}} */ } /* }}} */
/* ----------------------------------------------------------------------- */ /**
* Class to represent a link between two document
*
* Document links are to establish a reference from one document to
* another document. The owner of the document link may not be the same
* as the owner of one of the documents.
* Use {@link LetoDMS_Document::addDocumentLink()} to add a reference
* to another document.
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli,
* Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/
class LetoDMS_DocumentLink { /* {{{ */ class LetoDMS_DocumentLink { /* {{{ */
var $_id; var $_id;
var $_document; var $_document;
@ -2076,8 +2100,23 @@ class LetoDMS_DocumentLink { /* {{{ */
} }
} /* }}} */ } /* }}} */
/* ---------------------------------------------------------------------- */ /**
* Class to represent a file attached to a document
*
* Beside the regular document content arbitrary files can be attached
* to a document. This is a similar concept as attaching files to emails.
* The owner of the attached file and the document may not be the same.
* Use {@link LetoDMS_Document::addDocumentFile()} to attach a file.
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli,
* Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/
class LetoDMS_DocumentFile { /* {{{ */ class LetoDMS_DocumentFile { /* {{{ */
var $_id; var $_id;
var $_document; var $_document;
@ -2147,6 +2186,18 @@ class LetoDMS_DocumentFile { /* {{{ */
// The object stores a copy of the new DocumentContent object, the newly assigned // The object stores a copy of the new DocumentContent object, the newly assigned
// reviewers and approvers and the status. // reviewers and approvers and the status.
// //
/**
* Class to represent a list of document contents
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli,
* Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/
class LetoDMS_AddContentResultSet { /* {{{ */ class LetoDMS_AddContentResultSet { /* {{{ */
var $_indReviewers; var $_indReviewers;

View File

@ -1,108 +1,117 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Implementation of notifation system using email
// Copyright (C) 2006-2008 Malcolm Cowe *
// Copyright (C) 2010 Matteo Lucarelli * @category DMS
// * @package LetoDMS
// This program is free software; you can redistribute it and/or modify * @license GPL 2
// it under the terms of the GNU General Public License as published by * @version @version@
// the Free Software Foundation; either version 2 of the License, or * @author Uwe Steinmann <uwe@steinmann.cx>
// (at your option) any later version. * @copyright Copyright (C) 2002-2005 Markus Westphal,
// * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
// This program is distributed in the hope that it will be useful, * 2010 Uwe Steinmann
// but WITHOUT ANY WARRANTY; without even the implied warranty of * @version Release: @package_version@
// 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 * Include parent class
// along with this program; if not, write to the Free Software */
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
require_once("inc.ClassNotify.php"); require_once("inc.ClassNotify.php");
class LetoDMS_Email extends LetoDMS_Notify { /**
* Class to send email notifications to individuals or groups
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/
class LetoDMS_Email extends LetoDMS_Notify {
function toIndividual($sender, $recipient, $subject, $message) { function toIndividual($sender, $recipient, $subject, $message) {
global $settings; global $settings;
if ($settings->_enableEmail==FALSE) return 0; if ($settings->_enableEmail==FALSE) return 0;
if ($recipient->getEmail()=="") return 0; if ($recipient->getEmail()=="") return 0;
if ((!is_object($sender) && strcasecmp(get_class($sender), "LetoDMS_User")) || if ((!is_object($sender) && strcasecmp(get_class($sender), "LetoDMS_User")) ||
(!is_object($recipient) && strcasecmp(get_class($recipient), "LetoDMS_User"))) { (!is_object($recipient) && strcasecmp(get_class($recipient), "LetoDMS_User"))) {
return -1; return -1;
} }
$header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" . $header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" .
"Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n"; "Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n";
$message = getMLText("email_header")."\r\n\r\n".$message; $message = getMLText("email_header")."\r\n\r\n".$message;
$message .= "\r\n\r\n".getMLText("email_footer"); $message .= "\r\n\r\n".getMLText("email_footer");
return (mail($recipient->getEmail(), $this->replaceMarker($subject), $this->replaceMarker($message), $header) ? 0 : -1); return (mail($recipient->getEmail(), $this->replaceMarker($subject), $this->replaceMarker($message), $header) ? 0 : -1);
} }
function toGroup($sender, $groupRecipient, $subject, $message) { function toGroup($sender, $groupRecipient, $subject, $message) {
global $settings; global $settings;
if (!$settings->_enableEmail) return 0; if (!$settings->_enableEmail) return 0;
if ((!is_object($sender) && strcasecmp(get_class($sender), "LetoDMS_User")) || if ((!is_object($sender) && strcasecmp(get_class($sender), "LetoDMS_User")) ||
(!is_object($groupRecipient) && strcasecmp(get_class($groupRecipient), "LetoDMS_Group"))) { (!is_object($groupRecipient) && strcasecmp(get_class($groupRecipient), "LetoDMS_Group"))) {
return -1; return -1;
} }
$header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" . $header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" .
"Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n"; "Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n";
$toList = ""; $toList = "";
foreach ($groupRecipient->getUsers() as $recipient) { foreach ($groupRecipient->getUsers() as $recipient) {
if ($recipient->getEmail()!="") if ($recipient->getEmail()!="")
$toList .= (strlen($toList)==0 ? "" : ", ") . $recipient->getEmail(); $toList .= (strlen($toList)==0 ? "" : ", ") . $recipient->getEmail();
}
if (strlen($toList)==0) {
return -1;
} }
if (strlen($toList)==0) {
return -1;
}
$message = getMLText("email_header")."\r\n\r\n".$message; $message = getMLText("email_header")."\r\n\r\n".$message;
$message .= "\r\n\r\n".getMLText("email_footer"); $message .= "\r\n\r\n".getMLText("email_footer");
return (mail($toList, parent::replaceMarker($subject), parent::replaceMarker($message), $header) ? 0 : -1); return (mail($toList, parent::replaceMarker($subject), parent::replaceMarker($message), $header) ? 0 : -1);
} }
function toList($sender, $recipients, $subject, $message) { function toList($sender, $recipients, $subject, $message) {
global $settings; global $settings;
if (!$settings->_enableEmail) return 0; if (!$settings->_enableEmail) return 0;
if ((!is_object($sender) && strcasecmp(get_class($sender), "LetoDMS_User")) || if ((!is_object($sender) && strcasecmp(get_class($sender), "LetoDMS_User")) ||
(!is_array($recipients) && count($recipients)==0)) { (!is_array($recipients) && count($recipients)==0)) {
return -1; return -1;
} }
$header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" . $header = "From: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n" .
"Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n"; "Reply-To: ". $sender->getFullName() ." <". $sender->getEmail() .">\r\n";
$toList = ""; $toList = "";
foreach ($recipients as $recipient) { foreach ($recipients as $recipient) {
if (is_object($recipient) && !strcasecmp(get_class($recipient), "LetoDMS_User")) { if (is_object($recipient) && !strcasecmp(get_class($recipient), "LetoDMS_User")) {
if ($recipient->getEmail()!="") if ($recipient->getEmail()!="")
$toList .= (strlen($toList)==0 ? "" : ", ") . $recipient->getEmail(); $toList .= (strlen($toList)==0 ? "" : ", ") . $recipient->getEmail();
} }
}
if (strlen($toList)==0) {
return -1;
} }
if (strlen($toList)==0) {
return -1;
}
$message = getMLText("email_header")."\r\n\r\n".$message; $message = getMLText("email_header")."\r\n\r\n".$message;
$message .= "\r\n\r\n".getMLText("email_footer"); $message .= "\r\n\r\n".getMLText("email_footer");
return (mail($toList, $this->replaceMarker($subject), $this->replaceMarker($message), $header) ? 0 : -1); return (mail($toList, $this->replaceMarker($subject), $this->replaceMarker($message), $header) ? 0 : -1);
} }
} }
?> ?>

View File

@ -1,29 +1,46 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Implementation of the group object in the document management system
// Copyright (C) 2006-2008 Malcolm Cowe *
// * @category DMS
// This program is free software; you can redistribute it and/or modify * @package LetoDMS
// it under the terms of the GNU General Public License as published by * @license GPL 2
// the Free Software Foundation; either version 2 of the License, or * @version @version@
// (at your option) any later version. * @author Uwe Steinmann <uwe@steinmann.cx>
// * @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
// This program is distributed in the hope that it will be useful, * 2010 Uwe Steinmann
// but WITHOUT ANY WARRANTY; without even the implied warranty of * @version Release: @package_version@
// 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.
/**********************************************************************\
| Group-Klasse |
\**********************************************************************/
/**
* Class to represent a user group in the document management system
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, 2010 Uwe Steinmann
* @version Release: @package_version@
*/
class LetoDMS_Group { class LetoDMS_Group {
/**
* The id of the user group
*
* @var integer
*/
var $_id; var $_id;
/**
* The name of the user group
*
* @var string
*/
var $_name; var $_name;
/**
* Back reference to DMS this user group belongs to
*
* @var object
*/
var $_dms; var $_dms;
function LetoDMS_Group($id, $name, $comment) { /* {{{ */ function LetoDMS_Group($id, $name, $comment) { /* {{{ */

View File

@ -1,27 +1,50 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Implementation of keyword categories in the document management system
// Copyright (C) 2006-2008 Malcolm Cowe *
// * @category DMS
// This program is free software; you can redistribute it and/or modify * @package LetoDMS
// it under the terms of the GNU General Public License as published by * @license GPL 2
// the Free Software Foundation; either version 2 of the License, or * @version @version@
// (at your option) any later version. * @author Uwe Steinmann <uwe@steinmann.cx>
// * @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
// This program is distributed in the hope that it will be useful, * 2010 Uwe Steinmann
// but WITHOUT ANY WARRANTY; without even the implied warranty of * @version Release: @package_version@
// 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.
//--------------------------------------------------------------------------- /**
* Class to represent a keyword category in the document management system
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/
class LetoDMS_KeywordCategory { class LetoDMS_KeywordCategory {
/**
* @var integer $_id id of keyword category
* @access protected
*/
var $_id; var $_id;
/**
* @var integer $_ownerID id of user who is the owner
* @access protected
*/
var $_ownerID; var $_ownerID;
/**
* @var string $_name name of category
* @access protected
*/
var $_name; var $_name;
/**
* @var object $_dms reference to dms this category belongs to
* @access protected
*/
var $_dms; var $_dms;
function LetoDMS_KeywordCategory($id, $ownerID, $name) { function LetoDMS_KeywordCategory($id, $ownerID, $name) {
@ -46,7 +69,7 @@ class LetoDMS_KeywordCategory {
} }
function setName($newName) { function setName($newName) {
GLOBAL $db; $db = $this->_dms->getDB();
$queryStr = "UPDATE tblKeywordCategories SET name = '$newName' WHERE id = ". $this->_id; $queryStr = "UPDATE tblKeywordCategories SET name = '$newName' WHERE id = ". $this->_id;
if (!$db->getResult($queryStr)) if (!$db->getResult($queryStr))
@ -57,7 +80,7 @@ class LetoDMS_KeywordCategory {
} }
function setOwner($user) { function setOwner($user) {
GLOBAL $db; $db = $this->_dms->getDB();
$queryStr = "UPDATE tblKeywordCategories SET owner = " . $user->getID() . " WHERE id " . $this->_id; $queryStr = "UPDATE tblKeywordCategories SET owner = " . $user->getID() . " WHERE id " . $this->_id;
if (!$db->getResult($queryStr)) if (!$db->getResult($queryStr))
@ -69,35 +92,35 @@ class LetoDMS_KeywordCategory {
} }
function getKeywordLists() { function getKeywordLists() {
GLOBAL $db; $db = $this->_dms->getDB();
$queryStr = "SELECT * FROM tblKeywords WHERE category = " . $this->_id; $queryStr = "SELECT * FROM tblKeywords WHERE category = " . $this->_id;
return $db->getResultArray($queryStr); return $db->getResultArray($queryStr);
} }
function editKeywordList($listID, $keywords) { function editKeywordList($listID, $keywords) {
GLOBAL $db; $db = $this->_dms->getDB();
$queryStr = "UPDATE tblKeywords SET keywords = '$keywords' WHERE id = $listID"; $queryStr = "UPDATE tblKeywords SET keywords = '$keywords' WHERE id = $listID";
return $db->getResult($queryStr); return $db->getResult($queryStr);
} }
function addKeywordList($keywords) { function addKeywordList($keywords) {
GLOBAL $db; $db = $this->_dms->getDB();
$queryStr = "INSERT INTO tblKeywords (category, keywords) VALUES (" . $this->_id . ", '$keywords')"; $queryStr = "INSERT INTO tblKeywords (category, keywords) VALUES (" . $this->_id . ", '$keywords')";
return $db->getResult($queryStr); return $db->getResult($queryStr);
} }
function removeKeywordList($listID) { function removeKeywordList($listID) {
GLOBAL $db; $db = $this->_dms->getDB();
$queryStr = "DELETE FROM tblKeywords WHERE id = $listID"; $queryStr = "DELETE FROM tblKeywords WHERE id = $listID";
return $db->getResult($queryStr); return $db->getResult($queryStr);
} }
function remove() { function remove() {
GLOBAL $db; $db = $this->_dms->getDB();
$queryStr = "DELETE FROM tblKeywords WHERE category = " . $this->_id; $queryStr = "DELETE FROM tblKeywords WHERE category = " . $this->_id;
if (!$db->getResult($queryStr)) if (!$db->getResult($queryStr))

View File

@ -1,23 +1,29 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Abstract class of notifation system
// Copyright (C) 2006-2008 Malcolm Cowe *
// Copyright (C) 2010 Uwe Steinmann * @category DMS
// * @package LetoDMS
// This program is free software; you can redistribute it and/or modify * @license GPL 2
// it under the terms of the GNU General Public License as published by * @version @version@
// the Free Software Foundation; either version 2 of the License, or * @author Uwe Steinmann <uwe@steinmann.cx>
// (at your option) any later version. * @copyright Copyright (C) 2002-2005 Markus Westphal,
// * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
// This program is distributed in the hope that it will be useful, * 2010 Uwe Steinmann
// but WITHOUT ANY WARRANTY; without even the implied warranty of * @version Release: @package_version@
// 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.
/**
* Abstract class of notification systems
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/
abstract class LetoDMS_Notify { abstract class LetoDMS_Notify {
/* User sending the notification /* User sending the notification
* Will only be used if the sender of one of the notify methods * Will only be used if the sender of one of the notify methods

View File

@ -1,27 +1,27 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Implementation of the user object in the document management system
// Copyright (C) 2006-2008 Malcolm Cowe *
// Copyright (C) 2010 Uwe Steinmann * @category DMS
// * @package LetoDMS
// This program is free software; you can redistribute it and/or modify * @license GPL 2
// it under the terms of the GNU General Public License as published by * @version @version@
// the Free Software Foundation; either version 2 of the License, or * @author Uwe Steinmann <uwe@steinmann.cx>
// (at your option) any later version. * @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
// * 2010 Uwe Steinmann
// This program is distributed in the hope that it will be useful, * @version Release: @package_version@
// 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.
/**********************************************************************\
| User-Klasse |
\**********************************************************************/
/**
* Class to represent a user in the document management system
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/
class LetoDMS_User { class LetoDMS_User {
var $_id; var $_id;
var $_login; var $_login;

View File

@ -1,22 +1,21 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Implementation of database access
// Copyright (C) 2006-2008 Malcolm Cowe *
// * @category DMS
// This program is free software; you can redistribute it and/or modify * @package LetoDMS
// it under the terms of the GNU General Public License as published by * @license GPL 2
// the Free Software Foundation; either version 2 of the License, or * @version @version@
// (at your option) any later version. * @author Uwe Steinmann <uwe@steinmann.cx>
// * @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
// This program is distributed in the hope that it will be useful, * 2010 Matteo Lucarelli, 2010 Uwe Steinmann
// but WITHOUT ANY WARRANTY; without even the implied warranty of * @version Release: @package_version@
// 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.
/**
* Include the adodb database abstraction
* FIXME: use $settings here should be remove some time
*/
if(isset($settings->_ADOdbPath)) if(isset($settings->_ADOdbPath))
require_once $settings->_ADOdbPath . "adodb/adodb.inc.php"; require_once $settings->_ADOdbPath . "adodb/adodb.inc.php";
else else

View File

@ -1,23 +1,29 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Implementation of various file system operations
// Copyright (C) 2006-2008 Malcolm Cowe *
// Copyright (C) 2010 Matteo Lucarelli * @category DMS
// * @package LetoDMS
// This program is free software; you can redistribute it and/or modify * @license GPL 2
// it under the terms of the GNU General Public License as published by * @version @version@
// the Free Software Foundation; either version 2 of the License, or * @author Uwe Steinmann <uwe@steinmann.cx>
// (at your option) any later version. * @copyright Copyright (C) 2002-2005 Markus Westphal,
// * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
// This program is distributed in the hope that it will be useful, * 2010 Uwe Steinmann
// but WITHOUT ANY WARRANTY; without even the implied warranty of * @version Release: @package_version@
// 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.
/**
* Class to represent a user in the document management system
*
* @category DMS
* @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010 Uwe Steinmann
* @version Release: @package_version@
*/
class LetoDMS_File { class LetoDMS_File {
function renameFile($old, $new) { function renameFile($old, $new) {
return @rename($old, $new); return @rename($old, $new);

View File

@ -30,3 +30,4 @@ class LetoDMS_Version {
return $this->_string .", ". $this->_number; return $this->_string .", ". $this->_number;
} }
} }
?>