当前位置: 首页>>代码示例>>PHP>>正文


PHP App::redirect方法代码示例

本文整理汇总了PHP中Gekosale\App::redirect方法的典型用法代码示例。如果您正苦于以下问题:PHP App::redirect方法的具体用法?PHP App::redirect怎么用?PHP App::redirect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gekosale\App的用法示例。


在下文中一共展示了App::redirect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index()
 {
     $Config = App::getConfig();
     $configData = array('config_data' => array('admin_panel_link' => __ADMINPANE__, 'ssl' => (string) (isset($Config['ssl']) && $Config['ssl'] == 1) ? 1 : 0), 'gallerysettings_data' => App::getModel('globalsettings')->getGallerySettings());
     $settingsData = App::getModel('globalsettings')->getSettings();
     $colour = $settingsData['gallerysettings_data']['colour'];
     unset($settingsData['gallerysettings_data']);
     $settingsData['gallerysettings_data']['colour'] = array('type' => 1, 'start' => $colour);
     $this->formModel->setPopulateData(array_merge_recursive($configData, $settingsData));
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         try {
             $Data = $form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT);
             $Settings = $form->getSubmitValues();
             Event::notify($this, 'admin.globalsettings.model.save', array('id' => 1, 'data' => $Data));
             App::getModel('globalsettings')->updateGallerySettings($Data);
             App::getModel('globalsettings')->updateGlobalSettings($Settings['interface'], 'interface');
             App::getModel('globalsettings')->updateGlobalSettings(array('colour' => $Settings['gallerysettings_data']['colour']['start']), 'gallerysettings_data');
             Session::setActiveGlobalSettings(NULL);
             App::getModel('globalsettings')->configWriter($Data);
             if (__ADMINPANE__ != $Data['admin_panel_link']) {
                 Session::flush();
                 App::redirect('');
             } else {
                 App::redirect(__ADMINPANE__ . '/globalsettings');
             }
         } catch (Exception $e) {
             $this->registry->template->assign('error', $e->getMessage());
         }
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:32,代码来源:globalsettings.php

示例2: add

 public function add()
 {
     $form = new FormEngine\Elements\Form(array('name' => 'promotion', 'action' => '', 'method' => 'post'));
     $requiredData = $form->AddChild(new FormEngine\Elements\Fieldset(array('name' => 'required_data', 'label' => _('TXT_SELECT_PRODUCTS'))));
     $productid = $requiredData->AddChild(new FormEngine\Elements\ProductSelect(array('name' => 'productid', 'label' => _('TXT_SELECT_PRODUCTS'), 'rules' => array(new FormEngine\Rules\Required(_('TXT_SELECT_PRODUCTS'))), 'repeat_min' => 1, 'repeat_max' => FormEngine\FE::INFINITE)));
     $pricePane = $form->AddChild(new FormEngine\Elements\Fieldset(array('name' => 'discount_pane', 'label' => _('TXT_DISCOUNT'))));
     $standardPrice = $pricePane->AddChild(new FormEngine\Elements\Fieldset(array('name' => 'standard_price', 'label' => _('TXT_STANDARD_SELLPRICE'))));
     $enablePromotion = $standardPrice->AddChild(new FormEngine\Elements\Checkbox(array('name' => 'promotion', 'label' => _('TXT_ENABLE_PROMOTION'), 'default' => '0')));
     $standardPrice->AddChild(new FormEngine\Elements\TextField(array('name' => 'discount', 'label' => _('TXT_DISCOUNT'), 'rules' => array(new FormEngine\Rules\Format(_('ERR_VALUE_INVALID'), '/^([0-9]*\\.*([0-9]{1,2})|(\\0)?)$/')), 'default' => '0.00', 'suffix' => '%', 'filters' => array(new FormEngine\Filters\CommaToDotChanger()), 'dependencies' => array(new FormEngine\Dependency(FormEngine\Dependency::SHOW, $enablePromotion, new FormEngine\Conditions\Equals(1))))));
     $standardPrice->AddChild(new FormEngine\Elements\Date(array('name' => 'promotionstart', 'label' => _('TXT_START_DATE'), 'dependencies' => array(new FormEngine\Dependency(FormEngine\Dependency::SHOW, $enablePromotion, new FormEngine\Conditions\Equals(1))))));
     $standardPrice->AddChild(new FormEngine\Elements\Date(array('name' => 'promotionend', 'label' => _('TXT_END_DATE'), 'dependencies' => array(new FormEngine\Dependency(FormEngine\Dependency::SHOW, $enablePromotion, new FormEngine\Conditions\Equals(1))))));
     $clientGroups = App::getModel('clientgroup/clientgroup')->getClientGroupAll();
     foreach ($clientGroups as $clientGroup) {
         $pricePane->AddChild(new FormEngine\Elements\Fieldset(array('name' => 'field_' . $clientGroup['id'], 'label' => $clientGroup['name'])));
         $promotion[$clientGroup['id']] = $pricePane->AddChild(new FormEngine\Elements\Checkbox(array('name' => 'promotion_' . $clientGroup['id'], 'label' => _('TXT_ENABLE_CLIENTGROUP_PROMOTION'), 'default' => '0')));
         $pricePane->AddChild(new FormEngine\Elements\TextField(array('name' => 'discount_' . $clientGroup['id'], 'label' => _('TXT_DISCOUNT'), 'rules' => array(new FormEngine\Rules\Format(_('ERR_VALUE_INVALID'), '/^([0-9]*\\.*([0-9]{1,2})|(\\0)?)$/')), 'default' => '0.00', 'suffix' => '%', 'filters' => array(new FormEngine\Filters\CommaToDotChanger()), 'dependencies' => array(new FormEngine\Dependency(FormEngine\Dependency::HIDE, $promotion[$clientGroup['id']], new FormEngine\Conditions\Not(new FormEngine\Conditions\Equals(1)))))));
         $pricePane->AddChild(new FormEngine\Elements\Date(array('name' => 'promotionstart_' . $clientGroup['id'], 'label' => _('TXT_START_DATE'), 'dependencies' => array(new FormEngine\Dependency(FormEngine\Dependency::SHOW, $promotion[$clientGroup['id']], new FormEngine\Conditions\Equals(1))))));
         $pricePane->AddChild(new FormEngine\Elements\Date(array('name' => 'promotionend_' . $clientGroup['id'], 'label' => _('TXT_END_DATE'), 'dependencies' => array(new FormEngine\Dependency(FormEngine\Dependency::SHOW, $promotion[$clientGroup['id']], new FormEngine\Conditions\Equals(1))))));
     }
     $form->AddFilter(new FormEngine\Filters\NoCode());
     $form->AddFilter(new FormEngine\Filters\Trim());
     $form->AddFilter(new FormEngine\Filters\Secure());
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         $Data = $form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT);
         $this->model->addPromotion($Data);
         App::getModel('product')->updateProductAttributesetPricesAll();
         App::redirect(__ADMINPANE__ . '/productpromotion');
     }
     $this->registry->template->assign('form', $form->Render());
     $this->registry->template->assign('xajax', $this->registry->xajax->getJavascript());
     $this->registry->xajax->processRequest();
     $this->registry->template->display($this->loadTemplate('add.tpl'));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:33,代码来源:productpromotion.php

示例3: index

 public function index()
 {
     if (Session::getActiveUserid() != null) {
         App::redirect(__ADMINPANE__ . '/mainside');
     }
     $form = new FormEngine\Elements\Form(array('name' => 'forgotlogin', 'action' => '', 'method' => 'post', 'class' => 'login-form'));
     $form->AddChild(new FormEngine\Elements\TextField(array('name' => 'login', 'label' => _('TXT_EMAIL_FORM_LOGIN'), 'rules' => array(new FormEngine\Rules\Required(_('ERR_EMPTY_LOGIN_FORM_LOGIN'))))));
     $form->AddChild(new FormEngine\Elements\Submit(array('name' => 'log_in', 'label' => _('TXT_FORGOT_PASSWORD'))));
     $form->AddFilter(new FormEngine\Filters\Trim());
     $form->AddFilter(new FormEngine\Filters\NoCode());
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         $loginValues = $form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT);
         $result = App::getModel('login')->checkUsers($loginValues['login']);
         if ($result == 0) {
             Session::setVolatileLoginError(1, false);
         } else {
             $password = Core::passwordGenerate();
             App::getModel('login')->changeUsersPassword($result, $password);
             $this->registry->template->assign('password', $password);
             App::getModel('mailer')->sendEmail(array('template' => 'forgotUsers', 'email' => array($_POST['login']), 'bcc' => false, 'subject' => _('TXT_FORGOT_PASSWORD'), 'viewid' => Helper::getViewId()));
             Session::setVolatileMessage("Nowe hasło zostało wysłane na podany adres e-mail.");
             App::redirect('login');
         }
     }
     $error = Session::getVolatileLoginError();
     if ($error[0] == 1) {
         $this->registry->template->assign('error', _('ERR_BAD_EMAIL'));
     }
     $languages = App::getModel('language')->getLanguages();
     $this->registry->xajax->processRequest();
     $this->registry->template->assign('xajax', $this->registry->xajax->getJavascript());
     $this->registry->template->assign('form', $form->Render());
     $this->registry->template->assign('languages', json_encode($languages));
     $this->registry->template->display($this->loadTemplate('index.tpl'));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:35,代码来源:forgotlogin.php

示例4: edit

 public function edit()
 {
     $rawAttributeGroupData = $this->model->getGroup($this->id);
     if (empty($rawAttributeGroupData)) {
         App::redirect(__ADMINPANE__ . '/attributegroup/');
     }
     $this->registry->xajaxInterface->registerFunction(array('AddGroup', $this->model, 'addEmptyGroup'));
     $this->registry->xajaxInterface->registerFunction(array('DeleteGroup', $this->model, 'deleteGroup'));
     $populateData = array('group_data' => array('attributegroupname' => $rawAttributeGroupData['name'], 'category' => $rawAttributeGroupData['category']), 'attribute_data' => array('attributes' => $rawAttributeGroupData['attributes']));
     $error = Session::getVolatileErrorMessage();
     if ($error) {
         $this->registry->template->assign('errormessage', print_r($error, 1));
     }
     $this->formModel->setPopulateData($populateData);
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         try {
             $this->model->editAttributeGroup($form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT), $this->id);
         } catch (Exception $e) {
             $this->registry->template->assign('error', $e->getMessage());
         }
         App::redirect(__ADMINPANE__ . '/attributegroup/edit/' . $this->id);
     }
     $this->renderLayout(array('form' => $form->Render(), 'existingGroups' => $this->model->getAllAttributeGroupName(), 'currentGroup' => $rawAttributeGroupData));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:25,代码来源:attributegroup.php

示例5: edit

 public function edit()
 {
     $form = new FormEngine\Elements\Form(array('name' => 'rangetype', 'action' => '', 'method' => 'post'));
     $requiredData = $form->AddChild(new FormEngine\Elements\Fieldset(array('name' => 'required_data', 'label' => _('TXT_MAIN_DATA'))));
     $languageData = $requiredData->AddChild(new FormEngine\Elements\FieldsetLanguage(array('name' => 'language_data', 'label' => _('TXT_LANGUAGE_DATA'))));
     $languageData->AddChild(new FormEngine\Elements\TextField(array('name' => 'name', 'label' => _('TXT_NAME'), 'rules' => array(new FormEngine\Rules\Required(_('ERR_EMPTY_NAME')), new FormEngine\Rules\LanguageUnique(_('ERR_NAME_ALREADY_EXISTS'), 'rangetypetranslation', 'name', null, array('column' => 'rangetypeid', 'values' => (int) $this->registry->core->getParam()))))));
     $categoryData = $form->AddChild(new FormEngine\Elements\Fieldset(array('name' => 'category_data', 'label' => _('TXT_CATEGORY_DATA'))));
     $rawRangetypeData = App::getModel('rangetype')->getRangeTypeView($this->registry->core->getParam());
     $categoryData->AddChild(new FormEngine\Elements\Tree(array('name' => 'category', 'label' => _('TXT_CATEGORY'), 'choosable' => false, 'selectable' => true, 'sortable' => false, 'clickable' => false, 'items' => App::getModel('category')->getChildCategories(0, $rawRangetypeData['rangetypecategorys']), 'load_children' => array(App::getModel('category'), 'getChildCategories'))));
     $form->AddFilter(new FormEngine\Filters\NoCode());
     $form->AddFilter(new FormEngine\Filters\Trim());
     $form->AddFilter(new FormEngine\Filters\Secure());
     $rangetypeData = array('required_data' => array('language_data' => $rawRangetypeData['language']), 'category_data' => array('category' => $rawRangetypeData['rangetypecategorys']));
     $form->Populate($rangetypeData);
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         try {
             App::getModel('rangetype')->editRangeType($form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT), $this->registry->core->getParam());
         } catch (Exception $e) {
             $this->registry->template->assign('error', $e->getMessage());
         }
         App::redirect(__ADMINPANE__ . '/rangetype');
     }
     $this->registry->template->assign('form', $form->Render());
     $this->registry->xajax->processRequest();
     $this->registry->template->assign('xajax', $this->registry->xajax->getJavascript());
     $this->registry->template->display($this->loadTemplate('edit.tpl'));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:27,代码来源:rangetype.php

示例6: add

 public function add()
 {
     $form = new FormEngine\Elements\Form(array('name' => 'pagescheme', 'action' => '', 'method' => 'post'));
     $filesPane = $form->AddChild(new FormEngine\Elements\Fieldset(array('name' => 'files_pane', 'label' => 'Dodaj nowy szablon')));
     $filesPane->AddChild(new FormEngine\Elements\Tip(array('tip' => '<p align="center">Wybierz z dysku lub wgraj plik zip z szablonem sklepu. Po imporcie będziesz mógł zmienić jego ustawienia oraz ustawić jako domyślny dla sklepu.</p>', 'direction' => FormEngine\Elements\Tip::DOWN)));
     $files = $filesPane->AddChild(new FormEngine\Elements\LocalFile(array('name' => 'files', 'label' => 'Plik', 'file_source' => 'themes/', 'traversable' => false, 'file_types' => array('zip'))));
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         $Data = $form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT);
         $check = App::getModel('pagescheme/import')->check($Data['files']['file']);
         $bValid = false;
         if (is_array($check)) {
             foreach ($check as $file) {
                 if ($file['filename'] == 'settings/export.json') {
                     $bValid = true;
                     break;
                 }
             }
         }
         if ($bValid) {
             App::getModel('pagescheme/import')->importPagescheme($Data['files']['file']);
             App::redirect(__ADMINPANE__ . '/templateeditor');
         } else {
             Session::setVolatileMessage("Musisz wybrać prawidłowe archiwum ZIP.");
             App::redirect(__ADMINPANE__ . '/templateeditor/add');
         }
     }
     $this->registry->template->assign('form', $form->Render());
     $this->registry->xajax->processRequest();
     $this->registry->template->assign('xajax', $this->registry->xajax->getJavascript());
     $this->registry->template->display($this->loadTemplate('add.tpl'));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:31,代码来源:templateeditor.php

示例7: edit

 public function edit()
 {
     $rawGroupData = $this->model->getGroupsView((int) $this->id);
     if (empty($rawGroupData)) {
         App::redirect(__ADMINPANE__ . '/groups');
     }
     $controllers = array();
     $controllersRaw = App::getModel('groups')->getFullPermission();
     foreach ($controllersRaw as $controller) {
         $controllers[] = array('name' => $controller['name'], 'id' => $controller['id']);
     }
     $actions = array();
     $actionsRaw = $this->registry->right->getRightsToSmarty();
     foreach ($actionsRaw as $right) {
         $actions[] = array('name' => $right['name'], 'id' => $right['value']);
     }
     $rightsData = array();
     foreach ($controllersRaw as $controller) {
         $mask = 1;
         $rights = array();
         for ($i = 0; $i < count($actions); $i++) {
             $rights[$actions[$i]['id']] = $controller['permission'] & $mask ? 1 : 0;
             $mask = $mask << 1;
         }
         $rightsData[$controller['id']] = $rights;
     }
     $populateData = array('basic_data' => array('name' => $rawGroupData['name']), 'rights_data' => array('rights' => $rightsData));
     $this->formModel->setPopulateData($populateData);
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         $this->model->editPermission($form->getSubmitValues(), $this->id);
         App::redirect(__ADMINPANE__ . '/groups');
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:35,代码来源:groups.php

示例8: edit

 public function edit()
 {
     $rawStoreData = $this->model->getStoreView($this->id);
     if (empty($rawStoreData)) {
         App::redirect(__ADMINPANE__ . '/store');
     }
     $slogan = 0;
     if ($rawStoreData['isinvoiceshopname'] == 1) {
         $slogan = 1;
     }
     if ($rawStoreData['isinvoiceshopslogan'] == 1) {
         $slogan = 2;
     }
     $populateData = array('address_data' => array('placename' => $rawStoreData['placename'], 'postcode' => $rawStoreData['postcode'], 'street' => $rawStoreData['street'], 'streetno' => $rawStoreData['streetno'], 'placeno' => $rawStoreData['placeno'], 'province' => $rawStoreData['province'], 'countries' => $rawStoreData['countryid']), 'company_data' => array('companyname' => $rawStoreData['companyname'], 'shortcompanyname' => $rawStoreData['shortcompanyname'], 'nip' => $rawStoreData['nip'], 'krs' => $rawStoreData['krs']), 'bank_data' => array('bankname' => $rawStoreData['bankname'], 'banknr' => $rawStoreData['banknr']), 'photos_pane' => array('photo' => $rawStoreData['photo']), 'invoice_data' => array('isinvoiceshopslogan' => array('value' => $slogan), 'invoiceshopslogan' => $rawStoreData['invoiceshopslogan']));
     $this->formModel->setPopulateData($populateData);
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         try {
             $this->model->editStore($form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT), $this->id);
         } catch (Exception $e) {
             $this->registry->template->assign('error', $e->getMessage());
         }
         App::redirect(__ADMINPANE__ . '/store');
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:26,代码来源:store.php

示例9: index

 public function index()
 {
     if (strlen($this->registry->core->getParam()) > 0) {
         $result = App::getModel('login')->authProccessSha($this->registry->core->getParam());
         if ($result == 1) {
             Session::setActiveLoginError(null);
             Session::setActiveUserid($result);
             App::getModel('login')->checkInstanceIsValid();
             App::getModel('login')->setLoginTime();
             App::getModel('login')->getUserData();
             App::getModel('login')->setDefaultView($result);
             App::redirect(__ADMINPANE__ . '/mainside');
         }
     }
     if (Session::getActiveUserid() != null) {
         App::redirect(__ADMINPANE__ . '/mainside');
     }
     $form = new FormEngine\Elements\Form(array('name' => 'login', 'action' => '', 'method' => 'post', 'class' => 'login-form', 'csrf' => false));
     $form->AddChild(new FormEngine\Elements\TextField(array('name' => 'login', 'label' => _('TXT_EMAIL_FORM_LOGIN'), 'rules' => array(new FormEngine\Rules\Required(_('ERR_EMPTY_EMAIL_FORM_LOGIN'))))));
     $form->AddChild(new FormEngine\Elements\Password(array('name' => 'password', 'label' => _('TXT_LOGIN_FORM_PASSWORD'), 'rules' => array(new FormEngine\Rules\Required(_('ERR_EMPTY_LOGIN_FORM_PASSWORD'))))));
     $form->AddChild(new FormEngine\Elements\Checkbox(array('name' => 'autologin', 'label' => _('TXT_AUTOLOGIN'))));
     $form->AddChild(new FormEngine\Elements\Submit(array('name' => 'log_in', 'label' => _('TXT_LOG_IN'))));
     $form->AddChild(new FormEngine\Elements\StaticText(array('text' => '<a href="' . App::getURLAdress() . 'forgotlogin">' . _('TXT_LOGIN_FORM_RESET_PASSWORD') . '</a>')));
     $form->AddFilter(new FormEngine\Filters\Trim());
     $form->AddFilter(new FormEngine\Filters\NoCode());
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         $loginValues = $form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT);
         $result = App::getModel('login')->authProccess($loginValues['login'], $loginValues['password']);
         if ($result == 0) {
             Session::setVolatileLoginError(1, false);
         } else {
             if (isset($loginValues['autologin']) && $loginValues['autologin'] == 1) {
                 App::getModel('login')->setAdminAutologinKey($result);
             } else {
                 App::getModel('login')->destroyAdminAutologinKey();
             }
             Session::setActiveLoginError(null);
             Session::setActiveUserid($result);
             App::getModel('login')->checkInstanceIsValid();
             App::getModel('login')->setLoginTime();
             App::getModel('login')->getUserData();
             App::getModel('login')->setDefaultView($result);
             App::redirect(__ADMINPANE__ . '/mainside');
         }
     }
     $error = Session::getVolatileLoginError();
     if ($error[0] == 1) {
         $this->registry->template->assign('error', _('ERR_BAD_LOGIN_OR_PASSWORD'));
     }
     $languages = App::getModel('language')->getLanguages();
     $this->registry->xajax->processRequest();
     $this->registry->template->assign('xajax', $this->registry->xajax->getJavascript());
     $this->registry->template->assign('form', $form->Render());
     $this->registry->template->assign('languages', json_encode($languages));
     $this->registry->template->display($this->loadTemplate('index.tpl'));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:56,代码来源:login.php

示例10: edit

 public function edit()
 {
     // dodawanie zdjec
     $form = new FormEngine\Elements\Form(array('name' => 'edit_file', 'action' => '', 'method' => 'post'));
     $photosPane = $form->AddChild(new FormEngine\Elements\Fieldset(array('name' => 'photos_pane', 'label' => _('TXT_PHOTOS'))));
     $photosPane->AddChild(new FormEngine\Elements\Image(array('name' => 'photo', 'label' => _('TXT_PHOTOS'), 'repeat_min' => 0, 'repeat_max' => FormEngine\FE::INFINITE, 'upload_url' => App::getURLAdressWithAdminPane() . 'files/add')));
     $form->AddFilter(new FormEngine\Filters\Trim());
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         App::redirect(__ADMINPANE__ . '/files');
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:12,代码来源:files.php

示例11: edit

 public function edit()
 {
     $similarproduct = $this->model->getSimilarView((int) $this->id);
     $populateData = array('required_data' => array('name' => $similarproduct['name']), 'related_products' => array('products' => $this->model->getProductsDataGrid((int) $this->id)));
     $this->formModel->setPopulateData($populateData);
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         $this->model->editRelated($form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT), $this->id);
         App::redirect(__ADMINPANE__ . '/similarproduct');
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:12,代码来源:similarproduct.php

示例12: edit

 public function edit()
 {
     $populateData = $this->model->getDataById($this->id);
     $this->formModel->setPopulateData($populateData);
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         try {
             $this->model->editSitemaps($form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT), $this->id);
         } catch (Exception $e) {
             $this->registry->template->assign('error', $e->getMessage());
         }
         App::redirect(__ADMINPANE__ . '/sitemaps');
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:15,代码来源:sitemaps.php

示例13: edit

 public function edit()
 {
     $rawClientgroupData = $this->model->getClientGroupById($this->registry->core->getParam());
     $populateData = array('required_data' => array('language_data' => $rawClientgroupData['language']), 'clients_data' => array('clients' => $rawClientgroupData['clients']));
     $this->formModel->setPopulateData($populateData);
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         try {
             $this->model->editClientGroup($form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT), $this->registry->core->getParam());
         } catch (Exception $e) {
             $this->registry->template->assign('error', $e->getMessage());
         }
         App::redirect(__ADMINPANE__ . '/clientgroup');
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:16,代码来源:clientgroup.php

示例14: edit

 public function edit()
 {
     $rawAvailablityData = $this->model->getAvailablityView($this->id);
     $availablityData = array('required_data' => array('language_data' => $rawAvailablityData['language']));
     $this->formModel->setPopulateData($availablityData);
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         try {
             $this->model->editAvailablity($form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT), $this->id);
         } catch (Exception $e) {
             $this->registry->template->assign('error', $e->getMessage());
         }
         App::redirect(__ADMINPANE__ . '/availablity');
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:16,代码来源:availablity.php

示例15: edit

 public function edit()
 {
     $rawAttributeproductData = $this->model->getAttributeProductName($this->registry->core->getParam());
     $populateData = array('required_data' => array('attributeproductname' => $rawAttributeproductData['attributeproductname']), 'attributes_data' => array('attributeproductvalues' => $rawAttributeproductData['attributes']));
     $this->formModel->setPopulateData($populateData);
     $form = $this->formModel->initForm();
     if ($form->Validate(FormEngine\FE::SubmittedData())) {
         try {
             $this->model->updateAttribute($form->getSubmitValues(FormEngine\Elements\Form::FORMAT_FLAT), $this->registry->core->getParam());
         } catch (Exception $e) {
             $this->registry->template->assign('error', $e->getMessage());
         }
         App::redirect(__ADMINPANE__ . '/attributeproduct');
     }
     $this->renderLayout(array('form' => $form->Render()));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:16,代码来源:attributeproduct.php


注:本文中的Gekosale\App::redirect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。