function getNextRankTime($score, $points_needed, $spm)
{
    $temp = ($points_needed - $score) / ($spm / 60);
    $temp = intToTime($temp);
    return $temp;
}
				<a href="' . $ROOT . '?pid=' . $value['id'] . '">&nbsp;' . $value['name'] . '&nbsp;<img src="' . $ROOT . 'game-images/flags/' . $value['country'] . '.png" width="16" height="12"></a></td>
				<td>' . $value['score'] . '</td>
				<td>' . $value['spm'] . '</td>
				<td>';
    if ($value['kdr']) {
        $template .= $value['kdr'];
    } else {
        $template .= $value['kills'];
    }
    $template .= '</td>
				<td title="' . $value['time'] . '">' . intToTime($value['time']) . '</td>
				<!--<td>
				<img nicetitle="Offline" src="' . $ROOT . 'site-images/offline.png" height="12" width="12">				</td>-->
				<td>';
    if (getLastUpdate(getcwd() . '/cache/' . $value['id'] . '.cache') > 0) {
        $template .= intToTime(getLastUpdate(getcwd() . '/cache/' . $value['id'] . '.cache'));
    } else {
        $template .= 'N/A';
    }
    $template .= '</td>
				<td>' . $value['id'] . '</td>
				<!--
				<td><input name="pids[]" value="' . $value['id'] . '" type="checkbox"></td>
				-->
				<td><a nicetitle="Remove ' . $value['name'] . '" href="' . $ROOT . '?go=my-leaderboard&amp;remove=' . $value['id'] . '">
				<img nicetitle="Remove ' . $value['name'] . '" src="' . $ROOT . 'site-images/silk/user_delete.png"></a></td>
				
				
			</tr>';
}
$template .= '</tbody></table>
Exemple #3
0
						<td>';
        if ($searchresults[$i]['kdr']) {
            $template .= $searchresults[$i]['kdr'];
        } else {
            $template .= 'N/A';
        }
        $template .= '</td>
						<td title="' . $searchresults[$i]['time'] . '">' . intToTime($searchresults[$i]['time']) . '</td>
						<!--
						<td><img nicetitle="Offline" src="' . $ROOT . 'site-images/offline.png" height="12" width="12"></td>
						-->
						<td>';
        if (getLastUpdate(getcwd() . '/cache/' . $searchresults[$i]['id'] . '.cache') < 0) {
            $template .= 'N/A';
        } else {
            $template .= intToTime(getLastUpdate(getcwd() . '/cache/' . $searchresults[$i]['id'] . '.cache'));
        }
        $template .= '								
						</td>
						<td>' . $searchresults[$i]['id'] . '</td>
						<!--<td><input name="pids[]" value="46579301" type="checkbox"></td>
						<td><a nicetitle="Remove Alien-=S@U=-" href="' . $ROOT . 'my-leaderboard.php?remove=46579301"><img nicetitle="Remove Alien-=S@U=-" src="' . $ROOT . 'user_delete.png"></a>-->
		</td></tr>';
    }
    $template .= '
			    </tbody></table>
	<!-- END OF RESULT TABLE -->';
}
$template .= '
</form>
<div style="margin: 20px auto 0pt; text-align: center;">
					<td>' . $weapons[$i]['fired'] . '</td>
				</tr>';
}
$template .= '
	
		<tr class="totals sortbottom">			<td>Total</td>
			<td nowrap="nowrap">' . intToTime($equipmentSummary['total']['time']) . '</td>
			<td><span class="abbr" alt="Accounts for ' . $equipmentSummary['total']['totalkills'] . '% of all kills">' . $equipmentSummary['total']['kills'] . '</span></td>

			<td>' . $equipmentSummary['total']['deaths'] . '</td>
			<td>' . round($equipmentSummary['total']['ratio'], 2) . '</td>
			<td>' . round($equipmentSummary['total']['fired'], 0) . '</td>
		</tr>
		<tr class="averages sortbottom">			<td>Averages</td>

			<td nowrap="nowrap">' . intToTime($equipmentSummary['average']['time']) . '</td>
			<td>' . round($equipmentSummary['average']['kills'], 0) . '</td>
			<td>' . round($equipmentSummary['average']['deaths'], 0) . '</td>
			<td>' . round($equipmentSummary['average']['ratio'], 2) . '</td>
			<td>' . round($equipmentSummary['average']['fired'], 0) . '</td>
		</tr>

	</table>
	
	<table border="0" cellspacing="0" cellpadding="0" id="fov" class="stat">
	
		<tr>
			<th colspan="2">Favorite Victims &amp; Worst Enemies</th>
		</tr>
		
		<tr>
Exemple #5
0
    #echo $template;
} else {
    // show the top ten
    $LASTUPDATE = 0;
    $NEXTUPDATE = 0;
    if (isCached('home')) {
        $template = getCache('home');
        $LASTUPDATE = intToTime(getLastUpdate(getcwd() . '/cache/home.cache'));
        $NEXTUPDATE = intToTime(getNextUpdate(getcwd() . '/cache/home.cache', RANKING_REFRESH_TIME));
    } else {
        $topten = getTopTen();
        include_once './template/home.php';
        // write cache file
        writeCache('home', $template);
        $LASTUPDATE = intToTime(0);
        $NEXTUPDATE = intToTime(RANKING_REFRESH_TIME);
    }
    $template = str_replace('{:LASTUPDATE:}', $LASTUPDATE, $template);
    $template = str_replace('{:NEXTUPDATE:}', $NEXTUPDATE, $template);
}
/***************************************************************
 * CLOSE DATABASE CONNECTION AND PROCESS PAGE LOAD TIME
 ***************************************************************/
mysql_close($link);
//processing page END
$time_end = microtime(true);
$time = round($time_end - $time_start, 4);
$template = str_replace('{:PROCESSED:}', $time, $template);
/***************************************************************
 * ECHO THE PAGE :)
 ***************************************************************/