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


PHP Logs::del方法代码示例

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


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

示例1: Logs

 *      @version $Revision: 2075 $
 */
require "../libraries/common.inc.php";
uses("log");
require PHPB2B_ROOT . './libraries/page.class.php';
require "session_cp.inc.php";
$log = new Logs();
$page = new Pages();
$conditions = array();
if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    if ($do == "clear") {
        $result = $pdb->Execute("truncate {$tb_prefix}logs");
    }
    if ($do == "del" && !empty($_GET['id'])) {
        $log->del($_GET['id']);
    }
    if ($do == 'search') {
        if (!empty($_GET['q'])) {
            $conditions[] = "description like '%" . $_GET['q'] . "%'";
        }
    }
}
if (isset($_GET['q'])) {
    $conditions[] = "description like '%" . $_GET['q'] . "%'";
}
$amount = $log->findCount(null, $conditions);
$page->setPagenav($amount);
$result = $log->findAll("id,handle_type,source_module,description,created,created AS pubdate", null, $conditions, "id DESC ", $page->firstcount, $page->displaypg);
if (!empty($result)) {
    for ($i = 0; $i < count($result); $i++) {
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:log.php

示例2: Logs

/**
 *      [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
 *      The contents of this file are subject to the License; you may not use this file except in compliance with the License. 
 *
 *      @version $Revision: 2197 $
 */
require "../libraries/common.inc.php";
uses("log");
require PHPB2B_ROOT . './libraries/page.class.php';
require "session_cp.inc.php";
$log = new Logs();
$page = new Pages();
$conditions = array();
if (isset($_POST['del']) && !empty($_POST['id'])) {
    $log->del($_POST['id']);
}
if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    if ($do == "clear") {
        $result = $pdb->Execute("truncate {$tb_prefix}logs");
    }
    if ($do == "del" && !empty($_GET['id'])) {
        $log->del($_GET['id']);
    }
    if ($do == 'search') {
        if (!empty($_GET['q'])) {
            $conditions[] = "description like '%" . $_GET['q'] . "%'";
        }
    }
}
开发者ID:reboxhost,项目名称:phpb2b,代码行数:30,代码来源:log.php


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