本文整理汇总了PHP中GDSRHelper::remaining_time_total方法的典型用法代码示例。如果您正苦于以下问题:PHP GDSRHelper::remaining_time_total方法的具体用法?PHP GDSRHelper::remaining_time_total怎么用?PHP GDSRHelper::remaining_time_total使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GDSRHelper
的用法示例。
在下文中一共展示了GDSRHelper::remaining_time_total方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_srt
function render_srt($template, $rating, $unit_count, $votes, $id, $time_restirctions = "N", $time_remaining = 0, $time_date = '')
{
if (($time_restirctions == 'D' || $time_restirctions == 'T') && $time_remaining > 0) {
$time_parts = GDSRHelper::remaining_time_parts($time_remaining);
$time_total = GDSRHelper::remaining_time_total($time_remaining);
$tpl = $template->elm["time_active"];
$rt = html_entity_decode($tpl);
$rt = str_replace('%TR_DATE%', $time_date, $rt);
$rt = str_replace('%TR_YEARS%', $time_parts["year"], $rt);
$rt = str_replace('%TR_MONTHS%', $time_parts["month"], $rt);
$rt = str_replace('%TR_DAYS%', $time_parts["day"], $rt);
$rt = str_replace('%TR_HOURS%', $time_parts["hour"], $rt);
$rt = str_replace('%TR_MINUTES%', $time_parts["minute"], $rt);
$rt = str_replace('%TR_SECONDS%', $time_parts["second"], $rt);
$rt = str_replace('%TOT_DAYS%', $time_total["day"], $rt);
$rt = str_replace('%TOT_HOURS%', $time_total["hour"], $rt);
$rt = str_replace('%TOT_MINUTES%', $time_total["minute"], $rt);
} else {
if ($time_restirctions == 'D' || $time_restirctions == 'T') {
$tpl = $template->elm["time_closed"];
} else {
$tpl = $template->elm["normal"];
}
$rt = html_entity_decode($tpl);
}
$rt = str_replace('%RATING%', $rating, $rt);
$rt = str_replace('%MAX_RATING%', $unit_count, $rt);
$rt = str_replace('%VOTES%', $votes, $rt);
$rt = str_replace('%ID%', $id, $rt);
$word_votes = $template->dep["EWV"];
$tense = $votes == 1 ? $word_votes->elm["singular"] : $word_votes->elm["plural"];
$rt = str_replace('%WORD_VOTES%', __($tense), $rt);
return $rt;
}