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


PHP Flash::ok方法代码示例

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


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

示例1: 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

示例2: delete

 function delete()
 {
     $peer = new TestiPeer();
     $peer->delete_by_id(Params::get("id"));
     if (is_html()) {
         Flash::ok("Contenuto testuale eliminato con successo!!");
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:11,代码来源:TestiController.class.php

示例3: add_rotator_image

 function add_rotator_image()
 {
     $rotator_name = Params::get("rotator_name");
     $d = new Dir(self::ROTATOR_GALLERIES_ROOT_PATH . $rotator_name);
     if ($d->exists()) {
         Upload::saveTo("my_file", self::ROTATOR_GALLERIES_ROOT_PATH . $rotator_name . DS);
     } else {
         Flash::error("Errore durante il caricamento dell'immagine!! Contattare l'assistenza : info@mbcraft.it");
         return Redirect::failure();
     }
     Flash::ok("Immagine caricata con successo!!");
     return Redirect::success();
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:13,代码来源:RotatorController.class.php

示例4: 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

示例5: 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

示例6: testOkFlashes

 function testOkFlashes()
 {
     Flash::clean();
     Flash::__load_from_session();
     $this->assertFalse(Flash::has_oks(), "Il flash ha gia' dentro del contenuto!!");
     Flash::ok("Ciao!");
     Flash::ok("Boom!");
     $this->assertTrue(Flash::has_oks(), "Il flash non ha salvato il messaggio");
     $messages = Flash::get_ok_messages();
     $this->assertEqual(count($messages), 2, "Il numero dei messaggi salvati non corrisponde!!");
     $this->assertEqual("Ciao!", $messages[0]);
     $this->assertEqual("Boom!", $messages[1]);
     Flash::__save_to_session();
     Flash::__load_from_session();
     $messages = Flash::get_ok_messages();
     $this->assertEqual(count($messages), 2, "Il numero dei messaggi salvati non corrisponde!!");
     $this->assertEqual("Ciao!", $messages[0]);
     $this->assertEqual("Boom!", $messages[1]);
     Flash::__save_to_session();
     Flash::__load_from_session();
     $this->assertEqual(count(Flash::get_ok_messages()), 0, "Il numero dei messaggi salvati non corrisponde!!");
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:22,代码来源:flash_test.php

示例7: __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

示例8: delete

 function delete()
 {
     $peer = new FolderPeer();
     $result = $peer->find_by_id(Params::get("id"));
     self::delete_attributes($result);
     $peer->delete($result);
     if (is_html()) {
         Flash::ok("Cartella eliminata con successo.");
         return Redirect::success();
     } else {
         return Result::ok();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:13,代码来源:FoldersController.class.php

示例9: delete_banner

 function delete_banner()
 {
     $peer = new BannerPeer();
     $banner = $peer->find_by_id(Params::get("id_banner"));
     call("immagini", "delete", array("id" => $banner->id_immagine));
     $peer->delete_by_id($banner->id_banner);
     Flash::ok("Banner eliminato con successo!!");
     return Redirect::success();
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:9,代码来源:SponsorBannerController.class.php

示例10: 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

示例11:

<?php

Flash::ok("phpMyAdmin ora e' disponibile all'indirizzo-> [[ <a href=\"/setup/phpMyAdmin\">/setup/phpMyAdmin</a> ]] .");
开发者ID:mbcraft,项目名称:frozen,代码行数:3,代码来源:install.php


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