$epcountquery="SELECT count( id ) AS total FROM eps WHERE hostid = '$hostid'";
$result2=mysqli_query($connection,$epcountquery);
$row2=mysqli_fetch_array($result2);
$total=$row2['total'];
if($total==1){
$host_notes=". It is the first show by new host ${espeak_name}, ";
}
elseif($total%10==0){
$host_notes=". It is the ${total}th show of ${espeak_name}, ";
}
else{
$host_notes=". It is hosted by ${espeak_name}, ";
}
}
}
$HPR_summary="This is Hacker Public Radio episode $id for ".date("l",$date)." the ".date("jS",$date)." of ".date("F Y",$date).". Todays show is entitled. ${title}.";
if($series>"0"){
$series_query=mysqli_query($connection,"SELECT name, description FROM miniseries WHERE id = '$series'");
$series_result=mysqli_fetch_array($series_query);
$series_title=$series_result['name'];
$desc=$series_result['description'];
$HPR_summary="${HPR_summary} It is part of the series \"$series_title\"";
}
$HPR_summary="${HPR_summary}${host_notes} and is about ".round($duration/60)." minutes long. It carries ";
if($explicit==0){
$HPR_summary="${HPR_summary} a clean flag. ";
$explicit="Clean";
}
else{
$HPR_summary="${HPR_summary} an explicit flag. ";
$explicit="Explicit";
}
if(!empty($summary)){
$HPR_summary="${HPR_summary}. The summary is. $summary";