<?php

if (!defined('ROOT')) exit('Can\'t Access !');
class friendlink_act extends act {
    function click_action() {
        $friendlink=new friendlink();
        $friendlink->rec_update(array('hits'=>'[hits+1]'),front::get('id'));
        $where=" id=".front::get('id')." ";
        $friendlinks=$friendlink->getrows($where,$limit,'listorder asc,id asc');
        $url=$friendlinks[0][url];
        header("location: $url");
    }
}