/** * Обработчик действия: Отдает форму редактирования альбома. */ function getEditForm() { $form = new A_Form("module_gallery_edit.tpl"); $form->data = A::$DB->getRowById($_POST['id'], SECTION . "_albums"); $form->data['categories'] = A::$DB->getAll("SELECT id,idker,name FROM " . SECTION . "_categories ORDER BY level,sort"); $form->fieldseditor_editprepare(); $this->RESULT['html'] = $form->getContent(); }
/** * Обработчик действия: Отдает форму редактирования записи. */ function getEditForm() { $form = new A_Form("module_catalog_edit.tpl"); $form->data = A::$DB->getRowById($_POST['id'], SECTION . "_catalog"); $form->data['categories'] = A::$DB->getAll("SELECT id,idker,name FROM " . SECTION . "_categories ORDER BY level,sort"); $form->fieldseditor_editprepare(); $form->data['filesbox'] = new A_Files((int) $_POST['id']); $form->data['imagesbox'] = new A_Images((int) $_POST['id']); $this->RESULT['html'] = $form->getContent(); }
function getEditForm() { $form = new A_Form("plugin_listdata_edit.tpl"); $form->data = A::$DB->getRowById($_POST['id'], STRUCTURE); $form->data['languages'] = array(); foreach (A::$LANGUAGES as $key => $name) { $form->data['languages'][] = array("field" => "name_{$key}", "caption" => $name, "value" => $form->data['name_' . $key]); } $form->fieldseditor_editprepare(); $this->RESULT['html'] = $form->getContent(); }
/** * Обработчик действия: Отдает форму редактирования товара. */ function getEditForm() { $form = new A_Form("module_shoplite_edit.tpl"); $form->data = A::$DB->getRowById($_POST['id'], SECTION . "_catalog"); $form->data['categories'] = A::$DB->getAll("SELECT id,idker,name FROM " . SECTION . "_categories ORDER BY level,sort"); $form->data['price'] = round($form->data['price'], 2); $form->data['oldprice'] = round($form->data['oldprice'], 2); $form->fieldseditor_editprepare(); $form->data['filesbox'] = new A_Files((int) $_POST['id']); $form->data['imagesbox'] = new A_Images((int) $_POST['id']); $i = 1; $mprices = !empty($form->data['mprices']) ? unserialize($form->data['mprices']) : array(); $form->data['mprices'] = array(); foreach ($mprices as $mp) { $form->data['mprices'][] = array('textname' => "mprice{$i}_text", 'textvalue' => $mp['name'], 'pricename' => "mprice{$i}_price", 'pricevalue' => $mp['price']); $i++; } for (; $i <= 10; $i++) { $form->data['mprices'][] = array('textname' => "mprice{$i}_text", 'textvalue' => "", 'pricename' => "mprice{$i}_price", 'pricevalue' => ""); } $this->RESULT['html'] = $form->getContent(); }
/** * Обработчик действия: Отдает форму редактирования страницы. */ function getEditPageForm() { $form = new A_Form("module_pages_editpage.tpl"); $form->data = A::$DB->getRowById($_POST['id'], SECTION); $form->data['usemap'] = getSectionByModule('sitemap'); $form->fieldseditor_editprepare(); $this->RESULT['html'] = $form->getContent(); }