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 YouTube</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(
"matrixEmbedYouTube");
72 var fields = [
"f_width",
"f_height",
"f_colour1",
"f_colour2"];
73 var chk_fields = [
"f_auto_start",
"f_loop",
"f_full_screen",
"f_egm",
"f_rel",
"f_show_border",
"f_enable_js"];
74 var param =
new Object();
76 for (var i in fields) {
78 var el = document.getElementById(
id);
81 param[
"f_vid"] = document.getElementById(
'video_id').value;
82 param[
"f_video_url"] = document.getElementById(
'video_url').value;
83 for (var i in chk_fields) {
84 var
id = chk_fields[i];
85 var el = document.getElementById(
id);
92 __dlg_close(
"matrixEmbedYouTube", param);
98 __dlg_close(
"matrixEmbedYouTube", null);
104 <style type=
"text/css">
108 font: 11px Tahoma,Verdana,sans-serif;
114 font: 11px Tahoma,Verdana,sans-serif;
130 border-bottom: 1px solid black;
136 padding: 0px 10px 5px 5px;
137 border-color: #725B7D;
140 .fl { width: 9em;
float: left; padding: 2px 5px; text-align: right; }
141 .fr { width: 7em;
float: left; padding: 2px 5px; text-align: right; }
144 form { padding: 0px; margin: 0px; }
146 select, input, button {
147 font: 11px Tahoma,Verdana,sans-serif;
155 .buttonColor, .buttonColor-hilite {
158 border-color: #9E86AA #725B7D #725B7D #9E86AA;
161 .buttonColor-hilite {
162 border-color: #402F48;
165 .buttonColor-chooser, .buttonColor-nocolor, .buttonColor-nocolor-hilite {
169 border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
172 .buttonColor-nocolor, .buttonColor-nocolor-hilite { padding: 0px; }
173 .buttonColor-nocolor-hilite { background: #402F48; color: #FFFFFF; }
177 #new-message-popup, #search-wait-popup {
182 background-color: white;
183 border: 2px solid black;
184 font: normal 10px Arial,Verdana,sans-serif;
188 #new-message-popup-titlebar, #search-wait-popup-titlebar {
193 #new-message-popup-close, #search-wait-popup-close {
197 #new-message-popup-close a, #search-wait-popup-close a {
199 text-decoration: none;
202 #new-message-popup-details, #search-wait-popup-details {
208 <body onload=
"Javascript: Init();">
209 <form action=
"" method=
"get" name=
"main_form" id=
"main-form">
213 <table width=
"100%" cellspacing=
"0" cellpadding=
"0">
215 <td valign=
"top" colspan=
"2">
217 <legend><b><?php echo translate(
'general'); ?></b></legend>
218 <table width=
"100%" cellspacing=
"0" cellpadding=
"0">
220 <td valign=
"top" width=
"100%">
221 <table style=
"width:100%">
223 <td
class=
"label">Video ID:</td>
224 <td><?php text_box(
'video_id', (!empty($_REQUEST[
'f_vid']))?$_REQUEST[
'f_vid']:
'', 20, 0)?></td>
226 <td
class=
"label"><?php echo translate(
'url'); ?>:</td>
227 <td><?php text_box(
'video_url', (!empty($_REQUEST[
'f_video_url']))?$_REQUEST[
'f_video_url']:
'', 80, 0)?></td>
238 <td valign=
"top" width=
"50%" rowspan=
"2">
240 <legend><?php echo translate(
'controls'); ?></legend>
241 <table style=
"width:100%">
244 <td
class=
"label"><?php echo translate(
'auto_start'); ?>:</td>
246 <input type=
"checkbox" name=
"auto_start" id=
"f_auto_start" value=
"1" <?php echo ($_REQUEST[
'f_auto_start'] ==
'1') ?
'checked' :
''?> />
251 <td
class=
"label"><?php echo translate(
'loop'); ?>:</td>
253 <input type=
"checkbox" name=
"loop" id=
"f_loop" value=
"1" <?php echo ($_REQUEST[
'f_loop'] ==
'1') ?
'checked' :
''?> />
258 <td
class=
"label">Full Screen:</td>
260 <input type=
"checkbox" name=
"full_screen" id=
"f_full_screen" value=
"1" <?php echo ($_REQUEST[
'f_full_screen'] ==
'1') ?
'checked' :
''?> />
265 <td
class=
"label">Show Related Videos:</td>
267 <input type=
"checkbox" name=
"rel" id=
"f_rel" value=
"1" <?php echo ($_REQUEST[
'f_rel'] ==
'1') ?
'checked' :
''?> />
272 <td
class=
"label">Enable Genius Bar:</td>
274 <input type=
"checkbox" name=
"egm" id=
"f_egm" value=
"1" <?php echo ($_REQUEST[
'f_egm'] ==
'1') ?
'checked' :
''?> />
278 <!-- enable js api -->
279 <td
class=
"label">Enable Javascript API:</td>
281 <input type=
"checkbox" name=
"enable_js" id=
"f_enable_js" value=
"1" <?php echo ($_REQUEST[
'f_enable_js'] ==
'1') ?
'checked' :
''?> />
287 <td valign=
"top" width=
"50%">
289 <legend><?php echo translate(
'size'); ?></legend>
290 <table style=
"width:100%">
292 <td
class=
"label" width=
"50%"><?php echo translate(
'width'); ?>:</td>
294 <input type=
"text" name=
"width" id=
"f_width" size=
"5" title=
"Width" value=
"<?php echo empty($_REQUEST['f_width']) ? '480' : htmlspecialchars($_REQUEST['f_width']) ?>" />
298 <td
class=
"label"><?php echo translate(
'height'); ?>:</td>
300 <input type=
"text" name=
"height" id=
"f_height" size=
"5" title=
"Height" value=
"<?php echo empty($_REQUEST['f_height']) ? '385' : htmlspecialchars($_REQUEST['f_height']) ?>" />
308 <td valign=
"top" width=
"50%">
310 <legend><?php echo translate(
'style'); ?></legend>
311 <table style=
"width:100%">
313 <td
class=
"label" width=
"50%"><?php echo translate(
'border'); ?>:</td>
315 <input type=
"checkbox" name=
"show_border" id=
"f_show_border" size=
"5" title=
"Border" value=
"1" <?php echo ($_REQUEST[
'f_show_border'] ==
'1') ?
'checked' :
''?> />
319 <td
class=
"label">Primary Border <?php echo translate('colour'); ?>:</td>
321 <input type=
"text" name=
"colour1" id=
"f_colour1" size=
"8" title=
"Colour 1" value=
"<?php echo empty($_REQUEST['f_colour1']) ? '' : htmlspecialchars($_REQUEST['f_colour1']) ?>" />
325 <td
class=
"label">Secondary Border <?php echo translate('colour'); ?>:</td>
327 <input type=
"text" name=
"colour2" id=
"f_colour2" size=
"8" title=
"Colour 2" value=
"<?php echo empty($_REQUEST['f_colour2']) ? '' : htmlspecialchars($_REQUEST['f_colour2']) ?>" />
339 <div style=
"margin-top: 5px; text-align: right;">
341 <button type=
"button" name=
"ok" onclick=
"return onOK();"><?php echo translate(
'ok'); ?></button>
342 <button type=
"button" name=
"cancel" onclick=
"return onCancel();"><?php echo translate(
'cancel'); ?></button>