本文整理汇总了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;
示例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;
}
示例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 = 'Ваше объявление – <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;
}