Source for file DBMS_FIELD_ADRSELECT.phpclass

Documentation is available at DBMS_FIELD_ADRSELECT.phpclass

  1. <?php
  2. /**
  3.   * Class file DBMS_FIELD_ADRSELECT.phpclass
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    dbms_field
  7.   * @category   int
  8.   *
  9.   * @author     Peter Krebs <pitlinz@users.sourceforge.net>
  10.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  11.   *
  12.   * @since pk-06-01-17
  13.   * @version $Id: DBMS_FIELD_ADRSELECT.phpclass,v 1.5 2008/04/29 23:27:10 pitlinz Exp $
  14.   */
  15.  
  16. global $OCSP_CONF;
  17.  
  18. require_once dirname(__FILE___OCSP_DIRSEP_ "DBMS_FIELD_FOREIGNKEY.phpclass";
  19.  
  20. /**
  21.   * Class file DBMS_FIELD_ADRSELECT.phpclass
  22.   *
  23.   * @project    Open CSP-Management
  24.   * @package    dbms_field
  25.   * @category   int
  26.   *
  27.   * @author     Peter Krebs <pitlinz@users.sourceforge.net>
  28.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  29.   * 
  30.   * @since      pk-06-01-17
  31.   * @version $Id: DBMS_FIELD_ADRSELECT.phpclass,v 1.5 2008/04/29 23:27:10 pitlinz Exp $
  32.   * 
  33.   */
  34.     extends DBMS_FIELD_FOREIGNKEY 
  35. {
  36.     /**
  37.       * source file of the class
  38.       *
  39.       * @var string $classSrcFile 
  40.       * @since pk-05-01-20
  41.       */
  42.     protected $classSrcFile        = __FILE__;
  43.         
  44.     /**
  45.      * @var string $lookupTable 
  46.      * @access protected
  47.      * @see DBMS_FIELD_DBLOOKUPSELECT
  48.      */    
  49.     protected $lookupTable        = "T_ADDRESS";
  50.     
  51.     /**
  52.      * @var string $lookupShowField 
  53.      * @access protected
  54.      * @see DBMS_FIELD_DBLOOKUPSELECT
  55.      */    
  56.     protected $lookupShowField    = "CONCAT(IFNULL(CONCAT(ADR_STREET,', '),''),IFNULL(CONCAT(ADR_COUNTRY,'-'),''),ADR_ZIP,' ',ADR_CITY)";
  57.     
  58.     /**
  59.      * @var string $lookupField 
  60.      * @access protected
  61.      * @see DBMS_FIELD_DBLOOKUPSELECT
  62.      */    
  63.     protected $lookupField        = "ADR_ID";
  64.     
  65.     /**
  66.      * @var string $lookupSort command string after 'ORDER BY' if empty
  67.      * @access protected
  68.      * @see DBMS_FIELD_DBLOOKUPSELECT
  69.      */
  70.     protected $lookupSort          = "ADR_COUNTRY,ADR_CITY";
  71.     
  72.     
  73.     protected $allowNullSelect    = FALSE;
  74.  
  75.  
  76.     /**
  77.      * returns an array of field to bie shown in the edit form
  78.      * by using editTbl_echoForm
  79.      *
  80.      * the array is in the form:
  81.      *
  82.      * <code>
  83.      * [_sectionName_]
  84.      *      [TITLE] -> string
  85.      *      [_rowName_]
  86.      *         [FLDLAB]  (complete html code with <td></td>)
  87.      *         [FLDVAL] (complete html code with <td></td>)
  88.      * </code>
  89.      *
  90.      * @param boolean $debug 
  91.      *
  92.      * @returns array
  93.      *
  94.      * @since pk-06-04-26
  95.      * @version pk-06-04-29
  96.      *
  97.      */
  98.     function editTbl_getFieldEditArr($debug=FALSE
  99.     {
  100.  
  101.         if (empty($this->lookupTable))        $this->lookupTable = "T_ADDRESS";    
  102.         if (empty($this->lookupShowField))     $this->lookupShowField="CONCAT(IFNULL(CONCAT(ADR_STREET,', '),''),IFNULL(CONCAT(ADR_COUNTRY,'-'),''),ADR_ZIP,' ',ADR_CITY)";
  103.         if (empty($this->lookupSort))         $this->lookupSort="CLI_ID,ADR_ISPRIMARY DESC,ADR_COUNTRY,ADR_CITY";
  104.         if (empty($this->whereAnd))          $this->whereAnd ="(CLI_ID=0 OR CLI_ID='$*CLI_ID$' OR CLI_ID='$^CLI_ID$')";
  105.         if (empty($this->lookupField))      $this->lookupField ="ADR_ID";
  106.         
  107.         $arr_ret parent::editTbl_getFieldEditArr($debug);
  108.         return $arr_ret;
  109.     }
  110. }
  111. ?>

Documentation generated on Thu, 08 Jan 2009 17:40:30 +0100 by phpDocumentor 1.4.0a2