Source for file DBMS_FIELD_HTMLSOURCE.phpclass
Documentation is available at DBMS_FIELD_HTMLSOURCE.phpclass
* Class file DBMS_FIELD_HTMLSOURCE.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_HTMLSOURCE.phpclass,v 1.2 2008/08/08 02:00:42 pitlinz Exp $
* Class DBMS_FIELD_HTMLSOURCE
* @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_HTMLSOURCE.phpclass,v 1.2 2008/08/08 02:00:42 pitlinz Exp $
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* @constant string CLASS_SRC_FILE
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** class vars ------------------------------------------------------ */
/*** class methods --------------------------------------------------- */
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** compostion --------------------------------------------------- */
/*** attributes --------------------------------------------------- */
* overwrite parent::$isSearchable to False
* @var boolean $isSearchable
* overwrite parent::$allowHTML to True
* @var boolean $allowHTML
* 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>)
if (empty($this->helpUrl)) $this->helpUrl=
"/system/help/templatevars.html";
unset
($a_ret['LAYOUT']['FLDNL2BR']);
unset
($a_ret['LAYOUT']['FLD_INPUTADD']);
* saves the field definition from $_POST array
* returns a string with the HTML input-tag for the field
* @param string $aValue the value to show
* @param string $arrName name of the form array used in name=
* @version pk-03-11-27 layout changed
$tag .=
"<a href=\"#\" onClick=\"\n";
$tag .=
"\turl=prompt('Link:','http://');\n";
$tag .=
"\tif (url != '') {\n";
$tag .=
"\t textAreaLinkSelection('".
$this->getMyFormName().
"','".
$arrName.
"[".
$this->myName.
"]',url);\n";
$tag .=
"\t}\"><img src=\"".
OCSP_CONF::getInstance()->getValue('SYSIMGURL').
"/icons-16x16/www.gif\" border=\"0\" class=\"button\"></a>";
$tag .=
"<a href=\"#\" onClick=\"\n";
$tag .=
"\t textAreaAddTagToSelection('".
$this->getMyFormName().
"','".
$arrName.
"[".
$this->myName.
"]','<b>','</b>');\n";
$tag .=
"\t}\"><img src=\"".
OCSP_CONF::getInstance()->getValue('SYSIMGURL').
"/icons-16x16/text_bold.gif\" border=\"0\" alt=\"\" title=\"bold\" class=\"button\"></a>";
$tag .=
"<a href=\"#\" onClick=\"\n";
$tag .=
"\t textAreaAddTagToSelection('".
$this->getMyFormName().
"','".
$arrName.
"[".
$this->myName.
"]','<u>','</u>');\n";
$tag .=
"\t}\"><img src=\"".
OCSP_CONF::getInstance()->getValue('SYSIMGURL').
"/icons-16x16/text_under.gif\" border=\"0\" alt=\"\" title=\"underline\" class=\"button\"></a>";
$tag .=
"<a href=\"#\" onClick=\"\n";
$tag .=
"\t textAreaAddTagToSelection('".
$this->getMyFormName().
"','".
$arrName.
"[".
$this->myName.
"]','<i>','</i>');\n";
$tag .=
"\t}\"><img src=\"".
OCSP_CONF::getInstance()->getValue('SYSIMGURL').
"/icons-16x16/text_italic.gif\" border=\"0\" alt=\"\" title=\"italic\" class=\"button\"></a>";
$tag .=
"<br /><textarea ";
$tag .=
"name=\"$arrName".
"[".
$this->myName.
"]\" ";
$tag .=
"rows=\"".
$this->rows.
"\" cols=\"".
$this->cols.
"\" ";
$tag .=
"wrap=\"".
$this->wrap.
"\" ";
* returns the value with slashes create use in a db statement
* do some textreplaces before - because the editors always adds the
* url - to avoid jumping into a test system
* calls parent::slashedValue()
* @param string $aValue the value
* @param array $err error array
* @param string $arrName DBVAL
* @version pk-03-11-27 DB-Object used instead of DB_.. function
function getValue($aValue,&$err,$arrName=
"DBVAL",$debug=
False) {
if ((!empty($aValue)) &&
($this->replaceServer)) {
$aValue=
str_replace("http://".
$_SERVER['SERVER_NAME'],"",$aValue);
return parent::getValue($aValue,$err,$arrName,$debug);
* returns the value with slashes create use in a db statement
* do some textreplaces before - because the editors always adds the
* url - to avoid jumping into a test system
* calls parent::slashedValue()
* @param string $aValue the value
* @param array $err error array
* @param string $arrName DBVAL
* @version pk-03-11-27 DB-Object used instead of DB_.. function
function slashedValue($aValue,&$err,$arrName=
"DBVAL",$debug=
False) {
if ($debug) echo
"<hr><p><b>DBMS_FIELD_HTMLSOURCE::slashedValue($aValue,$err,$arrName,$debug)</b> (".
get_class($this).
"/".
$this->myName.
")</p>";
return $GLOBALS[$this->getGlobalDBObjIdx()]->qs_getSlashedValue($this->getValue($aValue,$err,$arrName,$debug));
} // end class DBMS_FIELD_SQLSTATEMENT
Documentation generated on Thu, 08 Jan 2009 17:41:53 +0100 by phpDocumentor 1.4.0a2