예제 #1
0
 private function setTableFields()
 {
     try {
         if ($this->props['is_system']) {
             $this->readConfig();
         } else {
             $this->readDBConfig();
         }
     } catch (Exception $e) {
         echo CUtils::showError($e->getMessage());
     }
     if ($this->props['is_sort']) {
         $this->fields['ord'] = array('name' => 'ord', 'title' => 'Сорт.', 'type' => 'number', 'width' => '5%', 'defvalue' => '500', 'group_update' => true);
     }
     if ($this->props['is_publish']) {
         $this->fields['publish'] = array('name' => 'publish', 'title' => 'Акт.', 'type' => 'checkbox', 'search' => true, 'group_update' => true, 'width' => '1%');
     }
     if ($this->props['is_lang']) {
         $this->fields['lang'] = array('name' => 'lang', 'title' => 'Язык', 'type' => 'string', 'readonly' => true);
     }
     $this->fields['credate'] = array('name' => 'credate', 'title' => 'Дата создания', 'type' => 'datetime', 'readonly' => true);
     $this->fields['change_date'] = array('name' => 'change_date', 'title' => 'Дата изменения', 'type' => 'datetime', 'readonly' => true);
     foreach ($this->fields as $k => $f) {
         $this->fields[$k]['cls'] = $this->getDBTableName();
     }
 }
예제 #2
0
 function callMethod($sComponentName = 'tree', $sMethodName = 'index', $aParams = array())
 {
     try {
         return $this->callMethodInstance($this->getMethodInstance($sComponentName, $sMethodName), $aParams);
     } catch (Exception $e) {
         echo CUtils::showError($e->getMessage());
         exit;
     }
 }