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


PHP CFile::countList方法代码示例

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


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

示例1: countUnsentDocItems

 /**
  * Count unsent document items
  *
  * @return void
  */
 function countUnsentDocItems()
 {
     $where["file_category_id"] = "= '{$this->_id}'";
     $where["etat_envoi"] = "!= 'oui'";
     $where["object_id"] = "IS NOT NULL";
     $file = new CFile();
     $this->_count_unsent_files = $file->countList($where);
     $document = new CCompteRendu();
     $this->_count_unsent_documents = $document->countList($where);
     $this->_count_unsent_doc_items = $this->_count_unsent_documents + $this->_count_unsent_files;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:16,代码来源:CFilesCategory.class.php

示例2: CFilesCategory

$do = CValue::get("do", "0");
// Auto send categories
$category = new CFilesCategory();
$category->send_auto = "1";
foreach ($categories = $category->loadMatchingList() as $_category) {
    $_category->countDocItems();
    $_category->countUnsentDocItems();
}
// Unsent docItems
$max_load = CAppUI::conf("dPfiles CDocumentSender auto_max_load");
$where["file_category_id"] = CSQLDataSource::prepareIn(array_keys($categories));
$where["etat_envoi"] = "!= 'oui'";
$where["object_id"] = "IS NOT NULL";
$file = new CFile();
$items["CFile"] = $file->loadList($where, "file_id DESC", $max_load);
$count["CFile"] = $file->countList($where);
$document = new CCompteRendu();
$items["CCompteRendu"] = $document->loadList($where, "compte_rendu_id DESC", $max_load);
$count["CCompteRendu"] = $document->countList($where);
// Sending
$max_send = CAppUI::conf("dPfiles CDocumentSender auto_max_send");
foreach ($items as $_items) {
    $sent = 0;
    /** @var CDocumentItem[] $_items */
    foreach ($_items as $_item) {
        $_item->loadTargetObject();
        if ($do && !$_item->_send_problem) {
            // Max sent
            if (++$sent > $max_send) {
                break;
            }
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:send_documents.php

示例3: CFile

<?php

/**
 * $Id$
 *
 * @category Files
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkAdmin();
$file = new CFile();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("listNbFiles", range(1, 10));
$smarty->assign("today", CMbDT::date());
$smarty->assign("nb_files", $file->countList() / 100);
$smarty->display("configure.tpl");
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:20,代码来源:configure.php

示例4: CFile

$extensions = CValue::get("extensions", CFile::$file_types);
$file = new CFile();
$where = array();
$where["object_class"] = " NOT LIKE 'CFile'";
// Ne convertir que les fichiers dont le nom se finit par une extension convertible
$like = "";
$types = preg_split("/[\\s]+/", $extensions);
foreach ($types as $key => $_type) {
    $like .= " file_name LIKE '%.{$_type}'";
    if ($key != count($types) - 1) {
        $like .= " OR";
    }
}
$where[] = $like;
$where[] = "file_id NOT IN (SELECT object_id from files_mediboard WHERE object_class LIKE 'CFile')";
$order = "file_id DESC";
$files = $file->loadList($where, $order, $nb_files);
$nb_files_total = $file->countList($where);
$converted = 0;
$not_converted = "";
foreach ($files as $_file) {
    if ($_file->convertToPDF()) {
        $converted++;
    } else {
        $not_converted .= $_file->_id . " - ";
    }
}
CAppUI::stepAjax("{$converted}/" . count($files) . " fichiers convertis parmi {$nb_files_total}");
if ($converted != count($files)) {
    trigger_error("Les fichiers suivants n'ont pas été convertis : {$not_converted}", E_USER_ERROR);
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_file_to_pdf.php


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