function ViewDatabaseImageField($field, $container, $pageobject)
 {
     parent::ViewControl($field, $container, $pageobject);
     $this->showThumbnails = $container->pSet->showThumbnail($this->field);
     if ($this->showThumbnails) {
         $this->thumbWidth = $container->pSet->getThumbnailWidth($this->field);
         $this->thumbHeight = $container->pSet->getThumbnailHeight($this->field);
     }
 }
 public function ViewLookupWizardField($field, $container, $pageObject)
 {
     parent::ViewControl($field, $container, $pageObject);
     $this->lookupPSet = null;
     $this->cipherer = null;
     $this->lookupQueryObj = null;
     $this->displayFieldIndex = 0;
     $this->linkFieldIndex = 1;
     $this->LookupSQL = "";
     if ($this->container->pSet->getEditFormat($field) != EDIT_FORMAT_LOOKUP_WIZARD) {
         $this->pSet = new ProjectSettings($this->container->pSet->_table);
         //	set view page
         $this->pSet->setPage($this->container->pageType);
         //	set edit page
         $this->pSet->setPage($this->container->pSet->getPageTypeByFieldEditFormat($field, EDIT_FORMAT_LOOKUP_WIZARD));
     } else {
         $this->pSet = $this->container->pSet;
     }
     $this->nLookupType = $this->pSet->getLookupType($this->field);
     $this->lookupTable = $this->pSet->getLookupTable($this->field);
     $this->setLookupConnection();
     $this->displayFieldName = $this->pSet->getDisplayField($this->field);
     $this->linkFieldName = $this->pSet->getLinkField($this->field);
     $this->linkAndDisplaySame = $this->displayFieldName == $this->linkFieldName;
     if ($this->nLookupType == LT_QUERY) {
         $this->lookupPSet = new ProjectSettings($this->lookupTable, $this->container->pageType);
         $this->cipherer = new RunnerCipherer($this->lookupTable);
         $this->lookupQueryObj = $this->lookupPSet->getSQLQuery()->CloneObject();
         if ($this->pSet->getCustomDisplay($this->field)) {
             $this->lookupQueryObj->AddCustomExpression($this->displayFieldName, $this->lookupPSet, $this->pSet->_table, $this->field);
         }
         $this->lookupQueryObj->ReplaceFieldsWithDummies($this->lookupPSet->getBinaryFieldsIndices());
         $lookupIndexes = GetLookupFieldsIndexes($this->pSet, $this->field);
         $this->displayFieldIndex = $lookupIndexes["displayFieldIndex"];
         $this->linkFieldIndex = $lookupIndexes["linkFieldIndex"];
     } else {
         $this->cipherer = new RunnerCipherer($this->pSet->_table);
         $this->LookupSQL = "SELECT ";
         $this->LookupSQL .= RunnerPage::sqlFormattedDisplayField($this->field, $this->lookupConnection, $this->pSet);
         $this->LookupSQL .= ", " . $this->lookupConnection->addFieldWrappers($this->pSet->getLinkField($this->field));
         $this->LookupSQL .= " FROM " . $this->lookupConnection->addTableWrappers($this->lookupTable) . " WHERE ";
     }
     $this->localControlsContainer = new ViewControlsContainer($this->pSet, $this->container->pageType, $pageObject);
     $this->localControlsContainer->isLocal = true;
 }
Exemplo n.º 3
0
 function ViewFileField($field, $container, $pageobject)
 {
     parent::ViewControl($field, $container, $pageobject);
     $this->initUploadHandler();
 }