<?php
// $Id: first.php,v 1.1.1.1 2002/09/15 22:26:15 root Exp $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Jim McDonald
// Purpose of file: Show first items in amazon
// ----------------------------------------------------------------------

/**
 * initialise block
 */
function amazon_firstblock_init()
{
    // Security
    pnSecAddSchema( 'Amazon:Firstblock:', 'Block title::' );
}

/**
 * get information on block
 */
function amazon_firstblock_info()
{
    // Values
    return array( 'text_type' => 'First',
                  'module' => 'Amazon',
                  'text_type_long' => 'Show first example items (alphabetical)',
                  'allow_multiple' => true,
                  'form_content' => false,
                  'form_refresh' => false,
                  'show_preview' => true );
}

/**
 * display block
 */
function amazon_firstblock_display( $blockinfo )
{
    // Security check
    if ( !pnSecAuthAction( 0,
                           'Amazon:Firstblock:',
                           "$blockinfo[title]::",
                           ACCESS_READ ) )
    {
        return;
    }

    $output = new pnHTML();
    $output->SetInputMode( _PNH_VERBATIMINPUT );

    $blockHTML = ""
        . "<div align=\"center\">"

        . '<img src="http://s1.amazon.com/exec/varzea/tipbox/A2IWUOPE0CRBV7/TFWELSCG1KMJH" usemap="#TFWELSCG1KMJH" border="0" alt="Amazon Honor System">'
        . '<map name="TFWELSCG1KMJH">'
        . '<area coords="13,64,108,117" href="http://s1.amazon.com/exec/varzea/pay/TFWELSCG1KMJH" alt="Click Here to Pay" target="_amazon">'
        . '<area coords="13,133,108,145" href="http://s1.amazon.com/exec/varzea/subst/fx/help/how-we-know.html" alt="Learn More" target="_amazon">'
        . '</map>'
        . '<hr style="margin:0px;padding:0px;border: 6px solid #FFF;">'

        . '<a href="http://www.amazon.com/exec/obidos/redirect-home/kidspages-20" target="_amazon"><img src="images/logos/amazon-137X40.gif" alt="Support Kids\' Pages Cares at Amazon.com" border="0"></a><br />'
        . 'Shopping online? Help support Kids\' Pages Cares with every purchase at <a href="http://www.amazon.com/exec/obidos/redirect-home/kidspages-20" target="_amazon"><strong>Amazon.com</strong></a>, '
        . 'when you click on <a href="http://www.amazon.com/exec/obidos/redirect-home/kidspages-20" target="_amazon"><strong>this link to Amazon</strong></a>.'

/*
        . '<hr style="margin:0px;padding:0px;border: 6px solid #FFF;">'

        . "<div class=\"books-header\">Books</div>"
        . '<div class="books-block"><div class="books-block-contents" align="center"><a href="http://www.amazon.com/exec/obidos/redirect?tag=kidspages-20&amp;creative=9325&amp;camp=1789&amp;link_code=as2&amp;path=ASIN/0763616052" target="_amazon"><img border="0" src="http://images.amazon.com/images/P/0763616052.01._SCMZZZZZZZ_.jpg"><br />Because of Winn-Dixie</a></div></div><br style="clear: both;">'
        . '<div class="books-block"><div class="books-block-contents" align="center"><a href="http://www.amazon.com/exec/obidos/redirect?tag=kidspages-20&amp;creative=9325&amp;camp=1789&amp;link_code=as2&amp;path=ASIN/006055598X" target="_amazon"><img border="0" src="http://images.amazon.com/images/P/006055598X.01._SCMZZZZZZZ_.jpg"><br />Arrowville</a><img src="http://www.assoc-amazon.com/e/ir?t=kidspages-20&amp;l=as2&amp;o=1&amp;a=006055598X" width="1" height="1" border="0" alt="" /></div></div><br style="clear: both;">'

        . "<div class=\"books-header\">DVDs</div>"
        . '<div class="books-block"><div class="books-block-contents" align="center"><a href="http://www.amazon.com/exec/obidos/redirect?tag=kidspages-20&amp;creative=9325&amp;camp=1789&amp;link_code=as2&amp;path=ASIN/B00005JN4W" target="_amazon"><img border="0" src="http://images.amazon.com/images/P/B00005JN4W.01._SCMZZZZZZZ_.jpg"><br />The Incredibles</a><img src="http://www.assoc-amazon.com/e/ir?t=kidspages-20&amp;l=as2&amp;o=1&amp;a=B00005JN4W" width="1" height="1" border="0" alt="" /></div></div><br style="clear: both;">'
*/

/*
This is all you ever need:
http://amazon.com/o/ASIN/#/ref=nosim/kidspages-20/
Put the asin where you see the #, and your ID where it says YourID.
You don't need the ref=nosim/ of course. Many of us like it because it takes you to the detail page for that item.
*/ 






//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B00000JS62/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B00000JS62.01.MZZZZZZZ.jpg" width="92" height="140" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B00000JS62/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">The Wizard of Oz</a> </div></div><br style="clear: both;">'
//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B0002VEPRQ/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B0002VEPRQ.01.MZZZZZZZ.jpg" width="100" height="140" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B0002VEPRQ/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">Mary Poppins (40th Anniversary Edition)</a> </div></div><br style="clear: both;">'
//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B00005RRG7/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B00005RRG7.01.MZZZZZZZ.jpg" width="97" height="140" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B00005RRG7/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">Swiss Family Robinson (Vault Disney Collection)</a> </div></div><br style="clear: both;">'

//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B00005RRG9/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B00005RRG9.01.MZZZZZZZ.jpg" width="97" height="140" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B00005RRG9/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">The Parent Trap (Vault Disney Collection)</a> </div></div><br style="clear: both;">'
//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B000067J1Q/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B000067J1P.01.MZZZZZZZ.jpg" width="103" height="140" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B000067J1Q/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">The Sound of Music</a></div></div><br style="clear: both;">'
//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B00005QJEF/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B00005QJEF.01.MZZZZZZZ.jpg" width="98" height="140" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B00005QJEF/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">Willy Wonka &amp; the Chocolate Factory (30th Anniversary Edition - Widescreen)</a> </div></div><br style="clear: both;">'
//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B0002H3S6O/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B0002H3S6O.01._PE_SCMZZZZZZZ_.jpg" width="107" height="154" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B0002H3S6O/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">Benji</a> </div></div><br style="clear: both;">'
//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B00009YXAT/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B00009YXAT.01.MZZZZZZZ.jpg" width="98" height="140" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B00009YXAT/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">Escape to Witch Mountain (Special Edition)</a> </div></div><br style="clear: both;">'
//        . '<div class="books-block"><div class="books-block-image" align="center"><a href="http://www.amazon.com/exec/obidos/ASIN/B00003CX9Q/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon"><img src="http://images.amazon.com/images/P/B00003CX9Q.01.MZZZZZZZ.jpg" width="106" height="140" border="0"></a> </div><div class="books-block-contents"><a href="http://www.amazon.com/exec/obidos/ASIN/B00003CX9Q/kidspages-20?dev-t=D2TOPUJVTEXGAN%26camp=2025%26link_code=xm2" target="kpamazon">E.T. - The Extra-Terrestrial (Widescreen Collector\'s Edition)</a> </div></div>'

//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0689852614/kidspages-20\" target=\"kpamazon\"><img src=\"http://images.amazon.com/images/P/0689852614.01.TZZZZZZZ.jpg\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0689852614/kidspages-20\" target=\"kpamazon\">Tinka</a> by Rainy Dohaney</div></div><br style=\"clear: both;\">"

//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0060286091/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0060286091.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0060286091/kidspages-20\" target=\"kpamazon\">Don’t Know Much About The Pilgrims</a> by Kenneth C. Davis</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0785700102/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0785700102.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0785700102/kidspages-20\" target=\"kpamazon\">Alligator Arrived With Apples: A Potluck Alphabet Feast</a> by Crescent Dragonwagon</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0142300063/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0142300063.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0142300063/kidspages-20\" target=\"kpamazon\">One Little, Two Little, Three Little Pilgrims</a> by B. G. Hennessy</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0689847874/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0689847874.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0689847874/kidspages-20\" target=\"kpamazon\">Thank You Sarah: The Woman Who Saved Thanksgiving</a> by Laurie Halse Anderson</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0531059057/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0531059057.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0531059057/kidspages-20\" target=\"kpamazon\">‘Twas The Night Before Thanksgiving</a> by Dav Pilkey</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0687390745/kidspages-20\" target=\"kpamazon\">Sometimes It’s Turkey, Sometimes It’s Feathers</a> by Lorna Balian</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0689847610/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0689847610.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0689847610/kidspages-20\" target=\"kpamazon\">Turk And Runt: A Thanksgiving Comedy</a> by Lisa Wheeler</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0064432041/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0064432041.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0064432041/kidspages-20\" target=\"kpamazon\">Thanksgiving At The Tappletons</a> by Eileen Spinelli</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0140565957/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0140565957.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0140565957/kidspages-20\" target=\"kpamazon\">I Know An Old Lady Who Swallowed A Pie</a> by Alison Jackson and Judith Byron Schachner</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-contents\"><a href=\"\" target=\"kpamazon\">Molly’s Pilgrim</a> by Barbara Cohen</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0395547776/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0395547776.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0395547776/kidspages-20\" target=\"kpamazon\">How Many Days to America: A Thanksgiving Story</a> by Eve Bunting</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/156294682X/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/156294682X.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/156294682X/kidspages-20\" target=\"kpamazon\">Crafts for Thanksgiving</a> by Kathy Ross</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/1563972808/kidspages-20\" target=\"kpamazon\">Thanksgiving Fun</a> by Beth Murray</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0689828896/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0689828896.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0689828896/kidspages-20\" target=\"kpamazon\">The Hoboken Chicken Emergency</a> by Daniel Pinkwater</div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0679602372/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/0679602372.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/0679602372/kidspages-20\" target=\"kpamazon\">The Thanksgiving Visitor</a> by Truman Capote</div></div><br style=\"clear: both;\">"

//        ."<div class=\"books-header\">DVDs</div>"

//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00003CXXJ/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/B00003CXXJ.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00003CXXJ/kidspages-20\" target=\"kpamazon\">Shrek: Two-Disc Special Edition</a></div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00005JKDR/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/B00005JKDR.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00005JKDR/kidspages-20\" target=\"kpamazon\">Monsters, Inc.: Two-Disc Collector’s Edition</a></div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00005JKTY/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/B00005JKTY.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00005JKTY/kidspages-20\" target=\"kpamazon\">School House Rock! 30th Anniversary Edition</a></div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00005JM02/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/B00005JM02.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00005JM02/kidspages-20\" target=\"kpamazon\">Finding Nemo: Two-Disc Collector’s Edition</a></div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00003CX8Y/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/B00003CX8Y.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00003CX8Y/kidspages-20\" target=\"kpamazon\">Beauty and the Beast: The Platinum Edition</a></div></div><br style=\"clear: both;\">"
//        ."<div class=\"books-block\"><div class=\"books-block-image\" align=\"center\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00006CXHU/kidspages-20\" target=\"kpamazon\"><img src=\"http://rcm-images.amazon.com/images/P/B00006CXHU.01.TZZZZZZZ\" border=\"0\"></a></div><div class=\"books-block-contents\"><a href=\"http://www.amazon.com/exec/obidos/ASIN/B00006CXHU/kidspages-20\" target=\"kpamazon\">Ice Age:  Two-Disc Special Edition</a></div></div><br style=\"clear: both;\">"

//        ."<a href=\"/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=67&page=1\">More...</a>"

        ."</div>"
        ."\n";

    $output->Text( $blockHTML );

    // Populate block info and pass to theme
    $blockinfo['content'] = $output->GetOutput();
    return themesideblock( $blockinfo );
}

/*
function amazon_firstblock_display( $blockinfo )
{
    // Security check
    if ( !pnSecAuthAction( 0,
                           'Amazon:Firstblock:',
                           "$blockinfo[title]::",
                           ACCESS_READ ) )
    {
        return;
    }

    // Get variables from content block
    $vars = pnBlockVarsFromContent( $blockinfo['content'] );

    // Defaults
    if ( empty( $vars['numitems'] ) )
    {
        $vars['numitems'] = 5;
    }

    // Database information
    pnModDBInfoLoad( 'Amazon' );
    list( $dbconn ) = pnDBGetConn();
    $pntable =pnDBGetTables();
    $amazontable = $pntable['amazon'];
    $amazoncolumn = &$pntable['amazon_column'];

    // Query
    $sql = "SELECT $amazoncolumn[tid],
                   $amazoncolumn[name]
            FROM $amazontable
            ORDER by $amazoncolumn[name]";
    $result = $dbconn->SelectLimit( $sql, $vars['numitems'] );

    if ( $dbconn->ErrorNo() != 0 )
    {
        return;
    }

    if ( $result->EOF )
    {
        return;
    }
    // Create output object
    $output = new pnHTML();

    // Display each item, permissions permitting
    for ( ; !$result->EOF; $result->MoveNext() )
    {
        list( $tid, $name ) = $result->fields;

        if ( pnSecAuthAction( 0,
                              'Amazon::',
                              "$name::$tid",
                              ACCESS_OVERVIEW ) )
        {
            if ( pnSecAuthAction( 0,
                                  'Amazon::',
                                  "$name::$tid",
                                  ACCESS_READ ) )
            {
                $output->URL( pnModURL( 'Amazon',
                                        'user',
                                        'viewdetail',
                                        array('tid' => $tid) ),
                                        $name );
            }
            else
            {
                $output->Text( $name );
            }
            $output->Linebreak();
        }

    }

    // Populate block info and pass to theme
    $blockinfo['content'] = $output->GetOutput();
    return themesideblock( $blockinfo );
}
*/

/**
 * modify block settings
 */
function amazon_firstblock_modify( $blockinfo )
{
    // Create output object
    $output = new pnHTML();

    // Get current content
    $vars = pnBlockVarsFromContent( $blockinfo['content'] );

    // Defaults
    if ( empty( $vars['numitems'] ) )
    {
        $vars['numitems'] = 5;
    }

    // Create row
    $row = array();
    $output->SetOutputMode( _PNH_RETURNOUTPUT );
    $row[] = $output->Text( _NUMITEMS );
    $row[] = $output->FormText( 'numitems',
                                pnVarPrepForDisplay( $vars['numitems'] ),
                                5,
                                5 );
    $output->SetOutputMode( _PNH_KEEPOUTPUT );

    // Add row
    $output->SetInputMode( _PNH_VERBATIMINPUT );
    $output->TableAddRow( $row, 'left' );
    $output->SetInputMode( _PNH_PARSEINPUT );

    // Return output
    return $output->GetOutput();
}

/**
 * update block settings
 */
function amazon_firstblock_update( $blockinfo )
{
    $vars['numitems'] = pnVarCleanFromInput( 'numitems' );

    $blockinfo['content'] = pnBlockVarsToContent( $vars );

    return $blockinfo;
}

?>
