/** * Get count of popular / recent / featured / random videos * * @param unknown $type * @param unknown $pID * @return string */ function getWidgetVideosCount($type, $pID) { global $wpdb; $orderby = ' '; /** Get where condition for count query based on video types */ $where = getCase($type); /** If type is related then add condition */ if ($type == 'related') { $where = " AND b.playlist_id= {$pID} "; } /** If type is recent / random / related then set order by in descending */ if ($type == 'recent' || $type == 'random' || $type == 'related') { $orderby = ' w.vid DESC '; } /** Get video details */ $moreF = $wpdb->get_results("SELECT COUNT(w.vid) AS contus FROM " . $wpdb->prefix . "hdflvvideoshare w\n LEFT JOIN " . $wpdb->prefix . "hdflvvideoshare_med2play b ON w.vid = b.media_id\n LEFT JOIN " . $wpdb->prefix . "hdflvvideoshare_playlist p ON p.pid = b.playlist_id\n WHERE w.publish='1' AND p.is_publish='1' {$where}"); /** Check video detials are exist */ if (!empty($moreF)) { /** If exist then return count value */ return $moreF[0]->contus; } else { /** Else return empty */ return ''; } }
echo $id; ?> "><?php echo $shortcut; ?> </a></td> <td class="dgrey"><?php echo getLanguage($language); ?> </td> <td class="dgrey"><?php echo $description; ?> </td> <td class="dgrey" colspan="2"><?php echo getCase($casesense); ?> </td> </tr> <?php // Den aktuell ausgewählten Eintrag im Formular anzeigen } else { printFormFields($shortcut, $description, $language, $casesense); } $sql->counter++; } ?> </table> </form> <?php include $REX[INCLUDE_PATH] . "/layout_redaxo/bottom.php";