function get_shows() { /** * returns a list of shows from the configured show location */ global $tv_location; $shows = array_filter(get_media($tv_location), 'is_dir'); return $shows; }
/** * {media_image:TAG} * {media_video:TAG} * [usage] * if(stristr($to_v['content'], '{media_')!=false){ //for {media___:__} placeholders $to_v['content'] = $this->main_manager->place_media($to_v['content']); } * **/ function place_media($pg_content) { preg_match_all("/\\{media_.{3,}?\\:(.{1,}?)\\}/ims", $pg_content, $pg_media); //var_dump("<pre>", $pg_media); die(); if (@(!empty($pg_media[1])) && @is_array($pg_media[1])) { global $consts; $pg_media_v = get_media($pg_media[1]); //var_dump("<pre>", $consts, $pg_media_v); die(); $ar_srch = $ar_repl = array(); $video_inc = false; if (is_array($pg_media_v) && count($pg_media_v) > 0) { foreach ($pg_media_v as $pmk => $pmv) { if ($pmv['m_type'] == 'image') { $ar_srch[] = "/\\{media_image?\\:{$pmk}\\}/ims"; $src = "{$consts['SITE_URL']}assets/images_2/media/{$pmv['m_file']}"; ///\{media_.{3,5}?\:$pmk\}/ims $repx = "<img src='{$src}' class='place_media' />"; $ar_repl[] = $repx; } else { if ($pmv['m_type'] == 'video') { $ar_srch[] = "/\\{media_video?\\:{$pmk}\\}/ims"; $repx = ''; /* if($video_inc==false) { $video_inc = true; $repx = ""; } */ $repx .= "<video preload='metadata' controls>\n <source src=\"{$consts['SITE_URL']}assets/images_2/media/{$pmv['m_file']}\" type=\"video/mp4\">\n Your browser does not support the video tag.\n </video>"; $ar_repl[] = $repx; } } } } //var_dump("<pre>", $pg_media_v,$ar_srch,$ar_repl); //die(); $pg_content = preg_replace($ar_srch, $ar_repl, $pg_content); //var_dump("<pre>", $pg_content); die(); } return $pg_content; }
}); </script> <? $id = $params['for_id']; $for = $params['for']; $media_type = $params['type']; //p($params); ?> <? $media1 = get_media($id, $for, $media_type); $media1 = $media1['pictures']; //p($media1); ?> <script type="text/javascript"> function contentMediaDeletePicture($id){
case "clearPopupUIMenu": require_once("LayerData.php"); clear_popup_ui_menu(); break; case "getMedia": if (isset($_REQUEST['layer_tablename'], $_REQUEST['id'], $_REQUEST['media_column'])) { $layer_tablename=$_REQUEST['layer_tablename']; $row_id=$_REQUEST['id']; $media_column=$_REQUEST['media_column']; } else { die('Required parameters not set.'); } require_once("LayerData.php"); get_media($layer_tablename, $row_id, $media_column); break; case "validateFeature": if (isset($_REQUEST['layer_tablename'], $_REQUEST['id']) && $_REQUEST['layer_tablename'] != "" && $_REQUEST['id'] != "") { $layer_tablename=$_REQUEST['layer_tablename']; $row_id=$_REQUEST['id']; } else { die("Required parameters not set."); } require_once("LayerData.php"); validate_feature($layer_tablename, $row_id); break;
function get_user_denglu_platform() { $platform = get_option("denglu_btn"); if (!$platform) { if ($get_media = get_media()) { foreach ($get_media as $media) { $platform[$media['mediaNameEn']] = $media['mediaName']; } update_option("denglu_btn", $platform); } } return $platform; }
$media_type = $params['type']; if($params['module_id']){ $collection = $params['module_id']; } //p($params); ?> <? $media1 = get_media($id, $for, $media_type, $queue_id, $collection); if($media_type == 'video'){ $media_videos = $media1['videos']; $media1 =$media_videos; } else { $media1 = $media1['pictures']; }
<?php /** * Created by PhpStorm. * User: Colin * Date: 2016-02-11 * Time: 7:53 PM * * builds the list of TV Shows */ require_once "functions.php"; if (isset($_GET['show']) && !empty($_GET['show'])) { $episodes = get_media(urldecode($_GET['show']), '.mp4'); echo sizeof($episodes) . " episodes<br/>"; foreach ($episodes as $episode) { echo '<a href="watch.php?vid=', urlencode($episode), '">' . strip_path($episode) . '</a><br/>'; } } else { $shows = get_shows(); echo sizeof($shows) . " shows<br/>"; foreach ($shows as $show) { print_show($show); } }