- more documentation

This commit is contained in:
steinm 2010-12-06 20:00:18 +00:00
parent 71dca9ee69
commit 42e640a0f1
4 changed files with 130 additions and 83 deletions

View File

@ -1,28 +1,42 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Some definitions for access control
// 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 Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
// * @copyright Copyright (C) 2002-2005 Markus Westphal,
// This program is distributed in the hope that it will be useful, * 2006-2008 Malcolm Cowe, 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.
define("M_ANY", -1); //Used to indicate that a search should return all /**
// results in the ACL table. See Folder::getAccessList(). * Used to indicate that a search should return all
define("M_NONE", 1); //Keine Rechte * results in the ACL table. See {@link LetoDMS_Folder::getAccessList()}
define("M_READ", 2); //Lese-Recht */
define("M_READWRITE", 3); //Schreib-Lese-Recht define("M_ANY", -1);
define("M_ALL", 4); //Unbeschränkte Rechte
/**
* No rights at all
*/
define("M_NONE", 1);
/**
* Read access only
*/
define("M_READ", 2);
/**
* Read and write access only
*/
define("M_READWRITE", 3);
/**
* Unrestricted access
*/
define("M_ALL", 4);
define ("O_GTEQ", ">="); define ("O_GTEQ", ">=");
define ("O_LTEQ", "<="); define ("O_LTEQ", "<=");

View File

@ -1,21 +1,16 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Do authentication of users and session management
// 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 Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
// * @copyright Copyright (C) 2002-2005 Markus Westphal,
// This program is distributed in the hope that it will be useful, * 2006-2008 Malcolm Cowe, 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.
$refer=urlencode($_SERVER["REQUEST_URI"]); $refer=urlencode($_SERVER["REQUEST_URI"]);
if (!strncmp("/op", $refer, 3)) { if (!strncmp("/op", $refer, 3)) {

View File

@ -1,23 +1,20 @@
<?php <?php
// MyDMS. Document Management System /**
// Copyright (C) 2002-2005 Markus Westphal * Implementation of a document in the document management system
// 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 GPL2
// it under the terms of the GNU General Public License as published by * @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli,
// the Free Software Foundation; either version 2 of the License, or * 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, 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.
/**
* The different states a document can be in
*/
define("S_DRAFT_REV", 0); define("S_DRAFT_REV", 0);
define("S_DRAFT_APP", 1); define("S_DRAFT_APP", 1);
define("S_RELEASED", 2); define("S_RELEASED", 2);
@ -26,26 +23,71 @@ define("S_OBSOLETE", -2);
define("S_EXPIRED", -3); define("S_EXPIRED", -3);
/** /**
* Class to represent a folder in the document management system * Class to represent a document in the document management system
* *
* @category DMS * @category DMS
* @package LetoDMS * @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli, Uwe Steinmann <uwe@steinmann.cx> * @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli,
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, 2010 Uwe Steinmann * 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@ * @version Release: @package_version@
*/ */
class LetoDMS_Document { /* {{{ */ class LetoDMS_Document { /* {{{ */
/**
* @var integer unique id of document
*/
var $_id; var $_id;
/**
* @var string name of document
*/
var $_name; var $_name;
/**
* @var string comment of document
*/
var $_comment; var $_comment;
/**
* @var integer id of user who is the owner
*/
var $_ownerID; var $_ownerID;
/**
* @var integer id of folder this document belongs to
*/
var $_folderID; var $_folderID;
/**
* @var integer timestamp of expiration date
*/
var $_expires; var $_expires;
/**
* @var boolean true if access is inherited, otherwise false
*/
var $_inheritAccess; var $_inheritAccess;
var $_defaultAccess; var $_defaultAccess;
/**
* @var boolean true if document is locked, otherwise false
*/
var $_locked; var $_locked;
/**
* @var string list of keywords
*/
var $_keywords; var $_keywords;
/**
* @var integer position of document within parent folder
*/
var $_sequence; var $_sequence;
/**
* @var object back reference to document management system
*/
var $_dms; var $_dms;
function LetoDMS_Document($id, $name, $comment, $date, $expires, $ownerID, $folderID, $inheritAccess, $defaultAccess, $locked, $keywords, $sequence) { /* {{{ */ function LetoDMS_Document($id, $name, $comment, $date, $expires, $ownerID, $folderID, $inheritAccess, $defaultAccess, $locked, $keywords, $sequence) { /* {{{ */

View File

@ -1,30 +1,26 @@
<?php <?php
// MyDMS. Document Management System
// Copyright (C) 2002-2005 Markus Westphal
// Copyright (C) 2006-2008 Malcolm Cowe
// Copyright (C) 2010 Matteo Lucarelli
//
// 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.
/** /**
* Class to represent the complete document management * Implementation of a folder in the document management system
* *
* @category DMS * @category DMS
* @package LetoDMS * @package LetoDMS
* @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli, Uwe Steinmann <uwe@steinmann.cx> * @license GPL2
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, 2010 Uwe Steinmann * @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 to represent a folder in the document management system
*
* @category DMS
* @package LetoDMS
* @version @version@
* @author 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@ * @version Release: @package_version@
*/ */
class LetoDMS_Folder { class LetoDMS_Folder {