private string GetResultFromFirstItem(Media_Files item) { string Title = item.Title; string FileName = item.FileName; string FileUrl = item.FileUrl; string Photo = item.Photo; string Thumbnail = item.Thumbnail; string thumnail_path = string.Empty, video_url = string.Empty; if (Thumbnail != string.Empty) { thumnail_path = baseUrl + "/" + upload_media_image_dir + "/thumbnails/" + Thumbnail; } else { thumnail_path = baseUrl + "/images/no_image.jpg"; } if (FileName != string.Empty) { video_url = baseUrl + "/" + upload_video_dir + "/" + FileName; } else { video_url = "Không tìm thấy file trên hệ thống"; } string firstItem = "<a title=\"" + Title + "\" class=\"title\">" + Title + "</a>" + "<div id=\"play-box\">" + " <embed height=\"180\" width=\"300\" flashvars=\"width=300&height=180&file="+ video_url + "&image=" + thumnail_path + "\" wmode=\"transparent\" allowfullscreen=\"true\" allowscriptaccess=\"always\" quality=\"high\" name=\"MediaPlayer\" id=\"MediaPlayer\"" + " src=\"" + media_player_path + "\" type=\"application/x-shockwave-flash\">" + "</div>"; return(firstItem); }
private string GetResultFromOtherItem(Media_Files item) { string otherItems = string.Empty, photo_path = string.Empty, thumnail_path = string.Empty, video_url = string.Empty; if (item.FileName != string.Empty) { video_url = baseUrl + "/" + upload_video_dir + "/" + item.FileName; } else { video_url = "Không tìm thấy file trên hệ thống"; } if (item.Photo != string.Empty) { photo_path = baseUrl + "/" + upload_media_image_dir + "/photo/" + item.Photo; } else { photo_path = baseUrl + "/images/no_image.jpg"; } if (item.Thumbnail != string.Empty) { thumnail_path = baseUrl + "/" + upload_media_image_dir + "/thumbnails/" + item.Thumbnail; } else { thumnail_path = baseUrl + "/images/no_image.jpg"; } otherItems = "<a onclick=\"playVideo('" + photo_path + "','" + video_url + "','" + item.Title + "')\" href=\"javascript:;\" title=\"" + item.Title + "\">" + "<img alt=\"" + item.Title + "\" src=\"" + thumnail_path + "\">" + "</a>"; return(otherItems); }