#!/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"};
    delete $INC{"Kantelpunten/MyContent.pm"};
}
use Kantelpunten::Helper;
use Kantelpunten::MyContent;
#use Data::Dumper;

local our $logo_root;

make_links_html();
exit(0);
    
sub make_links_html()
{
	my $remote_ip = init_helper();
	init_content();
	get_user_rec();
    my $script = make_home_script(10075);

    $logo_root  = "http://www.kantelpunten.com/pics/logo/";
	my $title = "Kantelpunten : Link Partners - Bezoek ook eens onze link partners.";
	my $desc  = "Wordt ook een link partners van deze beleggers site: Trade-Extender," .
		" Top2525, BeursXL, EntertainmentTrack, BeursStartpagina, Symbaloo, Smart-Invest, Dagaanbieding, Cente, BeursBlik, Euribor-Rates";
    
	my $pop_menu = make_pop_menu(14, 10075);
    my $top_menu = make_top_menu(14, 10075);

    print_header("+0m");
    print_pre_doc();
    print_head($title, undef, undef, undef, $script, "kantelhist", undef, 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()
{
    # oude verwijderde werken niet: "top2525", "smartinv"
    my @links = ("tradeext", "beursxl", "entertain", "beursstart", "b9", "symbaloo", "dagaanb", "cente",
    		     "graf_analy", "beursblik", "euribor");
                 
    my $table = make_beurs_link_table("70%");

    my @rand_links = ();
    while(@links)
    { 
        push(@rand_links, splice(@links, rand(@links), 1)) 
    }

    
    print_div("center");   
    print_h1("Linkpartners");

    print <<EndOfText;
<span><small>
Onze gratis kantelpunten-content wordt ook getoond op de volgende sites:<br>
<br>
$table
<br>
<br>
Overige link partners:<br>
<br>
</small></span>
EndOfText

    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, undef, undef, "middle");
        print_links($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 "<tr><td>&nbsp;</td></tr>\n";
    print_table(0, "end");
#    print "<a href=\"http://www.businesspagesupdate.co.uk\">Business Pages Update</a>\n";
    print "<a href=\"/pl/ShowMain.pl?page=10110\" target=\"_blank\">";
    print "<img vspace=\"0\"\n";
    print "      hspace=\"0\"\n";
    print "      style=\"border: 0px solid ; width: 468px; height: 60px;\"\n";
    print "      alt=\"\"\n";
    print "      title=\"Test gratis uw IQ.\"\n";
    print "      src=\"${logo_root}test_mijn_iq_logo.jpg\"></a>\n";
    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 print_links(@)
{
    my @ads = @_;
    my $printed = 0;
    my $target = ""; # "target=\"_blank\""
  
    print_div("center");
    foreach my $i (@ads)
    {
		if ($i eq "beursxl")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10073\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 115px; height: 35px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Het complete financiële portaal!\"\n";
            print "      src=\"${logo_root}beursxl_logo.gif\"></a>\n";
            $printed++;
        }
		elsif ($i eq "tradeext")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10032\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 225px; height: 35px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Een extensie op uw eigen streaming leverancier\"\n";
            print "      src=\"${logo_root}tradeext_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "tipbel")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10055\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 120px; height: 60px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Elke dag een gratis tip...\"\n";
            print "      src=\"${logo_root}tipbelegger_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "top2525")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?&page=10061\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 117px; height: 26px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Best of the web: Vele interessante sites\"\n";
            print "      src=\"${logo_root}top2525_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "entertain")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10076\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 220px; height: 60px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Entertainmenttrack.com\"\n";
            print "      src=\"${logo_root}entertain_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "beursstart")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10078\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 190px; height: 41px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"De beurs start pagina van nederland i.s.m. startpagina.nl\"\n";
            print "      src=\"${logo_root}beursstartpagina_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "b9")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10079\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 225px; height: 35px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"B9-Beleggen. Een starpagina vol beleggings-sites\"\n";
            print "      src=\"${logo_root}b9_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "nlbeurs")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10081\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 130px; height: 81px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"NLBeurs,nl de startpagina voor serieuze beleggers\"\n";
            print "      src=\"${logo_root}nlbeurs_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "symbaloo")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10084\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 125px; height: 125px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Symbaloo de meeste simpele startpagina op internet.\"\n";
            print "      src=\"${logo_root}symbaloo_logo.jpg\"></a>\n";
            $printed++;
        }
        elsif ($i eq "smartinv")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10086\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 209px; height: 34px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"De online leidraad voor de beginnende belegger.\"\n";
            print "      src=\"${logo_root}smart-invest_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "dagaanb")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10087\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 311px; height: 69px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Alle dagaanbiedingen in 1 overzicht!\"\n";
            print "      src=\"${logo_root}dagaanbieding_logo.jpg\"></a>\n";
            $printed++;
        }
        elsif ($i eq "cente")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10088\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 147px; height: 35px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Cente\"\n";
            print "      src=\"${logo_root}logo_cente.jpg\"></a>\n";
            $printed++;
        }
        elsif ($i eq "graf_analy")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10091\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 195px; height: 25px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Grafische Analyse\"\n";
            print "      src=\"${logo_root}graf_analy_logo.gif\"></a>\n";
            $printed++;
        }
        elsif ($i eq "beursblik")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10092\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 195px; height: 25px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Uw eigen beurs startpagina samenstellen met alle koersen.\"\n";
            print "      src=\"${logo_root}beursblik_logo.jpg\"></a>\n";
            $printed++;
        }
        elsif ($i eq "euribor")
        {
            print "&nbsp;&nbsp;" if ($printed);
            print "<a href=\"/pl/ShowMain.pl?page=10093\" $target>";
            print "<img vspace=\"0\"\n";
            print "      hspace=\"0\"\n";
            print "      style=\"border: 0px solid ; width: 246px; height: 35px;\"\n";
            print "      alt=\"\"\n";
            print "      title=\"Euribor rates - All information on Euribor.\"\n";
            print "      src=\"${logo_root}euribor_logo.gif\"></a>\n";
            $printed++;
        }
    }
   
    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: Links Bottom
google_ad_channel = "3163401094";
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
}

