예제 #1
0
파일: Users.php 프로젝트: belkov/o3dshop
 function form($row = array())
 {
     $oForm = new ConstructForm(&$this->oSmarty, $this->name);
     $itab = 0;
     $oForm->setField('text', 'email', 'email', true, $itab, $row, null, array(), "EmailConfirm");
     $oForm->setField('text', 'passwd', 'Пароль', true, $itab, $row);
     $oForm->setField('text', 'login', 'Логин', true, $itab, $row);
     $status[0] = array('Title' => 'Заблокирован');
     $status[1] = array('Title' => 'Пользователь');
     $status[2] = array('Title' => 'Администатор');
     if (isset($row['status'])) {
         $status[$row['status']]['Selected'] = "selected";
     }
     $oForm->setField('select', 'status', 'Статус', true, $itab, $row, "", $status);
     $aArr = $oForm->getField($itab);
     $oForm->setFields($aArr, $itab, "Основные");
     return $oForm;
 }
예제 #2
0
파일: Category.php 프로젝트: belkov/o3dshop
 function form($row = array())
 {
     $oForm = new ConstructForm(&$this->oSmarty, $this->name);
     $itab = 0;
     if (!isset($row['categoryID']) || $row['categoryID'] == 0) {
         $row['categoryID'] = '0';
         $row['parent'] = 'нет';
     } else {
         $parent = DB::query_row("SELECT * FROM `category_tb` WHERE `id` = '" . DB::escape($row['categoryID']) . "'");
         $row['parent'] = $parent['name'];
     }
     $oForm->setField('text', 'parent', 'Родитель', !true, $itab, $row, " id = 'parent' ");
     $oForm->setField('hidden', 'categoryID', '', true, $itab, $row, " id = 'parentIDHidden' ");
     $oForm->setField('text', 'name', 'Категория', true, $itab, $row);
     $oForm->setField('fck', 'description', 'Описание', true, $itab, $row);
     $aArr = $oForm->getField($itab);
     $oForm->setFields($aArr, $itab, "Основные");
     $itab++;
     $oForm->setField('manyphoto', 'img_arr', 'Изображения', !true, $itab, $row, isset($row['id']) ? Photo::getPhoto($row['id'], $this->class_name, $row['main']) : null);
     $aArr = $oForm->getField($itab);
     $oForm->setFields($aArr, $itab, "Изображения");
     $itab++;
     $oForm->setField('text', 'meta_title', 'Title мета', true, $itab, isset($row['id']) ? Meta::getMeta($row['id'], $this->class_name) : array());
     $oForm->setField('text', 'meta_description', 'Description мета', true, $itab, isset($row['id']) ? Meta::getMeta($row['id'], $this->class_name) : array());
     $oForm->setField('text', 'meta_keywords', 'Keywords мета', true, $itab, isset($row['id']) ? Meta::getMeta($row['id'], $this->class_name) : array());
     $aArr = $oForm->getField($itab);
     $oForm->setFields($aArr, $itab, "Мета");
     return $oForm;
 }