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


PHP ModuleAdminController::processSave方法代码示例

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


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

示例1: processSave

 public function processSave()
 {
     $jlvgbvqxiei = "country";
     ${$jlvgbvqxiei} = new Country((int) $_POST["id_country"]);
     if (Validate::isLoadedObject(${${"GLOBALS"}["fapdtp"]}) && !$country->contains_states) {
         $_POST["id_state"] = 0;
     }
     if (Tools::isSubmit("submitAddsellerinfo")) {
         if (!isset($_POST["email"]) or empty($_POST["email"])) {
             $this->errors[] = Tools::displayError("Front store account email is required.");
         }
         if (!isset($_POST["seller_employee_email"]) or empty($_POST["seller_employee_email"])) {
             $this->errors[] = Tools::displayError("Back office account email is required.");
         }
     }
     if (!empty($this->errors)) {
         $this->redirect_after = false;
         return false;
     }
     parent::processSave();
 }
开发者ID:evilscripts,项目名称:gy,代码行数:21,代码来源:AdminSellerinfosBase.php

示例2: processSave

 public function processSave()
 {
     parent::processSave();
 }
开发者ID:qant,项目名称:russianpostcarrier,代码行数:4,代码来源:adminrussianpost.php

示例3: processSave

 public function processSave()
 {
     require_once dirname(__FILE__) . "/AgileSellerPaymentInfo.php";
     if (Tools::getValue("id_seller") <= 0) {
         $this->errors[] = Tools::displayError("Seller is required.");
     }
     if (Tools::getValue("id_agile_seller_paymentinfo") <= 0) {
         if (AgileSellerPaymentInfo::is_seller_payment_info_existed(Tools::getValue("module_name"), Tools::getValue("id_seller"))) {
             $this->errors[] = Tools::displayError("Seller Payment Info " . Tools::getValue("module_name") . " module already exsited.");
         }
     }
     ${${"GLOBALS"}["oxouihb"]} = array(" ", "\t", "\r\n", "\n", "\r");
     if (Tools::getValue("module_name") == "googlecheckout") {
         $tsookg = "toRemove";
         $_POST["info1"] = str_replace(${$tsookg}, "", $_POST["info1"]);
         if (AgileSellerPaymentInfo::is_seller_payment_account_existed("googlecheckout", Tools::getValue("id_seller"), Tools::getValue("info1"))) {
             $this->errors[] = Tools::displayError("The google checkout merchant id has been used by another seller.");
         }
     }
     if (Tools::getValue("module_name") == "agilepaypal") {
         ${"GLOBALS"}["aaifkstfva"] = "toRemove";
         $_POST["info1"] = str_replace(${${"GLOBALS"}["aaifkstfva"]}, "", $_POST["info1"]);
         if (AgileSellerPaymentInfo::is_seller_payment_account_existed("agilepaypal", Tools::getValue("id_seller"), Tools::getValue("info1"))) {
             $this->errors[] = Tools::displayError("The paypal account email address has been used by another seller.");
         }
         if (((int) $_POST["in_use_on"] || !empty($_POST["info1"])) && !Validate::isEmail($_POST["info1"])) {
             $this->errors[] = Tools::displayError("The paypal account email is invalid.");
         }
     }
     if (!empty($this->errors)) {
         $this->redirect_after = false;
         return false;
     }
     $_POST["in_use"] = (int) Tools::getValue("in_use_on");
     parent::processSave();
 }
开发者ID:evilscripts,项目名称:gy,代码行数:36,代码来源:AdminSellerPaymentinfos.php

示例4: processSave

 public function processSave()
 {
     $object = parent::processSave();
     if ($object) {
         if (empty($this->errors)) {
             $save_path = rtrim($this->conf['img_save_path'], '/') . "/";
             $groupList = Tools::getValue('groupBox');
             $object->cleanCategories();
             if (is_array($groupList) and sizeof($groupList) > 0) {
                 $object->addCategories($groupList);
             }
             $object->cleanProducts();
             if (Tools::getValue('inputAccessories')) {
                 $productArray = explode('-', Tools::getValue('inputAccessories'), -1);
                 $object->addProducts($productArray);
             }
             $groupRelated = Tools::getValue('groupRelated');
             $object->cleanRelated();
             if (is_array($groupRelated) and sizeof($groupRelated) > 0) {
                 $object->addRelated($groupRelated);
             }
             $images_position = Tools::getValue('img_pos');
             if (is_array($images_position) && count($images_position)) {
                 $object->setImagesPosition($images_position);
             }
             if (isset($_FILES['blog_img']) && !empty($_FILES['blog_img']['tmp_name'][0])) {
                 $j = 0;
                 foreach ($_FILES['blog_img']['name'] as $key => $val) {
                     if (empty($val)) {
                         continue;
                     }
                     $id_img = null;
                     try {
                         $file['name'] = $val;
                         $file['type'] = $_FILES['blog_img']['type'][$key];
                         $file['error'] = $_FILES['blog_img']['error'][$key];
                         $file['size'] = $_FILES['blog_img']['size'][$key];
                         $file['tmp_name'] = $_FILES['blog_img']['tmp_name'][$key];
                         //img name
                         $curr_time = time() + $j;
                         $ext = substr(strrchr($file['name'], '.'), 1);
                         $img_name = $curr_time . '.' . $ext;
                         $dest = _PS_ROOT_DIR_ . '/' . $save_path;
                         $this->checkFile($file, $dest);
                         $id_img = $object->addImage($img_name, 0);
                         $this->uploadFile($file, $dest . $img_name);
                         $object->generateImageThumbs($id_img);
                     } catch (Exception $e) {
                         $this->_errors[] = Tools::displayError($e->getMessage());
                         if (!is_null($id_img)) {
                             $object->removeImage($id_img);
                         }
                     }
                     $j++;
                 }
             }
             BlogShop::generateSitemap();
             if (Tools::getValue('blog_img_default')) {
                 $idImg = Tools::getValue('blog_img_default');
                 $object->setImageDefault($idImg);
             } elseif ($object->getImages(true) > 0) {
                 $object->setImageDefault(0);
             }
         }
     }
     return $object;
 }
开发者ID:rongandat,项目名称:vatfairfoot,代码行数:67,代码来源:AdminBlogPosts.php

示例5: processSave

 public function processSave()
 {
     if (Tools::getIsset('addnow_block_cms_footer') || Tools::getIsset('updatenow_block_cms_footer') || Tools::getIsset('submitAddnow_block_cms_footer')) {
         $this->redirect_after = self::$currentIndex . '&id_now_block_cms_footer_column=' . Tools::getValue('id_now_block_cms_footer_column', $this->object->id_now_block_cms_footer_column) . '&detailsnow_block_cms_footer_column&token=' . $this->token;
     }
     return parent::processSave();
 }
开发者ID:TheTypoMaster,项目名称:neonflexible,代码行数:7,代码来源:AdminNowBlockFooterCms.php

示例6: processSave

 public function processSave()
 {
     $id_produt_purchased = Tools::getValue('id_product_purchased');
     $id_produt_discounted = Tools::getValue('id_product_discounted');
     if ($id_produt_purchased == $id_produt_discounted) {
         $this->errors[] = Tools::displayError($this->l('Products purchased and discounted cannot be the same.'));
     }
     $obj = $this->loadObject(true);
     if (($id_produt_purchased != $obj->id_product_purchased || $id_produt_discounted != $obj->id_product_discounted) && LoyaltyDiscountModel::loyaltyDiscountExists($id_produt_purchased, $id_produt_discounted)) {
         $this->errors[] = Tools::displayError($this->l('There are already a loyalty discount with this current product configuration.'));
     }
     return parent::processSave();
 }
开发者ID:enten,项目名称:ps-loyaltydiscount,代码行数:13,代码来源:AdminLoyaltyDiscountController.php


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