當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。