by jomasaco on Fri Apr 09, 2010
Code:
<?php
/*BEGIN_INFO
Show Last time the site was updated, and current date.
Stugas-ddl.org
END_INFO*/
if(!defined("WCDDL_GUTS"))
exit;
$ip = $_SERVER['REMOTE_ADDR'];
$sql = 'SELECT dat FROM wcddl_downloads WHERE id = (select Max(id)from wcddl_downloads)';
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$lastime = date("D,M,d H:i",$row[dat]);
$modEnabled = true; //Change to false if don't use
if($modEnabled) {
$indexinfo= '
<table class="tablebg" width="100%" cellspacing="0">
<caption><div class="cap-left"><div class="cap-right">List Updated Last Time</div></div></caption>
<tr>
<td class="row2 nobold" width="100%"><p class="genmed">
IP:'.$ip.'|Site Current Time:'.date("D,M,d H:i").'|List Updated Last Time:'.$lastime.'
</p></td>
</tr>
</table>
';
$core->setTemplateVar("indexedinfo",$indexinfo);
}
?>
Where you want to show the info
Code:
<?=$core->templateVar("indexedinfo")?>