Esempio n. 1
0
	<div id="main">
		<div id="flash_wrap" class="flash_wrap">
			<div id="kcms"></div>
		</div><!-- flash_wrap -->
        <div id="server_wrap">
         <iframe frameborder="0" id="server_frame" height="100%" width="100%"></iframe>
        </div> <!-- server_wrap -->
	</div><!-- main -->
<!--[if lte IE 7]>
<script type="text/javascript" src="<?php 
echo requestUtils::getCdnHost(requestUtils::getRequestProtocol());
?>
/lib/js/json2.min.js"></script>
<script type="text/javascript" src="<?php 
echo requestUtils::getCdnHost(requestUtils::getRequestProtocol());
?>
/lib/js/localStorage.min.js"></script>
<![endif]-->
<?php 
if ($previewEmbedV2) {
    ?>
<!-- Preview & Embed Modal -->
<div id="previewModal" class="modal preview_embed" ng-controller="PreviewCtrl">
	<div class="title clearfix">
		<h2></h2>
		<span class="close icon"></span>
		<a class="help icon" href="javascript:kmc.utils.openHelp('section_pne');"></a>
	</div>
	<div class="content row-fluid">
		<div class="span4 options form-horizontal">
function createSelect($id, $name, $default_value, $list_name, $pid_str = null)
{
    $host = requestUtils::getHost();
    $limited = getLimited();
    //global $arrays;
    $download_file_formats = array("avi" => "avi", "mp4" => "mp4", "mov" => "mov", "flv" => "flv", "mp3" => "mp3", "3gp" => "3gp", "original" => "original");
    $media_type_list = array("1" => "Video", "2" => "Image", "5" => "Audio", "11" => "Document", "12" => "Swf", "-1" => "Automatic");
    $media_source_list = array("20" => "Kaltura", "21" => "MyClips", "23" => "KalturaPartner", "26" => "KalturaKshow", "27" => "KalturaPartnerKshow", "1" => "* File", "2" => "* Webcam", "3" => "Flickr", "4" => "YouTube", "5" => "* URL", "7" => "MySpace", "8" => "PhotoBucket", "9" => "Jamendo", "10" => "CCMixter", "11" => "NYPL", "13" => "MediaCommons", "22" => "Archive.org", "24" => "MetaCafe");
    if (!$limited) {
        $media_source_list = array("25" => "KalturaQa") + $media_source_list;
    }
    $protocol = requestUtils::getRequestProtocol();
    $current_server = str_replace("{$protocol}://", "", requestUtils::getRequestHost());
    $service_url_list[$current_server] = $current_server;
    if ($limited) {
        $format_list = array("1" => "JSON", "2" => "XML", "3" => "PHP");
        if (strpos($host, "sandbox") !== false) {
            $service_url_list["sandbox.kaltura.com"] = "Sandbox";
            $service_url_list["www.kaltura.com"] = "Kaltura";
        } else {
            $service_url_list["www.kaltura.com"] = "Kaltura";
            $service_url_list["sandbox.kaltura.com"] = "Sandbox";
        }
        $index_path_list = array("index.php" => "index");
    } else {
        $format_list = array("1" => "JSON", "2" => "XML", "3" => "PHP", "4" => "PHP_ARR", "5" => "PHP_OBJ", "8" => "mRSS");
        $service_url_list = array_merge($service_url_list, array("localhost" => "localhost", "qac.kaltura.dev" => "qac", "kelev.kaltura.com:9007" => "qac-external", "kaldev.kaltura.com" => "kaldev", "www.kaltura.com" => "Kaltura", "sandbox.kaltura.com" => "Sandbox"));
        $index_path_list = array("index.php" => "index", "kaltura_dev.php" => "debug");
        $service_url_list["debian.kaltura.dev/kalturaCE"] = "debian";
    }
    $clazz_list = array("kshow" => "kshow", "kuser" => "kuser", "entry" => "entry", "PuserKuser" => "PuserKuser");
    $moderation_object_type = array("1" => "kshow", "2" => "entry", "3" => "kuser", "" => "none");
    $moderation_status = array("1" => "pending", "2" => "allow", "3" => "block", "4" => "delete", "5" => "review");
    $notification_status = array("" => "All", "1" => "Pending", "2" => "Sent", "3" => "Error", "4" => "Should Resend");
    $entry_status = array("" => "All", "-1" => "ERROR_CONVERTING", "0" => "IMPORT", "1" => "PRECONVERT", "2" => "READY", "3" => "DELETED", "4" => "PENDING", "5" => "MODERATE", "6" => "BLOCKED");
    $entry_type = array("" => "All", "1" => "Clip", "2" => "Roughcut", "10" => "Document", "-1" => "Automatic");
    $entry_media_type = array("1" => "Video", "2" => "Image", "5" => "Audio", "6" => "Roughcut", "10" => "XML", "11" => "Document", "-1" => "Automatic");
    $entry_media_type_filter = array("" => "All", "1" => "Video", "2" => "Image", "5" => "Audio", "6" => "Roughcut", "10" => "XML", "11" => "Document", "-1" => "Automatic");
    $widget_security_type = array("1" => "none", "2" => "timehash");
    $entries_list_type = array("15" => "All", "1" => "Kshow", "2" => "Kuser", "4" => "Roughcut", "8" => "Episode");
    $boolean_type = array("true" => "true", "false" => "false");
    $boolean_int_type = array("" => "", "1" => "true", "0" => "false");
    $display_in_search_filter = array("" => "All", "0" => "Not displayed", "1" => "In Partner", "2" => "Kaltura Network");
    $usage_graph_resolutions = array("days" => "days", "months" => "months");
    $months_list = array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10", "11" => "11", "12" => "12");
    $obj_type_list = array("kshow" => "kshow", "entry" => "entry");
    // TODO - fix list for moderation_status
    $entry_moderation_status = array("1" => "PENDING", "2" => "ALLOW", "3" => "BLOCK");
    $entry_moderation_status_filter = array("" => "All", "1" => "PENDING", "2" => "ALLOW", "3" => "BLOCK");
    $arrays = array("format_list" => $format_list, "media_type" => $media_type_list, "media_source" => $media_source_list, "download_file_formats" => $download_file_formats, "service_urls" => $service_url_list, "service_urls1" => array_merge(array("" => ""), $service_url_list), "index_paths" => $index_path_list, "clazz_list" => $clazz_list, "moderation_object_type" => $moderation_object_type, "moderation_status" => $moderation_status, "boolean_type" => $boolean_type, "boolean_int_type" => $boolean_int_type, "notification_status" => $notification_status, "notification_type" => array_merge(array("" => "All"), kNotificationJobData::getNotificationTypeMap()), "entry_media_type" => $entry_media_type, "entry_media_type_filter" => $entry_media_type_filter, "entry_type" => $entry_type, "entry_status" => $entry_status, "widget_security_type" => $widget_security_type, "entries_list_type" => $entries_list_type, "entry_moderation_status_filter" => $entry_moderation_status_filter, "entry_moderation_status" => $entry_moderation_status, "entries_filter_order_by" => array("" => "None", "+id" => "id asc", "-id" => "id desc", "+created_at" => "created_at asc", "-created_at" => "created_at desc", "+media_date" => "media_date asc", "-media_date" => "media_date desc", "+name" => "name asc", "-name" => "name desc", "+views" => "views asc", "-views" => "views desc", "+type" => "type asc", "-type" => "type desc", "+media_type" => "media_type asc", "-media_type" => "media_type desc", "+plays" => "plays asc", "-plays" => "plays desc", "+views" => "views asc", "-views" => "views desc", "+rank" => "rank asc", "-rank" => "rank desc", "+moderation_count" => "moderation_count asc", "-moderation_count" => "moderation_count desc", "+moderation_status" => "moderation_status asc", "-moderation_status" => "moderation_status desc"), "obj_type_list" => $obj_type_list, "command_list" => array("view" => "view", "play" => "play", "viewEnd" => "viewEnd"), "display_in_search_filter" => $display_in_search_filter, "playlist_media_type" => array("10" => "Dynamic", "3" => "Static", "101" => "External"), "playlist_media_type_filter" => array("" => "All", "10" => "Dynamic", "3" => "Static", "101" => "External"), "conversion_profile_type" => array("low" => "low", "med" => "med", "high" => "high", "hd" => "HD"), "conversion_profile_aspect_ratio" => array("1" => "keep aspect ratio", "2" => "keep original size", "3" => "4:3", "4" => "16:9"), "uiconf_obj_type" => array("1" => "kdp", "2" => "kcw", "3" => "kse", "4" => "kae", "6" => "app-studio"), "uiconf_obj_type_filter" => array("" => "ALL", "1" => "kdp", "2" => "kcw", "3" => "kse", "4" => "kae", "6" => "app-studio"), "uiconf_filter_order_by" => array("" => "None", "+id" => "id asc", "-id" => "id desc", "+created_at" => "created_at asc", "-created_at" => "created_at desc", "+updated_at" => "updated_at asc", "-updated_at" => "updated_at desc"), "conversion_quality" => array("" => "DEFAULT", "low" => "low", "med" => "medium", "high" => "high", "hd" => "hd"), "download_job_type_filter" => array("" => "ALL", "3" => "flatten", "6" => "download"), "download_filter_order_by" => array("" => "None", "+id" => "id asc", "-id" => "id desc", "+created_at" => "created_at asc", "-created_at" => "created_at desc"), "uiconf_creation_mode" => array("1" => "Manual", "2" => "Wizard", "3" => "Advance"), "months_list" => $months_list, "usage_graph_resolutions" => $usage_graph_resolutions);
    $list = $arrays[$list_name];
    if (!$list) {
        die("<div>cannot find list of name: [{$list_name}]</div>");
    }
    //echo "createSelect: list_name:[$list_name] count:[" . count ( $list ) . "]<br>";
    $str = "<select id='{$id}' style='font-family:arial; font-size:12px;' name='{$name}' onkeyup='updateSelect( this )' onchange='updateSelect( this )' {$pid_str}>";
    $default_value_selected = "";
    foreach ($list as $value => $option) {
        // not always the default value is found
        if ($value == $default_value) {
            $default_value_selected = $default_value;
        }
        if ($default_value === "") {
            $selected = $value === "" ? "selected='selected'" : "";
        } else {
            $selected = $value == $default_value ? "selected='selected'" : "";
        }
        $str .= "<option value='{$value}' {$selected} >{$option}</option>\n";
    }
    $str .= "</select> <span style='color:blue;' id='{$id}_current_value'>{$default_value_selected}</span>\n";
    return $str;
}
Esempio n. 3
0
<?php

$service_url = requestUtils::getRequestHost();
$protocol = requestUtils::getRequestProtocol();
$host = str_replace("{$protocol}://", "", $service_url);
$cdn_host = str_replace("http://", "", myPartnerUtils::getCdnHost($partner_id));
$kmc_content_version = 'v1.1.8';
$kmc_account_version = 'v1.1.6';
$kmc_appstudio_version = 'v1.2.0';
$kmc_rna_version = 'v1.0.3';
$flash_dir = $service_url . myContentStorage::getFSFlashRootPath();
?>
<script>
sub_nav_tab = "";
current_module = 'reports';
var flashVars = {	
		'host' : "<?php 
echo $host;
?>
" , 
		'cdnhost' : "<?php 
echo $cdn_host;
?>
" ,
		'uid' : "<?php 
echo $uid;
?>
" ,
		'partner_id' : "<?php 
echo $partner_id;
?>