Source for file DBMS_FIELD_CLI_FILESELECTLIST.phpclass

Documentation is available at DBMS_FIELD_CLI_FILESELECTLIST.phpclass

  1. <?php
  2. /**
  3.   * Class file DBMS_FIELD_CLI_FILESELECTLIST.phpclass
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    dbms_field
  7.   * @category   string
  8.   *
  9.   * @author     Peter Krebs <p.krebs@amicas.at>
  10.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  11.   *
  12.   ***/
  13.  
  14. require_once $GLOBALS['OCSP']['DBMSFLD_PATH']."DBMS_FIELD_FILESELECTLIST.phpclass";
  15.  
  16. /**
  17.   * Class DBMS_FIELD_CLI_FILESELECTLIST
  18.   *
  19.   * handles file upload
  20.   *
  21.   * @author     Peter Krebs <p.krebs@amicas.at>
  22.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  23.   *
  24.   * @version pk-05-06-24
  25.   *
  26.   ***/
  27.  
  28.     // ###########################################################
  29.     // OBJECT (CONST) VAR DECLARATION
  30.     // ###########################################################
  31.  
  32.     var $className       = "ClientFileListSelect";
  33.  
  34.     // overwrite parent definitions
  35.  
  36.     /**
  37.       * source file of the class
  38.       *
  39.       * @var string $classSrcFile 
  40.       * @since pk-04-10-05
  41.       ***/
  42.     var $classSrcFile=__FILE__;
  43.  
  44.  
  45.     // ###########################################################
  46.     // OBJECT SETTINGS METHODS
  47.     // ###########################################################
  48.  
  49.     /**
  50.       * returns an array of field to bie shown in the edit form
  51.       * by using editTbl_echoForm
  52.       *
  53.       * the array is in the form:
  54.       *
  55.       * <code>
  56.       * [_sectionName_]
  57.       *      [TITLE] -> string
  58.       *      [_rowName_]
  59.       *         [FLDLAB]  (complete html code with <td></td>)
  60.       *         [FLDVAL] (complete html code with <td></td>)
  61.       * </code>
  62.       *
  63.       * @param boolean $debug 
  64.       *
  65.       * @returns array
  66.       *
  67.       * @since pk-06-07-28
  68.       *
  69.       ***/
  70.     function editTbl_getFieldEditArr($debug=FALSE{
  71.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_DBSELECTLIST::editTbl_getFieldEditArr","",0);
  72.         $a_ret=parent::editTbl_getFieldEditArr($debug);
  73.         $a_ret['SELECT']['FLD_ROOTDIR']['FLDVAL'].="/CLI\$*CLI_ID\$";
  74.         return $a_ret;
  75.     }
  76.  
  77.     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  78.     // file methods
  79.     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80.  
  81.     /**
  82.       * returns the rootDir
  83.       *
  84.       * @return string 
  85.       *
  86.       * @since pk-05-09-23
  87.       ***/
  88.     function getRootPath($debug=False)
  89.     {
  90.         if ($this->useDocRoot{
  91.             $rootPath=str_replace("//","/",$_SERVER['DOCUMENT_ROOT']."/".$this->rootDir."/");
  92.         else {
  93.             $rootPath=str_replace("//","/",$GLOBALS['OCSP']['PATH'].$this->rootDir."/");
  94.         }
  95.         
  96.         if (!empty($this->myDataArrName)) {
  97.             $arrName=$this->myDataArrName;
  98.             global ${$arrName};
  99.             if (isset(${$arrName}['CLI_ID']&& intval(${$arrName}['CLI_ID'])) {
  100.                 $rootPath.="CLI_".intval(${$arrName}['CLI_ID']);
  101.             else if (isset($_POST['CLI_ID']&& intval($_POST['CLI_ID'])) {
  102.                 $rootPath.="CLI_".intval($_POST['CLI_ID']);
  103.             else if (isset($_GET['CLI_ID']&& intval($_GET['CLI_ID'])) {
  104.                 $rootPath.="CLI_".intval($_GET['CLI_ID']);
  105.             }
  106.             if (!is_dir($rootPath)) {
  107.                 
  108.             }
  109.         }
  110.         
  111.         
  112.         require_once $GLOBALS['OCSP']['PHPINCPATH']."common/pcf_directory.phpinc";
  113.         
  114.  
  115.         return $rootPath;
  116.     }
  117.  
  118.  
  119.     // ###########################################################
  120.     // FIELD DEFINITION DATA METHODS
  121.     // ###########################################################
  122.  
  123.  
  124. // end class DBMS_FIELD_ARRSELECTLIST
  125. ?>

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