<?php
#
#   FILE:  EditRSSExport.php
#
#   Part of the Collection Workflow Integration System (CWIS)
#   Copyright 2011 Internet Scout Project
#   http://scout.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 id="F_NotifyBrowser" 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()
{
    print OurBaseUrl()."index.php?P=RSS";
}

# ----- 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();
$DB->Query("SELECT * FROM RSSConfiguration");

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