本文整理汇总了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();
}
示例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();
}
}
示例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();
}
示例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();
}
}
示例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();
}
}
示例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!!");
}
示例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);
}
}
}
示例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();
}
}
示例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();
}
示例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();
}
}
示例11:
<?php
Flash::ok("phpMyAdmin ora e' disponibile all'indirizzo-> [[ <a href=\"/setup/phpMyAdmin\">/setup/phpMyAdmin</a> ]] .");