Source for file DBMS_FIELD_CURRENTUSER.phpclass
Documentation is available at DBMS_FIELD_CURRENTUSER.phpclass
* Class file DBMS_FIELD_CURRENTUSER.phpclass
* @project Open CSP-Management
* @author Peter Krebs <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: DBMS_FIELD_CURRENTUSER.phpclass,v 1.7 2008/10/05 20:47:25 pitlinz Exp $
* sets db field to $_SESSION['USER_ID'] on changes or show the Login for the stored id
* the field is always shown in read only modus
* if insert or update is enabled $_SESSION['USER_ID'] is
* returned for an value passed to check
* @project Open CSP-Management
* @author Peter Krebs <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version pk-07-01-09 DBMS_FIELD_INT -> DBMS_FIELD_FOREIGNKEY
* @version $Id: DBMS_FIELD_CURRENTUSER.phpclass,v 1.7 2008/10/05 20:47:25 pitlinz Exp $
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* @constant string CLASS_SRC_FILE
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** class vars ------------------------------------------------------ */
/*** class methods --------------------------------------------------- */
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** compostion --------------------------------------------------- */
/*** attributes --------------------------------------------------- */
* overwrite parent settings
* source file of the class
* @var string $classSrcFile
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* convert old object vars to DBMS_FIELD_DBLOOKUPSELECTLIST
* and then calls the parent method
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* returns an array of field to bie shown in the edit form
* by using editTbl_echoForm
* the array is in the form:
* [FLDLAB] (complete html code with <td></td>)
* [FLDVAL] (complete html code with <td></td>)
if (empty($this->keyField)) $this->keyField=
$this->myName; // <pk-06-11-29 />
unset
($a_ret['DBLOOKUP']);
unset
($a_ret['FTBL_POPUPS']);
* save the filed definition form
* @returns bool <code>parent::save()</code>
function save($debug=
FALSE) {
$ret=
parent::save($debug);
// ###########################################################
// ###########################################################
// ###########################################
* returns the field value if the referenzed row exists
* @param string $aValue the value
* @param array $err error array
* @param string $arrName name of the array to access fieldsarray gloabl ${$arrName}
* @global array $OCSP_OBJ
function getValue($aValue,&$err,$arrName=
"DBVAL",$debug=
FALSE) {
echoDebug(__FILE__
,"<blockquote><pre style=\"font-size:75%\">".
print_r($this->dbDesc,TRUE).
"</pre><p>VALUE: $aValue</p>");
return $OCSP_OBJ['USER']->getId();
return parent::getValue($aValue,$err,$arrName,$debug);
* returns the html code for the readonly field
* if is_array($aValue) a list (<ul>) is returned
if ($debug) echoDebugMethod(__FILE__
,__LINE__
,"DBMS_FIELD_CURRENTUSER::getScreenValue($aValue)",0);
return parent::getScreenValue(abs(intval($aValue)),$arrName,$debug);
Documentation generated on Thu, 08 Jan 2009 17:40:50 +0100 by phpDocumentor 1.4.0a2