Source for file DBMS_FIELD_DBRADIOSELECT.phpclass
Documentation is available at DBMS_FIELD_DBRADIOSELECT.phpclass
  * Class file DBMS_FIELD_DBRADIOSELECT.phpclass  
  * @project    Open CSP-Management  
  * @author     Peter Krebs <p.krebs@lvus.at>  
  * @copyright  © 2002-2005 by Peter Krebs and Landesverlag Unternehmensservice  
  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License  
if (empty($GLOBALS['OCSP']['PHPFORMPATH'])) $GLOBALS['OCSP']['PHPFORMPATH']=
dirname(__FILE__
).
"/";  
    require_once dirname(__FILE__
).
"/DBMS_FIELD_RADIOSELECT.phpclass";  
  * Class DBMS_FIELD_DBRADIOSELECT  
  * @project    Open CSP-Management  
  * @author     Peter Krebs <p.krebs@lvus.at>  
  * @copyright  © 2002-2005 by Peter Krebs and Landesverlag Unternehmensservice  
  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License  
    // ###########################################################  
    // OBJECT (CONST) VAR DECLARATION  
    // ###########################################################  
       * a sql query to get data array  
       * allow not selecting an entry  
       * if $this->allowNullSelect = TRUE and $this->allowNull is false 0 is returned  
       * @param bool $allowNullSelect   
      * source file of the class  
      * @var string $classSrcFile   
    // ###########################################################  
    // 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>)  
        $a_ret['SELECT']['FLD_LSTVALS']=
NULL;  
        $a_ret['SELECT']['FLD_LSTQUERY']=
array(  
            'FLDLAB'=>
"Query (SELECT KEY,VALUE ..)",  
            'FLDVAL'=>
"<textarea name=\"SELECTQUERY\" cols=\"40\" rows=\"5\" wrap=\"off\">".
htmlspecialchars($this->query).
"</textarea>"  
      * echos the filed definition form  
      * @param boolean $showSize  
      * @param boolean $showNull  
      * @param boolean $showValueList  
      * @version pk-05-11-25 bugfix  
     function editTblForm($showSize=FALSE,$showNull=TRUE,$showValueList=FALSE) {  
        parent::editTblForm($showSize,$showNull,$showValueList);  
        if ($this->className == "RadioDBSelect") {  
            echo "<tr><td class=\"fldName\">Query (SELECT KEY,VALUE ..):</td>";  
            echo "<td class=\"fldValue\">";  
            echo "<textarea name=\"SELECTQUERY\" cols=\"40\" rows=\"5\" wrap=\"off\">";  
            echo htmlspecialchars($this->query); // <pk-05-11-25 /> htmlspecialchars added  
            echo "</textarea></td><tr>\n";  
        echo "<tr><td class=\"fldName\">NULL Werte:</td>";  
        echo "<td class=\"fldValue\">";  
        echo "<input name=\"allowNullSelect\" type=\"checkbox\" ".($this->allowNullSelect ? "checked" : "")." value=\"1\"> NULL Werte zulassen";  
        echo "<tr><td class=\"fldName\">NULL Label:</td>";  
        echo "<td class=\"fldValue\">";  
        echo "<input name=\"nullLabel\" value=\"".$this->nullLabel."\" size=\"40\">";  
      * save the filed definition form  
        $this->query            =
$GLOBALS[$this->getGlobalDBObjIdx()]->checkQuery($_POST['SELECTQUERY'],PQT_SELECT);  
        $this->myValues         =
NULL;  // make sure that is has no entries from historical class changes  
    // ###########################################################  
    // ###########################################################  
      * sets populates $this->myValues array from the database  
        if ($debug) echo 
"<p><b>DBMS_FIELD_DBRADIOSELECT::setMyValues($arrName)</b> (".
get_class($this).
")</p><blockquote>\n";  
        if (!is_object($GLOBALS[$this->getGlobalDBObjIdx()])) {  
           $objcmd = 
"\$DBOBJ = new DB_".
$GLOBALS['PROJECT']['DBTYPE'].
";";  
           $DBOBJ->publicConnect($GLOBALS['PROJECT']['DBCONF']);  
           $dbVals=
$DBOBJ->queryArray($this->query,0,1);  
            $dbVals=
$GLOBALS['USRDB']->queryArray($this->query,0,1);  
        if (!is_array($dbVals)) $dbVals=
array("NULL"=>
"keine Datensätzegefunden");  
    // ###########################################################  
    // OBJECT HTML FORM METHODS  
    // ###########################################################  
    // ###########################################################  
    // ###########################################################  
    // ###########################################################  
    // OBJECT HTML FORM METHODS  
    // ###########################################################  
    // ###########################################################  
    // OBJECT VALUE CHECK METHODS  
    // ###########################################################  
} // end class DBMS_FIELD_DBRADIOSELECT  
 
 
	
		Documentation generated on Thu, 08 Jan 2009 17:41:16 +0100 by phpDocumentor 1.4.0a2