本文整理汇总了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();
}
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
}
示例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);
}
示例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();
}
}
示例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();
}
}
示例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();
}
示例10: logout
function logout()
{
Session::remove("/session");
return Redirect::success();
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
}
示例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();
}
}
示例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();
}
}