Obsesso · Oct 15, 08:08 pm by Rick Silletti
In wine - truth...
In beer - hops?
In too much time on your hands - Obsesso!
Requires TXP 4.0.2
Lee Stewarts "Hit Tracker Plugin"
...and true vision problems.
Have fun
function obsesso($atts)
{
extract(lAtts(array(
'text' => 'Obsesso has logged ',
'label' => '',
'break' => '',
'wraptag' => '',
'class' => __FUNCTION__,
'labeltag' => ''
),$atts));
$thetime = mktime(0,0,0);
$hours = strftime('%H', mktime() - $thetime);
$minutes = strftime('%M', mktime() - $thetime);
$seconds = strftime('%S', mktime() - $thetime);
$sql = "select * from ".PFX."txp_lxs_hit";
$sql .= " where is_own=0";
$sql .= " AND is_404=0";
$sql .= " AND is_duplicate=0";
$sql .= " AND is_file=0";
$sql .= " AND unix_timestamp(time) > '$thetime'";
$result = mysql_num_rows(safe_query($sql));
$out[] = $text;
$out[] = ''.$result. ' : visitors in the last:';
$out[] = $hours. ' : hours';
$out[] = $minutes. ' : mintues';
$out[] = $seconds. ' : seconds';
$out[] = 'Requires Hit Tracker';
if(is_array($out))
{
return doLabel($label, $labeltag).doWrap($out, $wraptag, $break, $class);
}
return '';
}Section: article
