/** * 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}"); }
/** * 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}"); }
/** * 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" />'; '<param name="movie" value="' . $domain . $swf_url . '/40"/>' . '</object>'; } else { if (in_array($partnerId, array(321, 449))) { $genericWidget = '<object type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" height="407" width="400" data="' . $domain . $swf_url . '/60">' . '<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 . '/60"/>' . '</object>'; } else { $genericWidget = '<object type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" height="340" width="400" data="' . $domain . $swf_url . '/2">' . '<param name="allowScriptAccess" value="always" />' . '<param name="allowNetworking" value="all" />' . '<param name="bgcolor" value="#000000" />' . '<param name="movie" value="' . $domain . $swf_url . '/2"/>' . '</object>'; } } } $myspaceWidget = '<table cellpadding="0" cellspacing="0" style="width:400px; margin:6px auto; padding:0; background-color:black; border:1px solid black;">' . '<tr>' . '<th colspan="2" style="background-color:black; background: url(' . $headerImage . ') 0 0 no-repeat;"><a href="' . $kshowCallUrl . '" style="display:block; height:30px; overflow:hidden;"></a></th>' . '</tr>' . '<tr>' . '<td colspan="2">' . '<object type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" height="320" width="400" data="' . $domain . $swf_url . '/1">' . '<param name="allowScriptAccess" value="never" />' . '<param name="allowNetworking" value="internal" />' . '<param name="bgcolor" value="#000000" />' . '<param name="movie" value="' . $domain . $swf_url . '/1"/>' . '</object>' . '</td>' . '</tr>' . '<tr>' . '<td style="height:33px;"><a href="' . $widgetCallUrl . 'contribute" style="display:block; width:199px; height:33px; background: url(' . $domain . '/images/widget/wgt_btns2.gif) center 0 no-repeat; border-right:1px solid #000; overflow:hidden;"></a></td>' . '<td style="height:33px;"><a href="' . $editCallUrl . '" style="display:block; width:199px; height:33px; background: url(' . $domain . '/images/widget/wgt_btns2.gif) center -33px no-repeat; border-left:1px solid #555; overflow:hidden;"></a></td>' . '</tr>' . '</table>'; return array($genericWidget, $myspaceWidget); }
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); }
<!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">
public static function getHost($partner_id) { $partner = PartnerPeer::retrieveByPK($partner_id); if (!$partner || !$partner->getHost()) { return requestUtils::getRequestHost(); } return $partner->getHost(); }
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; }
/** * @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); }
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, '&'); }
<?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; }
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; }
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; }
<!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>
/** * @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, '&'); }
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); }
public static function getExecutionUrl(entry $playlist) { if (!$playlist) { return ""; } if ($playlist->getMediaType() == entry::ENTRY_MEDIA_TYPE_GENERIC_1) { return $playlist->getDataContent(); } $host = requestUtils::getRequestHost(); $playlist_url = $host . "/index.php/partnerservices2/executeplaylist?format=8&" . "ks={ks}&" . self::toQueryString($playlist, false); return $playlist_url; }
public function getDownloadUrlWithExpiry($expiry, $useCdn = false, $forceProxy = false, $preview = null) { $ksStr = ""; $partnerId = $this->getPartnerId(); if ($this->isKsNeededForDownload() || $preview) { $partner = PartnerPeer::retrieveByPK($partnerId); $secret = $partner->getSecret(); $privilege = ks::PRIVILEGE_DOWNLOAD . ":" . $this->getEntryId(); $privilege .= "," . kSessionBase::PRIVILEGE_DISABLE_ENTITLEMENT_FOR_ENTRY . ":" . $this->getEntryId(); $privilege .= "," . kSessionBase::PRIVILEGE_VIEW . ":" . $this->getEntryId(); $privilege .= "," . kSessionBase::PRIVILEGE_DOWNLOAD_ASSET . ":" . $this->getId(); if ($preview) { $privilege .= "," . kSessionBase::PRIVILEGE_PREVIEW . ":" . $preview; } $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; } if ($forceProxy) { $finalPath .= "/relocate/" . $this->getEntryId() . "." . $this->getFileExt(); } // 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; }
public function getBigThumbnailUrl($version = NULL) { $path = $this->getBigThumbnailPath($version); $url = requestUtils::getRequestHost() . $path; return $url; }
public function execute() { sfView::SUCCESS; /** check parameters and verify user is logged-in **/ $this->ks = $this->getP("kmcks"); if (!$this->ks) { // if kmcks from cookie doesn't exist, try ks from REQUEST $this->ks = $this->getP('ks'); } /** if no KS found, redirect to login page **/ if (!$this->ks) { $this->redirect("kmc/kmc"); die; } $ksObj = kSessionUtils::crackKs($this->ks); // Set partnerId from KS $this->partner_id = $ksObj->partner_id; // Check if the KMC can be framed $allowFrame = PermissionPeer::isValidForPartner(PermissionName::FEATURE_KMC_ALLOW_FRAME, $this->partner_id); if (!$allowFrame) { header('X-Frame-Options: DENY'); } // Check for forced HTTPS $force_ssl = PermissionPeer::isValidForPartner(PermissionName::FEATURE_KMC_ENFORCE_HTTPS, $this->partner_id); if ($force_ssl && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')) { header("Location: " . infraRequestUtils::PROTOCOL_HTTPS . "://" . $_SERVER['SERVER_NAME'] . $_SERVER["REQUEST_URI"]); die; } /** END - check parameters and verify user is logged-in **/ /** Get array of allowed partners for the current user **/ $allowedPartners = array(); $this->full_name = ""; $currentUser = kuserPeer::getKuserByPartnerAndUid($this->partner_id, $ksObj->user, true); if ($currentUser) { $partners = myPartnerUtils::getPartnersArray($currentUser->getAllowedPartnerIds()); foreach ($partners as $partner) { $allowedPartners[] = array('id' => $partner->getId(), 'name' => $partner->getName()); } $this->full_name = $currentUser->getFullName(); } $this->showChangeAccount = count($allowedPartners) > 1 ? true : false; // Load partner $this->partner = $partner = PartnerPeer::retrieveByPK($this->partner_id); if (!$partner) { KExternalErrors::dieError(KExternalErrors::PARTNER_NOT_FOUND); } if (!$partner->validateApiAccessControl()) { KExternalErrors::dieError(KExternalErrors::SERVICE_ACCESS_CONTROL_RESTRICTED); } kmcUtils::redirectPartnerToCorrectKmc($partner, $this->ks, null, null, null, self::CURRENT_KMC_VERSION); $this->templatePartnerId = $this->partner ? $this->partner->getTemplatePartnerId() : self::SYSTEM_DEFAULT_PARTNER; $ignoreEntrySeoLinks = PermissionPeer::isValidForPartner(PermissionName::FEATURE_IGNORE_ENTRY_SEO_LINKS, $this->partner_id); $useEmbedCodeProtocolHttps = PermissionPeer::isValidForPartner(PermissionName::FEATURE_EMBED_CODE_DEFAULT_PROTOCOL_HTTPS, $this->partner_id); $showFlashStudio = PermissionPeer::isValidForPartner(PermissionName::FEATURE_SHOW_FLASH_STUDIO, $this->partner_id); $showHTMLStudio = PermissionPeer::isValidForPartner(PermissionName::FEATURE_SHOW_HTML_STUDIO, $this->partner_id); $deliveryTypes = $partner->getDeliveryTypes(); $embedCodeTypes = $partner->getEmbedCodeTypes(); $defaultDeliveryType = $partner->getDefaultDeliveryType() ? $partner->getDefaultDeliveryType() : 'http'; $defaultEmbedCodeType = $partner->getDefaultEmbedCodeType() ? $partner->getDefaultEmbedCodeType() : 'auto'; $this->previewEmbedV2 = PermissionPeer::isValidForPartner(PermissionName::FEATURE_PREVIEW_AND_EMBED_V2, $this->partner_id); /** set values for template **/ $this->service_url = requestUtils::getRequestHost(); $this->host = $this->stripProtocol($this->service_url); $this->embed_host = $this->stripProtocol(myPartnerUtils::getHost($this->partner_id)); if (kConf::hasParam('cdn_api_host') && kConf::hasParam('www_host') && $this->host == kConf::get('cdn_api_host')) { $this->host = kConf::get('www_host'); } if ($this->embed_host == kConf::get("www_host") && kConf::hasParam('cdn_api_host')) { $this->embed_host = kConf::get('cdn_api_host'); } $this->embed_host_https = kConf::hasParam('cdn_api_host_https') ? kConf::get('cdn_api_host_https') : kConf::get('www_host'); $this->cdn_url = myPartnerUtils::getCdnHost($this->partner_id); $this->cdn_host = $this->stripProtocol($this->cdn_url); $this->rtmp_host = kConf::get("rtmp_url"); $this->flash_dir = $this->cdn_url . myContentStorage::getFSFlashRootPath(); /** set payingPartner flag **/ $this->payingPartner = 'false'; if ($partner && $partner->getPartnerPackage() != PartnerPackages::PARTNER_PACKAGE_FREE) { $this->payingPartner = 'true'; $ignoreSeoLinks = true; } else { $ignoreSeoLinks = $this->partner->getIgnoreSeoLinks(); } /** get partner languae **/ $language = null; if ($partner->getKMCLanguage()) { $language = $partner->getKMCLanguage(); } $first_login = $partner->getIsFirstLogin(); if ($first_login === true) { $partner->setIsFirstLogin(false); $partner->save(); } /** get logout url **/ $logoutUrl = null; if ($partner->getLogoutUrl()) { $logoutUrl = $partner->getLogoutUrl(); } $this->kmc_swf_version = kConf::get('kmc_version'); $akamaiEdgeServerIpURL = null; if (kConf::hasParam('akamai_edge_server_ip_url')) { $akamaiEdgeServerIpURL = kConf::get('akamai_edge_server_ip_url'); } /** uiconf listing work **/ /** fill $confs with all uiconf objects for all modules **/ $kmcGeneralUiConf = kmcUtils::getAllKMCUiconfs('kmc', $this->kmc_swf_version, self::SYSTEM_DEFAULT_PARTNER); $kmcGeneralTemplateUiConf = kmcUtils::getAllKMCUiconfs('kmc', $this->kmc_swf_version, $this->templatePartnerId); /** for each module, create separated lists of its uiconf, for each need **/ /** kmc general uiconfs **/ $this->kmc_general = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_kmcgeneral", false, $kmcGeneralUiConf); $this->kmc_permissions = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_kmcpermissions", false, $kmcGeneralUiConf); /** P&E players: **/ //$this->content_uiconfs_previewembed = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_previewembed", true, $kmcGeneralUiConf); //$this->content_uiconfs_previewembed_list = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_previewembed_list", true, $kmcGeneralUiConf); $this->content_uiconfs_flavorpreview = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_flavorpreview", false, $kmcGeneralUiConf); /* KCW uiconfs */ $this->content_uiconfs_upload_webcam = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_uploadWebCam", false, $kmcGeneralUiConf); $this->content_uiconfs_upload_import = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_uploadImport", false, $kmcGeneralUiConf); $this->content_uiconds_clipapp_kdp = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_kdpClipApp", false, $kmcGeneralUiConf); $this->content_uiconds_clipapp_kclip = kmcUtils::find_confs_by_usage_tag($kmcGeneralTemplateUiConf, "kmc_kClipClipApp", false, $kmcGeneralUiConf); $this->studioUiConf = kmcUtils::getStudioUiconf(kConf::get("studio_version")); $this->content_uiconfs_studio_v2 = isset($this->studioUiConf) ? array_values($this->studioUiConf) : null; $this->content_uiconf_studio_v2 = is_array($this->content_uiconfs_studio_v2) && reset($this->content_uiconfs_studio_v2) ? reset($this->content_uiconfs_studio_v2) : null; $this->liveAUiConf = kmcUtils::getLiveAUiconf(); $this->content_uiconfs_livea = isset($this->liveAUiConf) ? array_values($this->liveAUiConf) : null; $this->content_uiconf_livea = is_array($this->content_uiconfs_livea) && reset($this->content_uiconfs_livea) ? reset($this->content_uiconfs_livea) : null; $kmcVars = array('kmc_version' => $this->kmc_swf_version, 'kmc_general_uiconf' => $this->kmc_general->getId(), 'kmc_permissions_uiconf' => $this->kmc_permissions->getId(), 'allowed_partners' => $allowedPartners, 'kmc_secured' => (bool) kConf::get("kmc_secured_login"), 'enableLanguageMenu' => true, 'service_url' => $this->service_url, 'host' => $this->host, 'cdn_host' => $this->cdn_host, 'rtmp_host' => $this->rtmp_host, 'embed_host' => $this->embed_host, 'embed_host_https' => $this->embed_host_https, 'flash_dir' => $this->flash_dir, 'getuiconfs_url' => '/index.php/kmc/getuiconfs', 'terms_of_use' => kConf::get('terms_of_use_uri'), 'ks' => $this->ks, 'partner_id' => $this->partner_id, 'first_login' => (bool) $first_login, 'whitelabel' => $this->templatePartnerId, 'ignore_seo_links' => (bool) $ignoreSeoLinks, 'ignore_entry_seo' => (bool) $ignoreEntrySeoLinks, 'embed_code_protocol_https' => (bool) $useEmbedCodeProtocolHttps, 'delivery_types' => $deliveryTypes, 'embed_code_types' => $embedCodeTypes, 'default_delivery_type' => $defaultDeliveryType, 'default_embed_code_type' => $defaultEmbedCodeType, 'kcw_webcam_uiconf' => $this->content_uiconfs_upload_webcam->getId(), 'kcw_import_uiconf' => $this->content_uiconfs_upload_import->getId(), 'default_kdp' => array('id' => $this->content_uiconfs_flavorpreview->getId(), 'height' => $this->content_uiconfs_flavorpreview->getHeight(), 'width' => $this->content_uiconfs_flavorpreview->getWidth(), 'swf_version' => $this->content_uiconfs_flavorpreview->getswfUrlVersion()), 'clipapp' => array('version' => kConf::get("clipapp_version"), 'kdp' => $this->content_uiconds_clipapp_kdp->getId(), 'kclip' => $this->content_uiconds_clipapp_kclip->getId()), 'studio' => array('version' => kConf::get("studio_version"), 'uiConfID' => isset($this->content_uiconf_studio_v2) ? $this->content_uiconf_studio_v2->getId() : '', 'config' => isset($this->content_uiconf_studio_v2) ? $this->content_uiconf_studio_v2->getConfig() : '', 'showFlashStudio' => $showFlashStudio, 'showHTMLStudio' => $showHTMLStudio), 'liveanalytics' => array('version' => kConf::get("liveanalytics_version"), 'player_id' => isset($this->content_uiconf_livea) ? $this->content_uiconf_livea->getId() : '', 'map_zoom_levels' => kConf::hasParam("map_zoom_levels") ? kConf::get("map_zoom_levels") : '', 'map_urls' => kConf::hasParam("cdn_static_hosts") ? array_map(function ($s) { return "{$s}/content/static/maps/v1"; }, kConf::get("cdn_static_hosts")) : ''), 'usagedashboard' => array('version' => kConf::get("usagedashboard_version")), 'disable_analytics' => (bool) kConf::get("kmc_disable_analytics"), 'google_analytics_account' => kConf::get("ga_account"), 'language' => $language, 'logoutUrl' => $logoutUrl, 'allowFrame' => (bool) $allowFrame, 'akamaiEdgeServerIpURL' => $akamaiEdgeServerIpURL, 'logoUrl' => kmcUtils::getWhitelabelData($partner, 'logo_url'), 'supportUrl' => kmcUtils::getWhitelabelData($partner, 'support_url')); $this->kmcVars = $kmcVars; }