############################################################ # PODCAST GENERATOR # # Created by Alberto Betella # http://podcastgen.sourceforge.net # # This is Free Software released under the GNU/GPL License. ############################################################ ########### Security code, avoids cross-site scripting (Register Globals ON) if (isset($_REQUEST['GLOBALS']) or isset($_REQUEST['absoluteurl']) or isset($_REQUEST['amilogged']) or isset($_REQUEST['theme_path'])) { exit; } ########### End ### Check if user is logged ### if (!isUserLogged()) { exit; } ### /* include ("$absoluteurl"."components/xmlparser/loadparser.php"); */ include "{$absoluteurl}" . "core/admin/readXMLcategories.php"; if (file_exists("{$absoluteurl}" . "categories.xml")) { //if (file_exists("$absoluteurl"."categories.xml") AND isset($parser->document->category)) { ///// DETERMINE NEW PODCAST OR EDIT PODCAST MODE if (isset($_GET['do']) and $_GET['do'] == "edit") { //if edit mode $preselectcat = "yes"; //this variable will preselect categories assigned to an episode } else { $preselectcat = "no";
</div>'; } //show PG box $rightboxcontent .= '<div class="rightbox"> <b>' . _("Help") . '</b> <ul> <li><a href="?p=admin&do=serverinfo">' . _("Your server configuration") . '</a></li> <li><a href="http://podcastgen.sourceforge.net/checkforupdates.php?v=' . $podcastgen_version . '" target="_blank">' . _("Check for updates") . '</a></li> <li><a href="http://podcastgen.sourceforge.net/documentation/#faq?ref=local-admin" target="_blank">' . _("Read Documentation") . '</a></li> <li><a href="http://podcastgen.sourceforge.net/support/?ref=local-admin" target="_blank">' . _("Get Support") . '</a></li> </ul> </div>'; } $theme_file_contents = str_replace("-----PG_RIGHTBOX-----", $rightboxcontent, $theme_file_contents); # SET RIGHT OPTIONAL BOX ("freebox") if (isUserLogged()) { //if you are logged do not display freebox $freeboxcontent = NULL; $theme_file_contents = str_replace("-----PG_FREEBOX-----", $freeboxcontent, $theme_file_contents); } elseif ($freebox == "yes") { if (file_exists("{$absoluteurl}" . "freebox-content.txt")) { $freeboxcontenttodisplay = file_get_contents("{$absoluteurl}" . "freebox-content.txt"); $freeboxcontent = "<div class=\"rightbox\">\n\t\t\t\t{$freeboxcontenttodisplay}\n\t\t\t\t</div>"; } else { $freeboxcontent = NULL; } $theme_file_contents = str_replace("-----PG_FREEBOX-----", $freeboxcontent, $theme_file_contents); } else { $freeboxcontent = NULL; $theme_file_contents = str_replace("-----PG_FREEBOX-----", $freeboxcontent, $theme_file_contents); }
<?php // eBPLS_POP_ACTLOG_VIEW_DETAILS: This module allows users to view the details of the specific activity log. ob_start(); require_once "includes/config.php"; require_once "setup/" . $frmDomain . "/setting.php"; require_once "lib/ebpls.lib.php"; dbConnect(); $intUserLevel = isUserLogged(); syncUserCookieDbLogStat(); ?> <html> <head> <title>eBPLS: View Log Details</title> <link href="stylesheets/default.css" rel="stylesheet" type="text/css"> <script language="JavaScript" src="includes/eBPLS.js"></script> </head> <body bgcolor="#FFFFFF" text="#000000" link="" vlink="" alink="" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="CENTER" valign="MIDDLE"> <table width="650" border="0" cellspacing="1" cellpadding="1"> <tr> <td bgcolor="<?php echo $thThemeColor4; ?> " align="RIGHT" class="thText"> <a href="javascript: window.close();"><b>Close this Window [X]</b></a><br> </td>
function showSingleEpisode($singleEpisode, $justTitle) { include "core/includes.php"; $finalOutputEpisodes = NULL; // declare final output to return $resulting_episodes = NULL; //declare the 1st time and then reset ////Validate the current episode //NB. validateSingleEpisode returns [0] episode is supported (bool), [1] Episode Absolute path, [2] Episode XML DB absolute path,[3] File Extension (Type), [4] File MimeType, [5] File name without extension, [6] episode file supported but to XML present $thisPodcastEpisode = validateSingleEpisode($singleEpisode); ////If episode is supported and has a related xml db, and if it's not set to a future date OR if it's set for a future date but you are logged in as admin if ($thisPodcastEpisode[0] == TRUE and !publishInFuture($thisPodcastEpisode[1]) or $thisPodcastEpisode[0] == TRUE and publishInFuture($thisPodcastEpisode[1]) and isUserLogged()) { ////Parse XML data related to the episode // NB. Function parseXMLepisodeData returns: [0] episode title, [1] short description, [2] long description, [3] image associated, [4] iTunes keywords, [5] Explicit language,[6] Author's name,[7] Author's email,[8] PG category 1, [9] PG category 2, [10] PG category 3, [11] file_info_size, [12] file_info_duration, [13] file_info_bitrate, [14] file_info_frequency $thisPodcastEpisodeData = parseXMLepisodeData($thisPodcastEpisode[2]); //// Return just title and end function here, if just title is required if (isset($justTitle) and $justTitle == TRUE) { return $thisPodcastEpisodeData[0]; } //Function ends here //// Start constructing episode HTML output //Theme engine PG version >= 2.0 row-fluid $resulting_episodes .= '<div class="episode">'; $resulting_episodes .= '<div class="span6 col-md-6 6u episodebox">'; //open the single episode DIV ////Title $resulting_episodes .= '<h3 class="episode_title">' . $thisPodcastEpisodeData[0]; if (isItAvideo($thisPodcastEpisode[3])) { $resulting_episodes .= ' <i class="fa fa-youtube-play"></i>'; } //add video icon $resulting_episodes .= '</h3>'; ////Date $resulting_episodes .= '<p class="episode_date">'; $thisEpisodeDate = filemtime($thisPodcastEpisode[1]); if ($thisEpisodeDate > time()) { //if future date $resulting_episodes .= '<i class="fa fa-clock-o fa-2x"></i> '; //show watch icon } $episodeDate = date($dateformat, $thisEpisodeDate); $resulting_episodes .= $episodeDate . '</p>'; //// Edit/Delete button for logged user (i.e. admin) if (isUserLogged()) { $resulting_episodes .= '<p><a class="btn btn-inverse btn-xs btn-mini" href="?p=admin&do=edit&=episode&name=' . urlencode($thisPodcastEpisode[5]) . '.' . $thisPodcastEpisode[3] . '">' . _("Edit / Delete") . '</a></p>'; } //Show Image embedded in the mp3 file or image associated in the images/ folder from previous versions of PG (i.e. 1.4-) - Just jpg and png extension supported if (file_exists($absoluteurl . $img_dir . $thisPodcastEpisode[5] . '.jpg')) { $resulting_episodes .= '<img class="episode_image" src="' . $url . $img_dir . $thisPodcastEpisode[5] . '.jpg" alt="' . $thisPodcastEpisodeData[0] . '" />'; } else { if (file_exists($absoluteurl . $img_dir . $thisPodcastEpisode[5] . '.png')) { $resulting_episodes .= '<img class="episode_image" src="' . $url . $img_dir . $thisPodcastEpisode[5] . '.png" alt="' . $thisPodcastEpisodeData[0] . '" />'; } } //// Show Long description if available, otherwise, short Description if ($thisPodcastEpisodeData[2] != NULL) { $resulting_episodes .= '<div>' . ampersandEntitiesConvert(htmlspecialchars_decode($thisPodcastEpisodeData[2])) . '</div>'; } else { $resulting_episodes .= '<p>' . $thisPodcastEpisodeData[1] . '</p>'; } /// Categories $resulting_episodes .= '<p><em>' . _("Categories") . '</em> '; if ($thisPodcastEpisodeData[8] != "") { $resulting_episodes .= ' | <a href="?p=archive&cat=' . $thisPodcastEpisodeData[8] . '">' . categoryNameFromID($absoluteurl, $thisPodcastEpisodeData[8]) . '</a>'; } if ($thisPodcastEpisodeData[9] != "") { $resulting_episodes .= ' | <a href="?p=archive&cat=' . $thisPodcastEpisodeData[9] . '">' . categoryNameFromID($absoluteurl, $thisPodcastEpisodeData[9]) . '</a>'; } if ($thisPodcastEpisodeData[10] != "") { $resulting_episodes .= ' | <a href="?p=archive&cat=' . $thisPodcastEpisodeData[10] . '">' . categoryNameFromID($absoluteurl, $thisPodcastEpisodeData[10]) . '</a>'; } $resulting_episodes .= '</p>'; ////Buttons (More, Download, Watch). $resulting_episodes .= showButtons($thisPodcastEpisode[5], $thisPodcastEpisode[3], $url, $upload_dir, "singleEpisode", $thisPodcastEpisode[1], $enablestreaming); ////Other details (file type, duration, bitrate, frequency) //NB. read from XML DB (except file extension = $thisPodcastEpisode[3]). $episodeDetails = _('Filetype:') . " " . strtoupper($thisPodcastEpisode[3]); if ($thisPodcastEpisodeData[11] != NULL) { $episodeDetails .= ' - ' . _('Size:') . " " . $thisPodcastEpisodeData[11] . _("MB"); } if ($thisPodcastEpisodeData[12] != NULL) { // display file duration $episodeDetails .= " - " . _("Duration:") . " " . $thisPodcastEpisodeData[12] . " " . _("m"); } if ($thisPodcastEpisode[3] == "mp3" and $thisPodcastEpisodeData[13] != NULL and $thisPodcastEpisodeData[14] != NULL) { //if mp3 show bitrate and frequency $episodeDetails .= " (" . $thisPodcastEpisodeData[13] . " " . _("kbps") . " " . $thisPodcastEpisodeData[14] . " " . _("Hz") . ")"; } $resulting_episodes .= '<p class="episode_info">' . $episodeDetails . '</p>'; ////Playes: audio (flash/html5) and video (html5), for supported files and browsers //if audio and video streaming is enabled in PG options if ($enablestreaming == "yes" and !detectMobileDevice()) { $resulting_episodes .= showStreamingPlayers($thisPodcastEpisode[5], $thisPodcastEpisode[3], $url, $upload_dir, "singleEpisode"); } $isvideo = FALSE; //RESET isvideo for next episode ////Social networks and (eventual) embedded code $resulting_episodes .= attachToEpisode($thisPodcastEpisode[5], $thisPodcastEpisode[3], $thisPodcastEpisodeData[0]); //Close the single episode DIV $resulting_episodes .= "</div>"; //Close div with class row-fluid (theme based on bootstrap). Theme engine >= 2.0 $resulting_episodes .= "</div>"; //close class row-fluid (bootstrap) //Append this episode to the final output to return $finalOutputEpisodes .= $resulting_episodes; } //Finally, return all the episodes to output on the web page return $finalOutputEpisodes; }