当前位置: 首页>>代码示例>>PHP>>正文


PHP requestUtils::getRequestHost方法代码示例

本文整理汇总了PHP中requestUtils::getRequestHost方法的典型用法代码示例。如果您正苦于以下问题:PHP requestUtils::getRequestHost方法的具体用法?PHP requestUtils::getRequestHost怎么用?PHP requestUtils::getRequestHost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在requestUtils的用法示例。


在下文中一共展示了requestUtils::getRequestHost方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         die;
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:33,代码来源:kuploadAction.class.php

示例2: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND, "UI conf not found");
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         KExternalErrors::dieError(KExternalErrors::ILLEGAL_UI_CONF, "SWF URL not found in UI conf");
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     KExternalErrors::terminateDispatch();
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:34,代码来源:kuploadAction.class.php

示例3: getEmbedPlayerUrl

    /**
     * Will create the URL for the embedded player for this kshow_id assuming is placed on the current server with the same http protocol.
     * @param string $kshow_id
     * @return string URL
     */
    public static function getEmbedPlayerUrl($kshow_id, $entry_id, $is_roughcut = false, $kdata = "")
    {
        // TODO - PERFORMANCE - cache the versions per kshow_id
        // - if an entry_id exists - don't fetch the version for the kshow
        $kshow = kshowPeer::retrieveByPK($kshow_id);
        if (!$kshow) {
            return array("", "");
        }
        $media_type = entry::ENTRY_MEDIA_TYPE_SHOW;
        if ($entry_id) {
            $entry = entryPeer::retrieveByPK($entry_id);
            if ($entry) {
                $media_type = $entry->getMediaType();
            }
            // if the entry is one of the kshow roughcuts we want to share the latest roughcut
            if ($entry->getType() == entryType::MIX) {
                $entry_id = -1;
            }
        }
        if ($is_roughcut) {
            $show_entry_id = $kshow->getShowEntryId();
            $show_entry = entryPeer::retrieveByPK($show_entry_id);
            if (!$show_entry) {
                return null;
            }
            $media_type = $show_entry->getMediaType();
            $show_version = $show_entry->getLastVersion();
            // set the entry_id to -1 == we want to show the roughcut, not a specific entry.
            $entry_id = $show_entry_id;
        } else {
            $show_version = -1;
        }
        $partnerId = $kshow->getPartnerId();
        $swf_url = "/index.php/widget/{$kshow_id}/" . ($entry_id ? $entry_id : "-1") . "/" . ($media_type ? $media_type : "-1");
        $domain = requestUtils::getRequestHost();
        $kshowName = $kshow->getName();
        $producer = kuser::getKuserById($kshow->getProducerId());
        $producerName = $producer->getScreenName();
        if ($entry_id >= 0) {
            $headerImage = $domain . '/index.php/browse/getWidgetImage/entry_id/' . $entry_id;
        } else {
            $headerImage = $domain . '/index.php/browse/getWidgetImage/kshow_id/' . $kshow_id;
        }
        if (in_array($partnerId, array(1, 8, 18, 200))) {
            $footerImage = $domain . '/index.php/browse/getWidgetImage/partner_id/' . $partnerId;
            $baseCmd = self::getWidgetCmdUrl($kdata);
            $widgetCallUrl = $baseCmd . "add";
            $kshowCallUrl = $baseCmd . "kshow";
            $editCallUrl = $baseCmd . "edit";
            $genericWidget = '<object type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" height="405" width="400" data="' . $domain . $swf_url . '/4/-1/' . $kdata . '"/>' . '<param name="allowScriptAccess" value="always" />' . '<param name="allowNetworking" value="all" />' . '<param name="bgcolor" value="#000000" />' . '<param name="movie" value="' . $domain . $swf_url . '/4/-1/' . $kdata . '"/>' . '</object>';
            $myspaceWidget = <<<EOT
<table cellpadding="0" cellspacing="0" style="width:400px; margin:0 auto;">
\t<tr style="background-color:black;">
\t\t<th colspan="2" style="background-color:black; background: url({$headerImage}) 0 0 no-repeat;">
\t\t\t<a href="{$kshowCallUrl}" style="display:block; height:30px; overflow:hidden;"></a>
\t\t</th>
\t</tr>
\t<tr style="background-color:black;">
\t\t<td colspan="2">
\t\t\t<object type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" height="320" width="400" data="{$domain}{$swf_url}/1/-1/{$kdata}">
\t\t\t\t<param name="allowScriptAccess" value="never" />
\t\t\t\t<param name="allowNetworking" value="internal" />
\t\t\t\t<param name="bgcolor" value="#000000" />
\t\t\t\t<param name="movie" value="{$domain}{$swf_url}/1/-1/{$kdata}" />
\t\t\t</object>
\t\t</td>
\t</tr>
\t<tr style="background-color:black;">
\t\t<td style="height:33px;"><a href="{$widgetCallUrl}" style="display:block; width:199px; height:33px; background:black url(http://www.kaltura.com/images/widget/wgt_btns2.gif) center 0 no-repeat; border-right:1px solid #000; overflow:hidden;"></a></td>
\t\t<td style="height:33px;"><a href="{$editCallUrl}" style="display:block; width:199px; height:33px; background:black url(http://www.kaltura.com/images/widget/wgt_btns2.gif) center -33px no-repeat; border-left:1px solid #555; overflow:hidden;"></a></td>
\t</tr>
\t<tr>
\t\t<td colspan="2" style="background-color:black; border-top:1px solid #222; background: url({$footerImage}) 0 0 no-repeat;">
\t\t\t<a href="{$domain}" style="display:block; height:20px; overflow:hidden;"></a>
\t\t</td>
\t</tr>
</table>
EOT;
            return array($genericWidget, $myspaceWidget);
        }
        $kshowCallUrl = "{$domain}/index.php/browse?kshow_id={$kshow_id}";
        if ($entry_id >= 0) {
            $kshowCallUrl .= "&entry_id={$entry_id}";
        }
        $widgetCallUrl = "{$kshowCallUrl}&browseCmd=";
        $editCallUrl = "{$domain}/index.php/edit?kshow_id={$kshow_id}";
        if ($entry_id >= 0) {
            $editCallUrl .= "&entry_id={$entry_id}";
        }
        if (in_array($partnerId, array(315, 387))) {
            $genericWidget = '<object type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" height="407" width="400" data="' . $domain . $swf_url . '/21">' . '<param name="allowScriptAccess" value="always" />' . '<param name="allowNetworking" value="all" />' . '<param name="bgcolor" value="#000000" />' . '<param name="flashvars" value="hasHeadline=1&hasBottom=1&sourceLink=remixurl" />';
            '<param name="movie" value="' . $domain . $swf_url . '/21"/>' . '</object>';
        } else {
            if (in_array($partnerId, array(250))) {
                $genericWidget = '<object type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" height="407" width="400" data="' . $domain . $swf_url . '/40">' . '<param name="allowScriptAccess" value="always" />' . '<param name="allowNetworking" value="all" />' . '<param name="bgcolor" value="#000000" />' . '<param name="flashvars" value="hasHeadline=1&hasBottom=1&sourceLink=remixurl" />';
//.........这里部分代码省略.........
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:101,代码来源:myKshowUtils.class.php

示例4: getUploadPathAndUrl

 public static function getUploadPathAndUrl($token, $file_alias, $extra_id = null, $extension = "")
 {
     //		$extension = ""; // strtolower($parts['extension']);
     $filename = $token . '_' . $file_alias;
     // add the file extension after the "." character
     $suffix = $filename . ($extra_id ? "_" . $extra_id : "") . "." . $extension;
     $fullPath = myContentStorage::getFSUploadsPath() . $suffix;
     $fullUrl = requestUtils::getRequestHost() . "/" . myContentStorage::getFSUploadsPath(false) . $suffix;
     return array($fullPath, $fullUrl);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:10,代码来源:myUploadUtils.class.php

示例5: include_http_metas

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<base href="<?php 
echo requestUtils::getRequestHost();
?>
/" />

<?php 
echo include_http_metas();
echo include_metas();
?>

<?php 
echo include_title();
?>

<?php 
if (@$extraHead) {
    echo $extraHead;
}
?>

</head>
<body>
 <div id="wrap">
 <?php 
echo $sf_content;
?>
 </div>
<script type="text/javascript">
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:kmc1layout.php

示例6: getHost

 public static function getHost($partner_id)
 {
     $partner = PartnerPeer::retrieveByPK($partner_id);
     if (!$partner || !$partner->getHost()) {
         return requestUtils::getRequestHost();
     }
     return $partner->getHost();
 }
开发者ID:dozernz,项目名称:server,代码行数:8,代码来源:myPartnerUtils.class.php

示例7: getDownloadUrlWithExpiry

 public function getDownloadUrlWithExpiry($expiry, $useCdn = false)
 {
     $ksStr = "";
     $partnerId = $this->getPartnerId();
     $partner = PartnerPeer::retrieveByPK($partnerId);
     $secret = $partner->getSecret();
     $privilege = ks::PRIVILEGE_DOWNLOAD . ":" . $this->getEntryId();
     $result = kSessionUtils::startKSession($partnerId, $secret, null, $ksStr, $expiry, false, "", $privilege);
     if ($result < 0) {
         throw new Exception("Failed to generate session for flavor asset [" . $this->getId() . "]");
     }
     $finalPath = myPartnerUtils::getUrlForPartner($this->getPartnerId(), $this->getPartnerId() * 100) . "/download" . "/entry_id/" . $this->getEntryId() . "/flavor/" . $this->getId() . "/ks/" . $ksStr;
     // Gonen May 12 2010 - removing CDN URLs. see ticket 5135 in internal mantis
     // in order to avoid conflicts with access_control (geo-location restriction), we always return the requestHost (www_host from kConf)
     // and not the CDN host relevant for the partner.
     // Tan-Tan January 27 2011 - in some places we do need the cdn, I added a paramter useCdn to force it.
     if ($useCdn) {
         $downloadUrl = myPartnerUtils::getCdnHost($partnerId) . $finalPath;
     } else {
         $downloadUrl = requestUtils::getRequestHost() . $finalPath;
     }
     return $downloadUrl;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:23,代码来源:asset.php

示例8: getFlavorHttpUrl

 /**
  * @param flavorAsset $flavorAsset
  * @return array
  */
 private function getFlavorHttpUrl(flavorAsset $flavorAsset)
 {
     $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
     $externalStorageUrl = $this->getExternalStorageUrl($flavorAsset, $syncKey);
     if ($externalStorageUrl) {
         return $externalStorageUrl;
     }
     if ($this->storageId) {
         // must be specific external storage
         return null;
     }
     $partner = $this->entry->getPartner();
     if ($partner && $partner->getStorageServePriority() == StorageProfile::STORAGE_SERVE_PRIORITY_EXTERNAL_ONLY) {
         return null;
     }
     $urlManager = $this->getUrlManagerByCdn($this->cdnHost, null, $flavorAsset);
     $urlManager->setSeekFromTime($this->seekFrom);
     $urlManager->setDomain($this->cdnHost);
     $url = $urlManager->getAssetUrl($flavorAsset, false);
     $this->tokenizer = $urlManager->getTokenizer();
     if ($this->format == StorageProfile::PLAY_FORMAT_RTSP) {
         // the host was already added by the url manager
         return $this->getFlavorAssetInfo($url, '', $flavorAsset);
     }
     $urlPrefix = '';
     if (strpos($url, "/") === 0) {
         $flavorSizeKB = $flavorAsset->getSize();
         if ($flavorSizeKB > kConf::get("max_file_size_downloadable_from_cdn_in_KB")) {
             $urlPrefix = requestUtils::getRequestHost();
         } else {
             $urlPrefix = $this->cdnHost;
         }
     }
     $urlPrefix = preg_replace('/^https?:\\/\\//', '', $urlPrefix);
     $url = preg_replace('/^https?:\\/\\//', '', $url);
     if ($urlPrefix) {
         $urlPrefix = $this->protocol . '://' . $urlPrefix;
         $urlPrefix = rtrim($urlPrefix, "/") . "/";
     } else {
         $url = $this->protocol . '://' . $url;
     }
     $url = ltrim($url, "/");
     return $this->getFlavorAssetInfo($url, $urlPrefix, $flavorAsset);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:48,代码来源:playManifestAction.class.php

示例9: getFeedUrl

 public function getFeedUrl()
 {
     $urlParams = array('service' => 'uverseclicktoorderdistribution_uverseclicktoorder', 'action' => 'getFeed', 'partnerId' => $this->getPartnerId(), 'distributionProfileId' => $this->getId(), 'hash' => $this->getUniqueHashForFeedUrl());
     return requestUtils::getRequestHost() . '/api_v3/index.php?' . http_build_query($urlParams, null, '&');
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:5,代码来源:UverseClickToOrderDistributionProfile.php

示例10: url

<?php

$service_url = requestUtils::getRequestHost();
?>
<style>
#kmcHeader { height:36px;}
#kmcHeader img { width:162px; height: 32px; }
   body { background-color:#272929 !important; background-image:none !important;}
   div.loginDesc { text-align:center; font-size:16px; font-weight:bold; color:white;}
div#varpartnerlist { height:auto; color:#000; padding:3px; padding-bottom:50px; font-size:12px; background: #f7f7f7 url(<?php 
echo $service_url;
?>
/api_v3/system/images/bg.png) repeat-x;}
div#varpartnerlist div.myaccount { font-weight:bold; margin:10px 0px 10px 0px; font-size:14px;}
div#varpartnerlist h1 { color: #000000; }
h1 { color: #ffffff; }
a { color: #0099FF; text-decoration:underline;}
table { margin-left:10px; width:80%; border: solid 1px #CFD7D7; border-collapse:collapse;}
 table caption { padding: 25px 0 10px; text-align:left;}
 table caption h3 { margin-left:0px; }
 table th { font-size:14px;
 padding: 5px 10px 5px 5px;
 border: solid 1px #CFD7D7;
 background: #F1F1F1 url(<?php 
echo $service_url;
?>
/api_v3/system/images/bg_th.png) repeat-x; color:#29464E; text-align:left; cursor:help;}
 table td { padding:5px; font-size:11px; background:#fff; border:1px solid #CFD7D7; }
  table tr.even td { background:#f0f0f0;}
h3.small { font-size:12px; width:100%; text-align:right; }
h3.other { font-size:14px; padding-top:5px; padding-left:10px; padding-bottom:2px; width:100%; text-align:left; }
开发者ID:richhl,项目名称:kalturaCE,代码行数:31,代码来源:varpartnerlistSuccess.php

示例11: createSelect

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;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:72,代码来源:testmeSuccess.php

示例12: getDownloadUrlWithExpiry

 public function getDownloadUrlWithExpiry($expiry, $useCdn = false)
 {
     $ksStr = "";
     $ksNeeded = true;
     $partnerId = $this->getPartnerId();
     if (!PermissionPeer::isValidForPartner(PermissionName::FEATURE_ENTITLEMENT, $partnerId)) {
         $invalidModerationStatuses = array(entry::ENTRY_MODERATION_STATUS_PENDING_MODERATION, entry::ENTRY_MODERATION_STATUS_REJECTED);
         $entry = $this->getentry();
         if ($entry && !in_array($entry->getModerationStatus(), $invalidModerationStatuses) && ($entry->getStartDate() === null || $entry->getStartDate(null) < time()) && ($entry->getEndDate() === null || $entry->getEndDate(null) > time() + 86400)) {
             $accessControl = $entry->getaccessControl();
             if ($accessControl && !$accessControl->getRulesArray()) {
                 $ksNeeded = false;
             }
         }
     }
     if ($ksNeeded) {
         $partner = PartnerPeer::retrieveByPK($partnerId);
         $secret = $partner->getSecret();
         $privilege = ks::PRIVILEGE_DOWNLOAD . ":" . $this->getEntryId();
         $privilege .= "," . kSessionBase::PRIVILEGE_DISABLE_ENTITLEMENT_FOR_ENTRY . ":" . $this->getEntryId();
         $result = kSessionUtils::startKSession($partnerId, $secret, null, $ksStr, $expiry, false, "", $privilege);
         if ($result < 0) {
             throw new Exception("Failed to generate session for asset [" . $this->getId() . "] of type " . $this->getType());
         }
     }
     $finalPath = $this->getFinalDownloadUrlPathWithoutKs();
     if ($ksStr) {
         $finalPath .= "/ks/" . $ksStr;
     }
     // Gonen May 12 2010 - removing CDN URLs. see ticket 5135 in internal mantis
     // in order to avoid conflicts with access_control (geo-location restriction), we always return the requestHost (www_host from kConf)
     // and not the CDN host relevant for the partner.
     // Tan-Tan January 27 2011 - in some places we do need the cdn, I added a paramter useCdn to force it.
     if ($useCdn) {
         // TODO in that case we should use the serve flavor and the url manager in order to support secured and signed urls
         $downloadUrl = myPartnerUtils::getCdnHost($partnerId) . $finalPath;
     } else {
         $downloadUrl = requestUtils::getRequestHost() . $finalPath;
     }
     return $downloadUrl;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:41,代码来源:flavorAsset.php

示例13: include_http_metas

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<base href="<? echo requestUtils::getRequestHost() ?>/" />

<?php 
echo include_http_metas();
echo include_metas();
?>

<?php 
echo include_title();
?>

<?php 
if (@$extraHead) {
    echo $extraHead;
}
?>

</head>
<body>
 <div id="wrap">
 <?php 
echo $sf_content;
?>
 </div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
开发者ID:richhl,项目名称:kalturaCE,代码行数:31,代码来源:kmc1layout.php

示例14: getUrl

 /**
  * @param int $distributionProfileId
  * @param string $hash
  * @param int $page
  */
 protected function getUrl($distributionProfileId, $hash, $page, $period, $stateLastEntryCreatedAt, $stateLastEntryIds)
 {
     if (!is_null($stateLastEntryCreatedAt) && !is_null($stateLastEntryIds) && count($stateLastEntryIds) > 0) {
         $state = $stateLastEntryCreatedAt . '|' . implode(',', $stateLastEntryIds);
     } else {
         $state = '';
     }
     $urlParams = array('service' => 'doubleclickdistribution_doubleclick', 'action' => 'getFeed', 'partnerId' => $this->getPartnerId(), 'distributionProfileId' => $distributionProfileId, 'hash' => $hash, 'page' => $page, 'state' => base64_encode($state), 'period' => $period);
     return requestUtils::getRequestHost() . '/api_v3/index.php?' . http_build_query($urlParams, null, '&');
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:15,代码来源:DoubleClickService.php

示例15: getObjectInfo

 private static function getObjectInfo($objectId)
 {
     $url = "http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=" . self::DEV_ID . "&video_id=" . urlencode($objectId);
     $xpath = self::getXPathResponse($url);
     $title = '';
     $tags = '';
     $credit = '';
     if ($xpath) {
         $videos = $xpath->query("//video_details");
         foreach ($videos as $video) {
             $title = self::getXmlNodeValue($video, "title");
             $tags = implode(',', explode(' ', self::getXmlNodeValue($video, "tags")));
             $credit = self::getXmlNodeValue($video, "author");
         }
     }
     $source_link = "http://www.youtube.com/watch?v=" . $objectId;
     $htmlPage = kFile::downloadUrlToString($source_link, 3);
     $status = 'error';
     $message = '';
     $objectInfo = null;
     if (preg_match('/Location: (.*?)\\/verify_age/', $htmlPage)) {
         $message = "Adult content, age verification required, Please choose another movie";
     } else {
         if (preg_match('/swfArgs.*?\\{.*?, "t":\\s*"(.*?)"/s', $htmlPage, $timestampMatch) || preg_match('/SWF_ARGS.*?\\{.*?, "t":\\s*"(.*?)"/s', $htmlPage, $timestampMatch)) {
             //var swfArgs = {"sourceid": "y", "video_id": "CoiFGva_JoY", "l": 64, "sk": "uKKGdPxW5MWYni0u_OXxkgU", "t": "OEgsToPDskKqwUniXcKcELZlXY7Smhdx", "hl": "en", "plid": "AAREdD-JLalob4scAAAAIIAYQAA", "sdetail": "p%3A"};
             $fmt_url = "";
             //"fmt_map": "35/640000/9/0/115,18/512000/9/0/115,34/0/9/0/115,5/0/7/0/0"
             if (preg_match('/swfArgs.*?\\{.*?, "fmt_map":\\s*"(.*?)"/s', $htmlPage, $fmt_map)) {
                 $fmt_map_array = explode(",", $fmt_map[1]);
                 $fmt_details = explode("/", $fmt_map_array[0]);
                 //print_r($fmt_map_array);
                 //echo "fmt: ".$fmt_details[0]."\n";
                 if ($fmt_details[0]) {
                     $fmt_url = "&fmt=" . $fmt_details[0];
                 }
             } elseif (preg_match('/SWF_ARGS.*?\\{.*?, "fmt_map":\\s*"(.*?)"/s', $htmlPage, $fmt_map)) {
                 //"fmt_map": "34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0"
                 $encoded_fmt_map = urldecode($fmt_map[1]);
                 $fmt_map_array = explode(",", $encoded_fmt_map);
                 $fmt_details = explode("/", $fmt_map_array[0]);
                 //print_r($fmt_map_array);
                 //echo "fmt: ".$fmt_details[0]."\n";
                 if ($fmt_details[0]) {
                     $fmt_url = "&fmt=" . $fmt_details[0];
                 }
             }
             //var swfArgs = {hl:'en',video_id:'F924-D-g5t8',l:'24',t:'OEgsToPDskL9BIntclUB-PPzMEpVQKo8',sk:'xXvbHpmFGQKgv-b9__DkgwC'};
             $tId = $timestampMatch[1];
             //$url = "http://youtube.com/get_video?video_id=".$objectId."&t=$tId$fmt_url";
             $url = requestUtils::getRequestHost() . '/extservices/youtubeRedirect?itemId=' . $objectId;
             $objectInfo = array('id' => $objectId, 'url' => $url, 'title' => $title, 'thumb' => "http://img.youtube.com/vi/{$objectId}/2.jpg", 'tags' => $tags, 'ext' => "flv", 'source_link' => $source_link, 'license' => '', 'credit' => $credit, 'flash_playback_type' => 'video');
             $status = 'ok';
         }
     }
     return array('status' => $status, 'message' => $message, 'objectInfo' => $objectInfo);
 }
开发者ID:DBezemer,项目名称:server,代码行数:56,代码来源:myYouTubeServices.class.php


注:本文中的requestUtils::getRequestHost方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。