<?PHP
print "<?xml version='1.0' encoding='UTF-8' ?>\n";

include "../common.php";

header('Content-type: text/xml');
$today = date("Y-m-d H:i:s");
$todaysdate = date("D, d M Y H:i:s T");

$GetPodcasts = mysqli_query($linkID, "SELECT * FROM articles WHERE type = 'podcast' and site='fr' and active=1 and postdate < '".$today."' ORDER BY postdate");

?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<title>FUMcast</title>
<link>https://www.franchising.com/?ref=podcast</link>
<language>en-us</language>
<copyright>Copyright <?PHP print date("Y"); ?>, By Franchise Update Media</copyright>
<itunes:subtitle>Franchise News, Interviews &amp; More.</itunes:subtitle>
<itunes:author>Franchising.com</itunes:author>
<itunes:summary>The Inside Franchising Podcast features leading franchisors and their franchisees together like you've never heard them-We discuss real world franchising stuff -- business models, systems, training and support, marketing challenges and franchisee success stories. It's a whole new close up, real world look at franchising not found anywhere else!</itunes:summary>
<description>The Inside Franchising Podcast features leading franchisors and their franchisees together like you've never heard them-We discuss real world franchising stuff -- business models, systems, training and support, marketing challenges and franchisee success stories. It's a whole new close up, real world look at franchising not found anywhere else!</description>
<itunes:owner>
    <itunes:name>Franchise Update Media</itunes:name>
    <itunes:email>podcast@franchiseupdatemedia.com</itunes:email>
</itunes:owner>
<itunes:image href="https://www.franchising.com/images/podcast_cover.png" />
<image>
  <url>https://www.franchising.com/images/podcast_cover.jpg</url>
  <title>FUMcast</title>
  <link>https://www.franchising.com/?ref=podcast</link>
  <width>600</width>
  <height>600</height>
</image>

<itunes:category text="Business">
  <itunes:category text="Investing" />
  <itunes:category text="Careers"/>
  <itunes:category text="Business News"/>
  <itunes:category text="Management &amp; Marketing"/>
</itunes:category>
<?PHP
while ($row = mysqli_fetch_object($GetPodcasts)) {
    $filelocation = "episodes/".$row->url;
?>
  <item>
    <title><?PHP print $row->headline; ?></title>
    <itunes:author>Franchise Update Media</itunes:author>
    <itunes:subtitle><![CDATA[<?PHP print $row->summary; ?>]]></itunes:subtitle>
    <itunes:summary><![CDATA[<?PHP print $row->content; ?>]]></itunes:summary>
    <enclosure url="https://www.franchising.com/podtrack/<?PHP print $row->id; ?>.mp3" length="<?PHP print filesize($filelocation); ?>" type="audio/mpeg" />
    <guid>http://www.franchising.com/podtrack/<?PHP print $row->id; ?>.mp3</guid>
    <pubDate><?php print date("D, d M Y H:i:s T",  strtotime($row->postdate)); ?></pubDate>
    <itunes:duration><?PHP print $row->duration; ?></itunes:duration>
    <itunes:keywords><?PHP print $row->keywords; ?></itunes:keywords>
  </item>
<?PHP } ?>
</channel>
</rss><?PHP mysqli_close($linkID); ?>