#!/usr/bin/perl
# ----------------------------------------------------------------------------
#
#  (c) Copyright 2006 TradeExtender
# 
#  This software is proprietary to and embodies the confidential technology 
#  of TradeExtender. Possession, use, duplication or dissemination of the 
#  software and media is authorized only pursuant to a valid written license 
#  from TradeExtender.
#

use strict;
use lib "/var/www/vhosts/kantelpunten.com/httpdocs/pl/lib";
use lib "lib";
BEGIN {
    delete $INC{"Kantelpunten/Helper.pm"};
}
use Kantelpunten::Helper;
#use Data::Dumper;

make_links_html();
exit(0);
    
sub make_links_html()
{
	my $remote_ip = init_helper();
    my $script = make_home_script(10046);

	my $title = "Kantelpunten : Favoriete sites - Interessante beleggers sites.";
	my $desc  = "Onze favoriete beurs sites: Trade-Extender, Yahoo, DFT, EuroBench, Bellegger," .
		" Boursorame, GuruWacth, Behr, WalstreetWeb, Dividend, Beursplaze," .
		" ComDirect, BeursDuivel, Beurskenners";

    my $pop_menu = make_pop_menu(14, 10046);
    my $top_menu = make_top_menu(14, 10046);

    print_header("+0m");
    print_pre_doc();
    print_head($title, undef, undef, undef, $script, "info", "yes", undef, $desc, undef, "top_script");
    print_body("info", undef, undef, undef, undef, undef, undef, "kader", undef, $pop_menu, $top_menu);
    make_links();
    print_body("end_kader");
    print_post_doc();
}

sub make_links()
{
    # verwijdert geen inframe en niet meer aardig: "comdirect",
    my @links = ("ft", "yahoo", "euronext", "dft", "eb", "belegger", "bours", "guru", 
                 "behr", "wsweb", "dividend", "beursplaza", "tradeext", "phplot",
                 "bduivel", "beurskenners");
                 
    my @rand_links = ();
    while(@links)
    { 
        push(@rand_links, splice(@links, rand(@links), 1)) 
    }

    print_div("center");   
    print_h1("Links naar Interessante Sites");

    print_table(0, undef, 0, 10, 0, undef, "100%", "center");
    my $i = 0;
    my $col = 3;
    foreach my $link (@rand_links)
    {
        print_tr() if ($i == 0); 
        print_td(1, "center", undef, "60px", undef, "middle");
        print_ads($link);
        print_td(1, "end");
        $i++;
        print_tr(0, "end") if ($i == $col);
        $i = 0  if ($i >= $col);
    }
    if ($i != 0)
    {
        for (my $j = $i; $j < $col; $j++)
        {
            print_td(1, "center", undef, undef, undef, "middle", "&nbsp;");
        }
        print_tr(0, "end");
    }
    print <<EndOfText;
EndOfText
    print_table(0, "end");
    print "<br><span class=\"dblack\"><small>\n";
    print "___________________________________________________________<br>\n";
    print "gesponsorde koppelingen<br>\n";
    print "</small></span><br>\n";
    print get_add() . "<br><br>\n";
    print get_add() . "<br><br>\n";
    print get_add() . "<br>\n";
    print_voet_start();
    print_div("end");
}

sub get_add()
{
	return <<EndOfText;
<script type="text/javascript"><!--
google_ad_client = "pub-4821193916913283";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
//2007-08-24: Interest Bottom
google_ad_channel = "3956639149";
google_color_border = "FFCC99";
google_color_bg = "FFCC99";
google_color_link = "0000EE";
google_color_text = "000099";
google_color_url = "000099";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
EndOfText
}

