26 require_once dirname(__FILE__).
'/../../../../core/include/init.inc';
27 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
29 if (empty($GLOBALS[
'SQ_SYSTEM']->user) || !($GLOBALS[
'SQ_SYSTEM']->user->canAccessBackend() || $GLOBALS[
'SQ_SYSTEM']->user->type() ==
'simple_edit_user')){
33 if (!isset($_GET[
'f_fileid'])) $_GET[
'f_fileid'] = 0;
36 <html style=
"width: 740px; height: 500px;">
38 <title>Embed Movie</title>
42 $include_list = Array(sq_web_path(
'lib').
'/js/translation.js');
44 $locales = $GLOBALS[
'SQ_SYSTEM']->lm->getCumulativeLocaleParts($GLOBALS[
'SQ_SYSTEM']->lm->getCurrentLocale());
46 foreach ($locales as $locale) {
47 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$locale.
'.js')) {
48 $include_list[] = sq_web_path(
'data').
'/system/core/js_strings.'.$locale.
'.js';
52 foreach ($include_list as $link) {
53 ?><script type=
"text/javascript" src=
"<?php echo $link; ?>"></script>
57 <script type=
"text/javascript" src=
"../../core/popup.js"></script>
58 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib').'/asset_map/javaExternalCall.js' ?>"></script>
59 <script type=
"text/javascript" src=
"<?php echo sq_web_path('fudge').'/var_serialise/var_serialise.js' ?>"></script>
60 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib').'/html_form/html_form.js' ?>"></script>
61 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib').'/js/general.js' ?>"></script>
62 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib').'/js/tooltip.js' ?>"></script>
64 <script type=
"text/javascript">
67 __dlg_init(
"matrixEmbedMovie");
72 var fields = [
"f_width",
"f_height"];
73 var chk_fields = [
"f_show_controls",
"f_auto_start",
"f_embed_loop"];
74 var param =
new Object();
76 for (var i in fields) {
78 var el = document.getElementById(
id);
81 if (document.getElementById(
'url_link').value && document.getElementById(
'url_link').value.substring(0, 5) !=
'./?a=') {
82 if (!document.getElementById(
'url_protocol').value) {
83 alert(
"Please specify the protocol for external url");
86 param[
'use_external'] =
true;
87 param[
"external_url"] = document.getElementById(
'url_protocol').value + document.getElementById(
'url_link').value;
89 param[
'use_external'] =
false;
90 param[
"f_fileid"] = document.getElementById(
'assetid[assetid]').value;
92 for (var i in chk_fields) {
93 var
id = chk_fields[i];
94 var el = document.getElementById(
id);
101 __dlg_close(
"matrixEmbedMovie", param);
106 function onCancel() {
107 __dlg_close(
"matrixEmbedMovie", null);
113 <style type=
"text/css">
117 font: 11px Tahoma,Verdana,sans-serif;
123 font: 11px Tahoma,Verdana,sans-serif;
132 font: 11px Tahoma,Verdana,sans-serif;
138 #quick-search #quick-search-for {
139 font: 11px Arial,Verdana,sans-serif;
140 border: 1px solid black;
144 #quick-search #quick-search-for-label {
145 font: 11px Arial,Verdana,sans-serif;
158 border-bottom: 1px solid black;
164 padding: 0px 10px 5px 5px;
165 border-color: #725B7D;
168 .fl { width: 9em;
float: left; padding: 2px 5px; text-align: right; }
169 .fr { width: 7em;
float: left; padding: 2px 5px; text-align: right; }
172 form { padding: 0px; margin: 0px; }
174 select, input, button {
175 font: 11px Tahoma,Verdana,sans-serif;
183 .buttonColor, .buttonColor-hilite {
186 border-color: #9E86AA #725B7D #725B7D #9E86AA;
189 .buttonColor-hilite {
190 border-color: #402F48;
193 .buttonColor-chooser, .buttonColor-nocolor, .buttonColor-nocolor-hilite {
197 border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
200 .buttonColor-nocolor, .buttonColor-nocolor-hilite { padding: 0px; }
201 .buttonColor-nocolor-hilite { background: #402F48; color: #FFFFFF; }
205 #new-message-popup, #search-wait-popup {
210 background-color: white;
211 border: 2px solid black;
212 font: normal 10px Arial,Verdana,sans-serif;
216 #new-message-popup-titlebar, #search-wait-popup-titlebar {
221 #new-message-popup-close, #search-wait-popup-close {
225 #new-message-popup-close a, #search-wait-popup-close a {
227 text-decoration: none;
230 #new-message-popup-details, #search-wait-popup-details {
239 div.search-result-blurb {
245 div.search-result-pager {
251 div.search-result-detail {
258 a.search-result-expand-link {
259 text-decoration: none;
266 text-decoration: none;
270 .search-result-expand-div {
274 background-color: white;
278 .search-result-entry {
284 .sq-backend-search-failed-table {
285 border: 2px solid #594165;
286 border-collapse: collapse;
287 background-color: #ECECEC;
290 .sq-backend-search-failed-heading, .sq-backend-search-failed-body {
292 background-color: #ececec;
293 font-family: Arial, Verdana, Helvetica, sans-serif;
297 text-decoration: none;
301 .sq-backend-search-failed-body {
306 .sq-backend-search-results-table {
307 border: 2px solid #594165;
308 border-collapse: collapse;
309 background-color: #ECECEC;
312 .sq-backend-search-results-heading, .sq-backend-search-results-body {
314 background-color: #FFFFFF;
315 font-family: Arial, Verdana, Helvetica, sans-serif;
319 text-decoration: none;
323 .sq-backend-search-results-heading {
324 background-color: #F0F0E6;
327 .sq-backend-search-results-highlight {
328 background-color: yellow;
331 .sq-backend-search-results-body {
338 <body onload=
"Javascript: Init();" onUnload=
"Javascript: asset_finder_onunload();">
339 <form action=
"" method=
"get" name=
"main_form" id=
"main-form">
344 include_once(SQ_LIB_PATH.
'/asset_map/asset_map.inc');
346 $asset_map->embedAssetMap(
'simple', 200, 350);
348 $url_protocol_options = Array(
350 'http://' =>
'http://',
351 'https://' =>
'https://',
352 'ftp://' =>
'ftp://',
353 'rtsp://' =>
'rtsp://',
358 <table width=
"100%" cellspacing=
"0" cellpadding=
"0">
360 <td valign=
"top" colspan=
"2">
361 <script type=
"text/javascript">
362 function setUrl(protocol, link) {
363 var f = document.main_form;
365 if (protocol != null) highlight_combo_value(f.url_protocol, protocol);
367 f.url_link.value = link;
369 var assetid = f.elements[
"assetid[assetid]"].value;
373 if (assetid.search(/:/) != -1) {
374 f.url_link.value =
'./?a=' + assetid +
'$';
376 f.url_link.value =
'./?a=' + assetid;
378 highlight_combo_value(f.url_protocol,
'');
381 setTimeout(
'self.focus()',100);
385 <legend><b><?php echo translate(
'general'); ?></b></legend>
386 <table width=
"100%" cellspacing=
"0" cellpadding=
"0">
388 <td valign=
"top" width=
"100%">
389 <table style=
"width:100%">
391 <td
class=
"label"><?php echo translate(
'protocol'); ?>:</td>
392 <td><?php combo_box(
'url_protocol',$url_protocol_options ,
false,$_REQUEST[
'f_fileprotocol'],0,
'style="font-family: courier new; font-size: 11px;"'); ?></td>
393 <td
class=
"label"><?php echo translate(
'link'); ?>:</td>
394 <td><?php text_box(
'url_link', $_REQUEST[
'f_fileurl'], 40, 0)?></td>
397 <td
class=
"label"><?php echo translate(
'select_asset'); ?>:</td>
398 <td colspan=
"3"><?php asset_finder(
'assetid',
'', Array(
'file' =>
'D'),
'',
false,
'setUrl'); ?></td>
409 <td valign=
"top" width=
"50%">
411 <legend><?php echo translate(
'controls'); ?></legend>
412 <table style=
"width:100%">
414 <td
class=
"label" colspan=
"2"><b><?php echo translate(
'wmv-asf-asx_only'); ?></b></td>
417 <td
class=
"label"><?php echo translate(
'auto_start'); ?>:</td>
419 <input type=
"checkbox" name=
"auto_start" id=
"f_auto_start" value=
"1" <?php echo ($_REQUEST[
'f_auto_start'] ==
'1') ?
'checked' :
''?> />
423 <td
class=
"label"><?php echo translate(
'loop'); ?>:</td>
425 <input type=
"checkbox" name=
"embed_loop" id=
"f_embed_loop" value=
"1" <?php echo ($_REQUEST[
'f_embed_loop'] ==
'1') ?
'checked' :
''?> />
429 <td
class=
"label" colspan=
"2"><b><?php echo translate(
'mov-wmv-asf-asx_only'); ?></b></td>
432 <td
class=
"label"><?php echo translate(
'show_controls'); ?>:</td>
434 <input type=
"checkbox" name=
"show_controls" id=
"f_show_controls" value=
"1" <?php echo ($_REQUEST[
'f_show_controls'] ==
'1') ?
'checked' :
''?> />
440 <td valign=
"top" width=
"50%">
442 <legend><?php echo translate(
'size'); ?></legend>
443 <table style=
"width:100%">
445 <td
class=
"label" width=
"50%"><?php echo translate(
'width'); ?>:</td>
447 <input type=
"text" name=
"width" id=
"f_width" size=
"5" title=
"Width" value=
"<?php echo empty($_REQUEST['f_width']) ? '100' : htmlspecialchars($_REQUEST['f_width']) ?>" />
451 <td
class=
"label"><?php echo translate(
'height'); ?>:</td>
453 <input type=
"text" name=
"height" id=
"f_height" size=
"5" title=
"Height" value=
"<?php echo empty($_REQUEST['f_height']) ? '100' : htmlspecialchars($_REQUEST['f_height']) ?>" />
465 <div style=
"margin-top: 5px; text-align: right;">
467 <button type=
"button" name=
"ok" onclick=
"return onOK();"><?php echo translate(
'ok'); ?></button>
468 <button type=
"button" name=
"cancel" onclick=
"return onCancel();"><?php echo translate(
'cancel'); ?></button>
472 <!-- Search results -->
473 <div
id=
"new-message-popup"><div
id=
"new-message-popup-titlebar"><div
id=
"new-message-popup-close">[ <a href=
"#" onclick=
"document.getElementById('new-message-popup').style.display = 'none'; return false;">x</a> ]</div><span
id=
"new-message-popup-title">Searched
for ''</span></div>
474 <div
id=
"new-message-popup-details"></div>
476 <div
id=
"search-wait-popup"><div
id=
"search-wait-popup-titlebar"><div
id=
"search-wait-popup-close">[ <a href=
"#" onclick=
"document.getElementById('search-wait-popup').style.display = 'none'; return false;">x</a> ]</div><span
id=
"search-wait-popup-title">Search in Progress</span></div>
477 <div
id=
"search-wait-popup-details">Your search is being processed, please wait...</div>
480 <script type=
"text/javascript"><!--
482 var results_per_page = <?php echo $GLOBALS[
'SQ_SYSTEM']->getUserPrefs(
'search_manager',
'SQ_SEARCH_BACKEND_PAGE_SIZE') !== FALSE ? $GLOBALS[
'SQ_SYSTEM']->getUserPrefs(
'search_manager',
'SQ_SEARCH_BACKEND_PAGE_SIZE') : 5; ?>;
483 var total_results = 0;
485 function jump_to_search_results(page) {
487 document.getElementById(
"search-result-page-" + current).style.display =
'none';
488 document.getElementById(
"search-result-page-" + page).style.display =
'block';
491 document.getElementById(
"sq-search-results-page-start").innerHTML = (results_per_page * (page - 1)) + 1;
492 document.getElementById(
"sq-search-results-page-end").innerHTML = Math.min(total_results, results_per_page * page);
494 for (i = ((page - 1) * results_per_page) + 1; i <= Math.min(total_results, page * results_per_page); i++) {
497 document.getElementById(
"search-result-" + i +
"-expand-link").innerHTML =
'+';
498 document.getElementById(
"search-result-" + i +
"-detail").style.display =
'none';
504 function set_asset_finder_from_search(assetid, label, url, linkid) {
505 document.cookie =
'lastSelectedAssetId=' + escape(assetid);
507 ASSET_FINDER_OBJ.set_hidden_field(
'assetid[assetid]', assetid);
508 ASSET_FINDER_OBJ.set_hidden_field(
'assetid[url]', url);
509 ASSET_FINDER_OBJ.set_hidden_field(
'assetid[linkid]', linkid);
510 ASSET_FINDER_OBJ.set_text_field(
'sq_asset_finder_assetid_label', (assetid == 0) ?
'' : label +
' (Id : #' + assetid +
')');
512 document.getElementById(
"new-message-popup").style.display =
'none';
513 setUrl(
'',
'./?a=' + assetid);