當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Banner::delete方法代碼示例

本文整理匯總了PHP中Banner::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Banner::delete方法的具體用法?PHP Banner::delete怎麽用?PHP Banner::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Banner的用法示例。


在下文中一共展示了Banner::delete方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 function delete($id)
 {
     $banners = new Banner($id);
     if (!$banners->exists()) {
         show_404();
     }
     if ($banners->delete()) {
         flash_message('success', 'Thành công. Thao tác đã được thực hiện.');
         redirect($_SERVER['HTTP_REFERER']);
     }
 }
開發者ID:lxthien,項目名稱:batdongsan,代碼行數:11,代碼來源:banners_bak.php

示例2: header

<?php

fSession::open();
$idUser = fSession::get(SESSION_ID_USER);
//if(empty($idUser) || !fAuthorization::checkACL('banner', 'delete')) {
if (empty($idUser)) {
    header('Location: ' . SITE);
    exit("No se ha podido acceder a esta secci&oacite;n");
}
$id = fRequest::encode('id', 'string');
if (strstr($id, ",")) {
    fORMDatabase::retrieve()->query("DELETE FROM banner WHERE id_banner IN ({$id})");
} else {
    $banner = new Banner($id);
    $banner->delete();
}
fORMDatabase::retrieve()->query("DELETE FROM resource WHERE id_entity IN ({$id}) AND id_section = 1");
開發者ID:nevermind89x,項目名稱:Mi-morelia,代碼行數:17,代碼來源:banner_delete.php

示例3: BannerCategoria

$bannerCategoria = new BannerCategoria();
require_once '../../models/Imagem.php';
$imagem = new Imagem();
foreach ($_REQUEST as $key => $value) {
    if (!is_array($value)) {
        $_REQUEST[$key] = utf8_decode($value);
    } elseif (is_array($value)) {
        foreach ($value as $key2 => $value2) {
            $_REQUEST[$key][$key2] = utf8_decode($value2);
        }
    }
}
if ($_REQUEST['acao'] == 1 && $_REQUEST['operacao'] == 2) {
    if ($data->add()) {
        echo json_encode(array('success' => 1));
    } else {
        echo json_encode(array('success' => 0));
    }
} elseif ($_REQUEST['acao'] == 2 && $_REQUEST['operacao'] == 2) {
    if ($data->edit()) {
        echo json_encode(array('success' => 1));
    } else {
        echo json_encode(array('success' => 0));
    }
} elseif ($_REQUEST['acao'] == 3 && $_REQUEST['operacao'] == 2) {
    if ($data->delete()) {
        echo json_encode(array('success' => 1));
    } else {
        echo json_encode(array('success' => 0));
    }
}
開發者ID:alanansilva,項目名稱:3heads,代碼行數:31,代碼來源:persistence.php

示例4: Banner

 function banner_delete($id = FALSE)
 {
     if ($id) {
         $banner = new Banner($id);
         $banner->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('home/banner');
 }
開發者ID:unisexx,項目名稱:adf16,代碼行數:9,代碼來源:home.php


注:本文中的Banner::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。