当前位置: 首页>>代码示例>>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;未经允许,请勿转载。