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


PHP Redirect::success方法代码示例

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


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

示例1: invia_commento

 function invia_commento()
 {
     try {
         $nome = Params::get("nome");
         $subject = Params::get("subject");
         $email = Params::get("email");
         $testo = Params::get("testo");
         //$codice_hidden = Params::get("codice_hidden");
         //$codice = Params::get("codice");
         //if ($codice_hidden!=$codice)
         //    throw new InvalidParameterException("Il codice non e' impostato correttamente!!");
         if ($nome != null && $subject != null && $email != null && $testo != null && isset(Config::instance()->EMAIL_COMMENT_RECEIVED)) {
             $e = new EMail("no_reply@" . Host::current_no_www(), Config::instance()->EMAIL_COMMENT_RECEIVED, "[Nuova commento da : " . $nome . "] - " . Host::current(), EMail::HTML_FORMAT);
             $e->render_and_send("include/messages/mail/alert/" . Lang::current() . "/nuovo_commento.php.inc", array("nome" => $nome, "email" => $email, "subject" => $subject, "testo" => $testo));
             return Redirect::success();
         } else {
             if (!isset(Config::instance()->EMAIL_COMMENT_RECEIVED)) {
                 throw new InvalidDataException("Il parametri di configurazione EMAIL_COMMENT_RECEIVED non e' impostato correttamente!!");
             } else {
                 throw new InvalidDataException("I dati immessi nella form non sono validi!!");
             }
         }
     } catch (Exception $ex) {
         Flash::error($ex->getMessage());
         return Redirect::failure();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:27,代码来源:CommentiController.class.php

示例2: delete_rotator_image

 function delete_rotator_image()
 {
     $rotator_name = Params::get("rotator_name");
     $image = Params::get("image");
     $f = new File(self::ROTATOR_GALLERIES_ROOT_PATH . $rotator_name . DS . $image);
     $f->delete();
     return Redirect::success();
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:8,代码来源:RotatorController.class.php

示例3: send

 function send()
 {
     $success_message = Params::get("success_message");
     $em = new EMail(Params::get("email"), Params::get("dest_address"), "Nuovo messaggio ricevuto", EMail::HTML_FORMAT);
     $vars = array("first_name" => Params::get("first_name"), "last_name" => Params::get("last_name"), "message" => Params::get("message"));
     $em->render_and_send("include/mail/message.php.inc", $vars);
     Flash::ok(Params::get($success_message));
     return Redirect::success();
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:9,代码来源:ContactsController.class.php

示例4: modify_image

 function modify_image()
 {
     $peer = new GalleryImagePeer();
     $do = $peer->updateByParams();
     $peer->save($do);
     if (is_html()) {
         return Redirect::success();
     } else {
         return Redirect::failure();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:11,代码来源:GalleryImageController.class.php

示例5: modify_collection

 function modify_collection()
 {
     $peer = new GalleryCollectionPeer();
     $do = $peer->updateByParams();
     $peer->save($do);
     if (is_html()) {
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:11,代码来源:GalleryCollectionController.class.php

示例6: formatOutputData

 function formatOutputData($result)
 {
     if (Result::is_result($result)) {
         if (Result::is_ok($result)) {
             $result = Redirect::success();
         } else {
             $result = Redirect::failure();
         }
     }
     if ($result instanceof IActionCommand) {
         return $result->execute();
     }
     echo render_result($result);
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:14,代码来源:HTMLDataFormat.class.php

示例7: delete

 function delete()
 {
     $nome_categoria = Params::get("nome_categoria");
     $nome_modulo = Params::get("nome_modulo");
     if ($nome_categoria !== ModuleUtils::FRAMEWORK_CATEGORY_NAME && $nome_modulo !== ModuleUtils::FRAMEWORK_MODULE_NAME) {
         $path = AvailableModules::get_available_module_path($nome_categoria, $nome_modulo);
         $d = new Dir($path);
         $d->delete(true);
         Flash::ok("Modulo " . $nome_categoria . "/" . $nome_modulo . " eliminato con successo!!");
         return Redirect::success();
     } else {
         Flash::error("Impossibile eliminare il modulo " . $nome_categoria . "/" . $nome_modulo);
         return Redirect::failure();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:15,代码来源:ModulesController.class.php

示例8: delete

 function delete()
 {
     $peer = new DocumentiPeer();
     $do = $peer->find_by_id(Params::get("id"));
     $final_path = $do->save_folder . $do->hash_name;
     $f = new File($final_path);
     $f->delete();
     $peer->delete($do);
     if (is_html()) {
         Flash::ok("Documento eliminato con successo.");
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:15,代码来源:DocumentiController.class.php

示例9: elimina_immagine

 function elimina_immagine()
 {
     $image_name = Params::get("image_name");
     $id_prodotto_servizio = Params::get("id_prodotto_servizio");
     $product_image_dir = new Dir(self::PRODUCT_IMAGE_DIR . "/" . $id_prodotto_servizio);
     $product_image_file = $product_image_dir->newFile($image_name);
     ImagePicker::delete_image_thumbnails($product_image_file);
     //elimino la riga associata all'immagine
     $peer = new ImmagineProdottoServizioPeer();
     $peer->id_prodotto_servizio__EQUALS($id_prodotto_servizio);
     $peer->nome_immagine__EQUALS($image_name);
     $elenco_immagini_prodotto_servizio = $peer->find();
     foreach ($elenco_immagini_prodotto_servizio as $img) {
         $peer->delete($img);
     }
     $product_image_file->delete();
     if ($product_image_dir->isEmpty()) {
         $product_image_dir->delete();
     }
     return Redirect::success();
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:21,代码来源:ProdottoServizioController.class.php

示例10: logout

 function logout()
 {
     Session::remove("/session");
     return Redirect::success();
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:5,代码来源:AdminController.class.php

示例11: import

 function import()
 {
     $data = Params::get("import_data");
     $peer = new TestiPeer();
     $import_export = DB::newTableDataImportExport();
     $import_export->import_data($data);
     if (is_html()) {
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:12,代码来源:TestiController.class.php

示例12: set_current_folder

 function set_current_folder()
 {
     $root_dir = new Dir($this->get_user_root());
     $folder = Params::get("folder");
     if (!$root_dir->isParentOf($folder)) {
         throw new InvalidDataException("La cartella specificata non e' valida!!");
     }
     Session::set(self::SESSION_GALLERY_CURRENT_FOLDER, Params::get("folder"));
     if (is_html()) {
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:14,代码来源:GalleryController.class.php

示例13: __defaultReturn

 function __defaultReturn($success_message, $error_messages)
 {
     if (is_html()) {
         if (!$error_messages) {
             Flash::ok($success_message);
             return Redirect::success();
         } else {
             foreach ($error_messages as $error_msg) {
                 Flash::error($error_msg);
             }
             return Redirect::failure();
         }
     } else {
         if (!$error_messages) {
             return Result::ok();
         } else {
             return Result::error($error_messages);
         }
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:20,代码来源:AbstractEntityController.class.php

示例14: elimina_prodotto_servizio_vetrina

 function elimina_prodotto_servizio_vetrina()
 {
     $peer = new ProdottoServizioVetrinaPeer();
     $do = $peer->find_by_id(Params::get("id_prodotto_servizio_vetrina"));
     $peer->delete($do);
     if (is_html()) {
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:11,代码来源:VetrineController.class.php

示例15: delete

 function delete()
 {
     $peer = new FolderPeer();
     $result = $peer->find_by_id(Params::get("id"));
     $path = $result["path"];
     $nome = $result["nome"];
     $full_path = $path . $nome . "/";
     $tipo = $result["tipo"];
     $tipo_tokens = explode("_", $tipo);
     $controller_name = $tipo_tokens[1];
     call($controller_name, "delete_by_path", array("path" => $full_path));
     $peer->delete($result);
     if (is_html()) {
         Flash::ok("Cartella eliminata con successo.");
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:19,代码来源:FoldersController.class.php


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