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


PHP Services::findAll方法代码示例

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


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

示例1: Services

<?php

/**
 *      [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: 2048 $
 */
define('CURSCRIPT', 'service');
chdir('../');
require "libraries/common.inc.php";
require "share.inc.php";
require CACHE_PATH . "cache_typeoption.php";
uses("service");
$service = new Services();
$answered_result = $service->findAll("id,title,created,revert_content,revert_date,type_id", null, "status=1 AND revert_content!=''", "id DESC", 0, 15);
$result = $service->findAll("id,title,created,revert_content,revert_date,type_id", null, "status=1", "id DESC", 0, 15);
setvar("AnsweredService", $service->formatResult($answered_result));
setvar("LatestService", $service->formatResult($result));
setvar("ServiceTypes", $_PB_CACHE['service_type']);
render("service/index");
开发者ID:renduples,项目名称:alibtob,代码行数:21,代码来源:index.php

示例2: template

        $tpl_file = "service.edit";
        template($tpl_file);
        exit;
    }
    if ($do == "search") {
        if (!empty($_GET['type_id'])) {
            $conditions[] = "Service.type_id=" . $_GET['type_id'];
        }
        if (!empty($_GET['q'])) {
            $conditions[] = "Service.title like '%" . $_GET['q'] . "%' OR Service.content like '%" . $_GET['q'] . "%'";
        }
    }
}
$amount = $service->findCount(null, $conditions, "Service.id");
$page->setPagenav($amount);
setvar("Items", $service->findAll("*", null, $conditions, "Service.id DESC ", $page->firstcount, $page->displaypg));
setvar("ByPages", $page->pagenav);
if (isset($_REQUEST['del'])) {
    $deleted = false;
    if (!empty($_POST['id'])) {
        $deleted = $service->del($_POST['id']);
    }
    if (!empty($_GET['id'])) {
        $deleted = $service->del($_GET['id']);
    }
    if ($deleted) {
        pheader("location:service.php");
    } else {
        flash();
    }
}
开发者ID:reboxhost,项目名称:phpb2b,代码行数:31,代码来源:service.php

示例3: Services

<?php

/**
 *      [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: 2048 $
 */
define('CURSCRIPT', 'list');
chdir('../');
require "libraries/common.inc.php";
require "share.inc.php";
require CACHE_PATH . "cache_typeoption.php";
uses("service");
$service = new Services();
$conditions[] = "status=1";
$viewhelper->setPosition(L("customer_service_center", "tpl"), "service.php");
$viewhelper->setTitle(L("customer_service_center", "tpl"));
if (isset($_GET['typeid'])) {
    $type_id = intval($_GET['typeid']);
    $conditions[] = "type_id=" . $type_id;
    setvar("TypeName", $_PB_CACHE['service_type'][$type_id]);
    $viewhelper->setPosition($_PB_CACHE['service_type'][$type_id]);
    $viewhelper->setTitle($_PB_CACHE['service_type'][$type_id]);
}
$amount = $service->findCount(null, $conditions, "id");
$result = $service->findAll("id,title,created,revert_content,revert_date,type_id", null, $conditions, "id DESC", $pos, $limit);
setvar("items", $service->formatResult($result));
setvar("ServiceTypes", $_PB_CACHE['service_type']);
setvar("paging", array('total' => $amount));
render("service/list");
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:list.php


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