输出 -
Dubbed: Basilisk The Ouka Ninja Scrolls Episode 06 added 2 hours ago
Dubbed: YuGiOh ArcV Episode 131 added 2 hours ago
Dubbed: Dragon Ball Super Episode 53 added 2 hours ago
Dubbed: Voltron Legendary Defender Season 5 Episode 06 added 2 hours ago
Dubbed: Voltron Legendary Defender Season 5 Episode 05 added 2 hours ago
**Voltron Legendary Defender Season 5 Show 2 Episode on update. i Just want to show latest one.**
代码
$up_data = $db->select("SELECT *
FROM `". MAI_PREFIX ."files`
WHERE size > 0
ORDER BY `id` DESC
LIMIT 0,20");
$plugins->run_hook("index_updates");
if($up_data){
foreach($up_data as $udata){
$value = explode(" | ", $udata->name);
$a = array_shift($value);
list($b, $c) = explode(" Episode ", $a);
list($d, $url) = explode(" ", $c);
$string = 'Dubbed';
$string2 = 'Subbed';
//if (strstr($string, $url)) { // mine version
if (strpos($string, $url) !== FALSE) {
$e = '<span style="color: green">'.$url.'</span>';
}
elseif (strpos($string2, $url) !== FALSE) {
$e = '<span style="color: blue">'.$url.'</span>';
}else {
$e = '<span style="color: #D74894;">'.$url.'</span>';
}
$t=tsince($udata->time,$lang->time_v);
$updates .= sprintf("<div class='update_l'><b>".$e.":</b> <a href='$set->url/episode/$udata->id/".mai_converturl($a).".html'>$b <b style='color: gray'>Episode $d</b></a> added $t ago</div>");
}
$updates .="</div><div class='more'><a href='$set->url/more_updates.php'>[More Updates..]</a></div>";
}else
$updates .= $lang->no_data;
}