function pane_art($id) { $im = best_img(sql('img', 'qda', 'v', 'id=' . $id)); $suj = suj_of_id($id); //spe return divs('background:url(/img/' . $im . ') center; background-size:cover; height:180px;', divs('position:relative; background:rgba(0,0,0,0.4); color:rgba(255,255,255,0.8); font-shadow:1px 1px 2px rgba(0,0,0,0.8); font-size:22px; top:50%;', $suj)); }
function best_img_s($d, $id) { if (!$_SESSION['thmb'][$id]) { $_SESSION['thmb'][$id] = best_img($d); } return $_SESSION['thmb'][$id]; }