本文整理汇总了PHP中projects::CountProjectNew方法的典型用法代码示例。如果您正苦于以下问题:PHP projects::CountProjectNew方法的具体用法?PHP projects::CountProjectNew怎么用?PHP projects::CountProjectNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类projects
的用法示例。
在下文中一共展示了projects::CountProjectNew方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CountProjectByID
/**
* Вычисляет положение проекта в ленте на соответствующей вкладке по его ID
* @param type $project_id
*/
function CountProjectByID($project_id)
{
global $DB;
if (!$project_id) {
return false;
}
$prj = $DB->row("SELECT kind, top_from, top_to, strong_top, post_date FROM projects WHERE id = ?i", (int) $project_id);
if (!$prj) {
return false;
}
return projects::CountProjectNew($prj['post_date'], $prj['kind'], $prj['top_from'], $prj['top_to'], $prj['strong_top']);
}
示例2: floor
</table>
<?php
}
?>
</div>
</td>
<td width="240px">
<br><br>
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td> </td>
<td><b>Статистика по объявлению:</b><br><?php
if ($prj["closed"] == "t") {
} else {
$payed = $prj["payed_to"] > $prj["now"] && $prj["payed"] ? 1 : 0;
$counte = $projects->CountProjectNew($prj['post_date'], $prj['kind'], $prj['top_from'], $prj['top_to'], $prj['strong_top']);
$page = floor($counte / $GLOBALS["prjspp"]) + 1;
$counte_page = $counte % $GLOBALS["prjspp"];
?>
<a class="public_blue" href="/projects/?kind=<?php
echo $prj['kind'];
?>
&page=<?php
echo $page;
?>
#prj<?php
echo $prj['id'];
?>
"><?php
echo $counte_page;
?>