<?php
#
#   FILE:  SPT--EditRSSExport.php
#
#   FUNCTIONS PROVIDED:
#       None
#
#   FUNCTIONS EXPECTED:
#       None
#
#   Part of the Scout Portal Toolkit
#   Copyright 2001 Internet Scout Project
#   http://scout.cs.wisc.edu
#

PageTitle("Edit RSS Export Values");

# ----- EXPORTED FUNCTIONS ---------------------------------------------------

function PrintEntriesToPublish()
{
    global $Entry;

    print $Entry["EntriesToPublish"]; 
}

function PrintNotifyBrowser()
{
    global $Entry;

    $NotifyBrowser = $Entry['NotifyBrowser'] ? 1 : 0;
    $NotifyArray = array(0=>"Do Not Notify","Notify");

    ?><select name="F_NotifyBrowser"><?PHP

    while (list($Key,$Val) = each($NotifyArray))
    {
        ?><option value="<?PHP echo $Key; ?>"<?PHP

        if ($Key == $NotifyBrowser)
            echo " selected";

        ?>><?PHP echo $Val; ?></option><?PHP
    }
    ?></select><?PHP
}

function PrintChannelTitle()
{
    global $Entry;

    print $Entry["ChannelTitle"]; 
}

function PrintChannelDescription()
{
    global $Entry;

    print $Entry["ChannelDescription"]; 
}

function PrintImageUrl()
{
    global $Entry;

    print $Entry["ImageUrl"]; 
}

function PrintImageTitle()
{
    global $Entry;

    print $Entry["ImageTitle"]; 
}

function PrintImageLink()
{
    global $Entry;

    print $Entry["ImageLink"]; 
}

function PrintImageHeight()
{
    global $Entry;

    print $Entry["ImageHeight"]; 
}

function PrintImageWidth()
{
    global $Entry;

    print $Entry["ImageWidth"]; 
}

function PrintImageDescription()
{
    global $Entry;

    print $Entry["ImageDescription"]; 
}

function PrintLanguage()
{
    global $Entry;

    print $Entry["Language"]; 
}

function PrintCopyright()
{
    global $Entry;

    print $Entry["Copyright"]; 
}

function PrintManagingEditor()
{
    global $Entry;

    print $Entry["ManagingEditor"]; 
}

function PrintWebmaster()
{
    global $Entry;

    print $Entry["Webmaster"]; 
}

function PrintPicsRating()
{
    global $Entry;

    print $Entry["PicsRating"]; 
}

function PrintRSSFeed()
{
    global $_SERVER;

    print str_replace("EditRSSExport", "RSS", "http://".$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]);

}

# ----- LOCAL FUNCTIONS ------------------------------------------------------

# ----- MAIN -----------------------------------------------------------------

# non-standard global variables
global $Entry;
global $_SERVER;

# check if current user is authorized
if (!CheckAuthorization(PRIV_SYSADMIN)) {  return;  }

$DB = new SPTDatabase();

$Query = "Select * from RSSConfiguration";
$DB->Query($Query);

# only one entry
$Entry = $DB->FetchRow();

?>
