Source for file DBMS_FIELD_GROUPSELECT.phpclass
Documentation is available at DBMS_FIELD_GROUPSELECT.phpclass
* Class file DBMS_FIELD_GROUPSELECT.phpclass
* @project Open CSP-Management
* @author Peter Krebs <p.krebs@lvus.at>
* @copyright (c) 2002-2005 by LVUS <http://www.lvus.at>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: DBMS_FIELD_GROUPSELECT.phpclass,v 1.6 2008/06/05 08:38:53 pitlinz Exp $
* Class DBMS_FIELD_GROUPSELECT
* @project Open CSP-Management
* @author Peter Krebs <p.krebs@lvus.at>
* @copyright (c) 2002-2005 by LVUS <http://www.lvus.at>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: DBMS_FIELD_GROUPSELECT.phpclass,v 1.6 2008/06/05 08:38:53 pitlinz Exp $
* source file of the class
* @var string $classSrcFile
* @var stirng $loggedInLabel Screen/List Value of Group with ID: $GLOBALS['GROUPS']['LOGGEDIN']
* @var stirng $notLoggedInLabel Screen/List Value of Group with ID: $GLOBALS['GROUPS']['NOTLOGGEDIN']
* @var boolean $withoutSystemGroups do not add groups with id < 0
* @var boolean $selfselectGrpsOnly only show groups which are selfselectable by the user
* @var boolean $requireMember current user must be member of the selected group
* @var boolean $requireAdmin current user must be admin of the selected group
* @var boolean $showAsTree show the groups as tree
// ###########################################################
// OBJECT SETTINGS METHODS
// ###########################################################
* 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>)
unset
($a_ret['SELECT']['FLD_MULTISEL']);
unset
($a_ret['VALCHECKS']['FLDNULLTOZERO']);
unset
($a_ret['VALCHECKS']['FLD_EMPTYSELECT']);
unset
($a_ret['VALCHECKS']['FLD_FRMRELOAD']);
unset
($a_ret['SELECT']['FLD_LSTVALS']);
unset
($a_ret['SELECT']['FLD_LSTVALISHTML']);
* save the posted fielddefinition
$this->requireMember =
((isset
($_POST['requireMember']) &&
intval($_POST['requireMember'])) ?
TRUE :
FALSE);
$this->requireAdmin =
((isset
($_POST['requireAdmin']) &&
intval($_POST['requireAdmin'])) ?
TRUE :
FALSE);
$this->withoutSystemGroups =
((isset
($_POST['withoutSystemGroups']) &&
intval($_POST['withoutSystemGroups'])) ?
TRUE :
FALSE);
$this->selfselectGrpsOnly =
((isset
($_POST['selfselectGrpsOnly']) &&
intval($_POST['selfselectGrpsOnly'])) ?
TRUE :
FALSE);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* populates $this->myValues array from OCSP_GROUPTREE
$arr_groups =
$obj_grpTree->getUserGroupTreeArray($debug);
foreach($arr_groups as $str_id =>
$arr_grp)
$this->myValues[$arr_grp['ROW']['GRP_ID']] =
$arr_grp['TREEIDX'] .
" " .
$arr_grp['ROW']['GRP_NAME'] .
"*";
} else if ($arr_grp['MEMBER']) {
$this->myValues[$arr_grp['ROW']['GRP_ID']] =
$arr_grp['TREEIDX'] .
" " .
$arr_grp['ROW']['GRP_NAME'];
$this->myValues[$arr_grp['ROW']['GRP_ID']] =
"[" .
$arr_grp['TREEIDX'] .
" " .
$arr_grp['ROW']['GRP_NAME'] .
"]";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* 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}
function getValue($aValue,&$err,$arrName=
"DBVAL",$debug=
FALSE) {
if ($debug) echo
"<p><b>DBMS_FIELD_GROUPSELECT::getValue($aValue,$err,$arrName,$debug)</b> (".
get_class($this).
" | ".
$this->myName.
")</p>";
return parent::getValue($aValue,$err,$arrName,$debug=
FALSE);
* returns the screen repesantation of the key (not the key !!!)
if ($debug) echo
"<p><b>DBMS_FIELD_GROUPSELECT::getScreenValue($aValue,$arrName,...)</b> (".
get_class($this).
" | ".
$this->myName.
")</p>";
if (intval($aValue) ==
$GLOBALS['GROUPS']['NOTLOGGEDIN']) return $this->notloggedInLabel;
Documentation generated on Thu, 08 Jan 2009 17:41:46 +0100 by phpDocumentor 1.4.0a2