Source for file DBMS_FIELD_LINUXTIMESTAMP.phpclass
Documentation is available at DBMS_FIELD_LINUXTIMESTAMP.phpclass
* Class file DBMS_FIELD_LINUXTIMESTAMP.phpclass
* @project Open CSP-Management
* @author Peter Krebs (pk)<p.krebs@lvus.at>
* @copyright (c) 2002-2005 by LVUS <http://opencsp.lvu.at>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
require_once __OCSP_PHPINCPATH__.
"common".
_OCSP_DIRSEP_.
"OCSP_DATE.phpclass";
require_once dirname(__FILE__
).
_OCSP_DIRSEP_.
"DBMS_FIELD_DATE.phpclass";
* @project Open CSP-Management
* @author Peter Krebs (pk)<p.krebs@lvus.at>
* @copyright (c) 2002-2005 by LVUS <http://opencsp.lvu.at>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* source file of the class
* @var string $classSrcFile
* 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>)
* NOTE as this is not implemented in the whole classTree at the moment ensure all parents use
* editTbl_echoForm() in theire editTblForm otherwise you'll get a mismatch of field order
$a_ret['SHOW']['SHOWDATE']=
array(
'FLDLAB'=>
"Datum anzeigen:",
'FLDVAL'=>
"<input name=\"SHOWDATE\" type=\"checkbox\" ".
($this->showDate ?
"checked=\"checked\"" :
"").
" value=\"1\" /> "
$a_ret['SHOW']['SHOWTIME']=
array(
'FLDLAB'=>
"Zeit anzeigen:",
'FLDVAL'=>
"<input name=\"SHOWTIME\" type=\"checkbox\" ".
($this->showTime ?
"checked=\"checked\"" :
"").
" value=\"1\" /> "
* returns the html code for the field value input / show
* adds $this->myName to ${$this->myDataArrName}['_DBMS_FIELDS']
function getFieldTag($mode,$aValue=NULL,$debug=FALSE) {
$debug=($debug || $this->fldDebug);
if ($debug) echo "<p><b>DBMS_FIELD_LINUXTIMESTAMP::getFieldTag($mode,$aValue,...)</b> (".get_class($this).")</p>";
if ((doubleval($aValue)) && (!strstr($aValue,"-"))) {
$aDate->setLinuxTime($aValue);
return parent::getFieldTag($mode,$aDate->dateStr("Y-m-d H:i:s"));
return parent::getFieldTag($mode,$aValue,$arrName);
if ($debug) echo
"<p>Date: ".
$aDate->dateStr("Y-m-d H:i:s").
"</p>";
return parent::getScreenValue($aDate->dateStr("Y-m-d H:i:s"),$arrName,$debug);
* returns the field value
* @param string $aValue the value
* @param array $err error array
* @param string $arrName DBVAL
function getValue($aValue,&$err,$arrName=
"DBVAL",$debug=
FALSE) {
if ($debug) echo
"<hr><p><b>DBMS_FIELD_LINUXTIMESTAMP::getValue($aValue,$err,$arrName,$debug)</b> (".
get_class($this).
"/".
$this->myName.
")</p>";
$aDate->setFromArray($aValue);
if (($aDate->isNULL()) &&
(!$this->allowNull())) {
return $aDate->getLinuxTimeStamp();
if ((empty($aValue)) &&
(strval($aValue) !==
"0") &&
(!$this->allowNull)) {
$err[$this->myName]['MSG']=
"NULL_NOT_ALLOWED";
* returns the value with slashes create use in a db statement
* @param string $aValue the value
* @param array $err error array
* @param string $arrName DBVAL
* @version pk-03-12-13 use $this->getValue to check the Value
function slashedValue($aValue,&$err,$arrName=
"DBVAL",$debug=
FALSE) {
if ($debug) echo
"<hr><p><b>DBMS_FIELD_LINUXTIMESTAMP::slashedValue($aValue,$err,$arrName,$debug)</b> (".
get_class($this).
"/".
$this->myName.
")</p>";
return $this->getValue($aValue,$err,$arrName,$debug);
Documentation generated on Thu, 08 Jan 2009 17:42:17 +0100 by phpDocumentor 1.4.0a2