} else { //include("$absoluteurl"."core/archive_nocat.php"); $PG_mainbody .= showPodcastEpisodes(1, NULL); } } elseif ($_GET['p'] == "ftpfeature") { //To place in admin include "{$absoluteurl}" . "core/ftpfeature.php"; } else { //show recent episodes (don't show all episodes) - no categories distinction $PG_mainbody .= showPodcastEpisodes(0, 0); //parameter, is bool yes or not (all episodes?), the second parameter is the category $PG_mainbody .= '<div style="clear:both;"><p><a href="' . $url . '?p=archive&cat=all"><i class="fa fa-archive"></i> ' . _("Go to episodes archive") . '</a></p></div>'; } } elseif (isset($_GET['name'])) { //include("$absoluteurl"."core/episode.php"); $PG_mainbody .= showSingleEpisode(avoidXSS($_GET['name']), NULL); } else { // if no p= specifies, e.g. just index.php with no GET //show recent episodes (don't show all episodes) - no categories distinction $PG_mainbody .= showPodcastEpisodes(0, 0); //parameter, is bool yes or not (all episodes?), the second parameter is the category $PG_mainbody .= '<div style="clear:both;"><p><a href="' . $url . '?p=archive&cat=all"><i class="fa fa-archive"></i> ' . _("Go to episodes archive") . '</a></p></div>'; } //If the theme folder contains theme.xml then it's a theme for PG 2.0+ with new features and we use the new template engine templates.php if (useNewThemeEngine($theme_path)) { //if function is TRUE include "{$absoluteurl}" . "core/templates.php"; } else { //otherwise use the old theme engine (themes.php) for retrocompatibility include "{$absoluteurl}" . "core/themes.php"; }
} ####### END INCLUDE PHP FUNCTIONS ######################### # SET PAGE TITLE $page_title_prefix = NULL; //Show category name if (isset($_GET['cat']) and $_GET['cat'] != "all" and !isset($_GET['action'])) { $existingCategories = readPodcastCategories($absoluteurl); if (isset($existingCategories[avoidXSS($_GET['cat'])])) { //URL depuration (avoidXSS) $page_title_prefix .= $existingCategories[avoidXSS($_GET['cat'])] . " - "; } } elseif (isset($_GET['p']) and $_GET['p'] == "archive") { $page_title_prefix .= _("All Episodes") . " - "; } elseif (isset($_GET['name'])) { $titleOfEpisode = showSingleEpisode(avoidXSS($_GET['name']), 1); //the last parameter (1) requires just the title to that function if ($titleOfEpisode != NULL) { $page_title_prefix .= "{$titleOfEpisode} - "; } } $page_title = $page_title_prefix . $podcast_title; $theme_file_contents = str_replace("-----PG_PAGETITLE-----", $page_title, $theme_file_contents); include $absoluteurl . "core/admin/loadjavascripts.php"; $theme_file_contents = str_replace("-----PG_JSLOAD-----", $loadjavascripts, $theme_file_contents); ############################### ############################### //LOAD A CSS WITH CLASSES COMMON TO ALL THE THEMES $commonCSSurl = '<link href="themes/common.css" rel="stylesheet">'; //ADDING FONT AWESOME, FOR AWESOME ICONS $commonCSSurl .= '<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">';