<?php
// $Id: visit.php,v 1.1 2004/07/11 10:28:20 Farsus Exp $
// -------------------------------------------------------------------------//
//			                 RUNCMS                                         //
//                                                                          //
//	 reliable - Unique - Nocost &  Simplicity & ease off use                //
//                       < http://www.runcms.org >                          //
// -------------------------------------------------------------------------//
// Original Author: James Knickelbein
// Author Website : http://www.journeymilwaukee.com
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //

include_once("../../mainfile.php");
$lid = intval($HTTP_GET_VARS['lid']);

$db->query("UPDATE ".$db->prefix("mylinks_links")." SET hits=hits+1 WHERE lid=$lid AND status>0");
$result = $db->query("SELECT url FROM ".$db->prefix("mylinks_links")." WHERE lid=$lid AND status>0");
list($url) = $db->fetch_row($result);

header("Location: $url");
echo "<html><head><meta http-equiv='Refresh' content='0; URL=$url'></meta></head><body></body></html>";
exit();
?>
