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


PHP projects::CountProjectByID方法代码示例

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


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

示例1: rtrim

    $_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(pathinfo(__FILE__, PATHINFO_DIRNAME) . '/../../'), '/');
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php";
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/config.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/profiler.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/projects_helper.php");
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
//------------------------------------------------------------------------------
$results = array();
//$profiler = new profiler();
//------------------------------------------------------------------------------
//$profiler->start('fill_frl_mem');
//------------------------------------------------------------------------------
//$results['link'] = projects_helper::getStatusUrl('25','decline',6);
$id = 1907699;
$counte = projects::CountProjectByID($id);
$page = floor($counte / $GLOBALS["prjspp"]) + 1;
$counte_page = $counte % $GLOBALS["prjspp"];
$results['$counte'] = $counte;
$results['$page'] = $page;
$results['$counte_page'] = $counte_page;
//------------------------------------------------------------------------------
//$profiler->stop('fill_frl_mem');
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
array_walk($results, function (&$value, $key) {
    $value = sprintf('%s = %s' . PHP_EOL, $key, $value);
});
print_r(implode('', $results));
exit;
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:pos.php

示例2: getPositionProject

function getPositionProject($id, $top_to, $now, $payed, $post_date, $kind)
{
    $objResponse = new xajaxResponse();
    $payed = $top_to > $now && $payed ? 1 : 0;
    $counte = projects::CountProjectByID($id);
    $page = floor($counte / $GLOBALS["prjspp"]) + 1;
    $counte_page = $counte % $GLOBALS["prjspp"];
    if ($counte_page == 0) {
        $counte_page = $GLOBALS["prjspp"];
        $page--;
    }
    $html = '<a class="public_blue" href="/projects/?kind=' . $kind . '&page=' . $page . '#prj' . $id . '">' . $counte_page . '-е по счету (' . $page . '-я страница)</a>';
    $objResponse->assign("prj_pos_{$id}", "innerHTML", $html);
    $objResponse->script("\$('pos_link_{$id}').destroy();");
    return $objResponse;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:16,代码来源:projects.server.php

示例3: getStatProject

function getStatProject($id, $payed_to, $now, $payed, $post_date, $kind, $comm_count, $offers_count)
{
    $objResponse = new xajaxResponse();
    $payed = $payed_to && $payed_to > $now ? 1 : 0;
    $counte = projects::CountProjectByID($id);
    $page = floor($counte / $GLOBALS['prjspp']) + 1;
    $counte_page = $counte % $GLOBALS['prjspp'];
    $html = 'Ваше объявление &ndash; <a class="public_blue" href="/projects/?kind=' . $kind . '&page=' . $page . '#prj' . $id . '">' . $counte_page . '-е по счету (' . $page . '-я страница)</a><br />';
    if (hasPermissions('projects')) {
        $aWatch = projects::getProjectWatch($id);
        $html .= 'Просмотров ' . (int) $aWatch['view_cnt'] . ' (' . (int) $aWatch['today_view_cnt'] . ' за сегодня)<br />';
    }
    if (is_new_prj($post_date) && $comm_count > 0) {
        $html .= "{$comm_count} " . ending($comm_count, 'предложение', 'предложения', 'предложений');
    } elseif ($offers_count > 0) {
        $html .= "{$offers_count} " . ending($offers_count, 'предложение', 'предложения', 'предложений');
    }
    $objResponse->assign("prj_pos_{$id}", 'innerHTML', $html);
    $objResponse->script("\$('pos_link_{$id}').destroy();");
    return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:21,代码来源:projects_ci.server.php


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