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


PHP Services::formatResult方法代碼示例

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


在下文中一共展示了Services::formatResult方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: 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::formatResult方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。