本文整理匯總了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;
?>