source: pro-violet-viettel/sourcecode/assets/soanbai/index.php @ 473

Last change on this file since 473 was 473, checked in by dungnv, 11 years ago
File size: 3.5 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3<head>
4  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5  <title>Violet Online</title>
6  <style>html, body {height: 100%; margin: 0; padding: 0;}</style>
7</head>
8<script type="text/javascript" language="JavaScript">
9<!--//
10
11var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
12var g_Flash = null;
13var g_cbData = "";
14
15function InitViolet() {
16  g_Flash = isInternetExplorer ? LectorEditorOnline : document.LectorEditorOnline;
17}
18
19function GetClipboardItem() {
20  var cbData = window.clipboardData? window.clipboardData.getData('Text'): g_cbData;
21  g_Flash.SetVariable("clipboardData", cbData);
22  g_Flash.SetVariable("command", "Get Text");
23}
24
25function SetClipboardItem(args) {
26  if (window.clipboardData) window.clipboardData.setData('Text', args);
27  else g_cbData = args;
28  g_Flash.SetVariable("command", "Set OK");
29}
30
31function SetWindowTitle(fileName) {
32  if (fileName == "") document.title = "Violet Online";
33  else {
34    var docName = fileName.substring(0, fileName.length - 4);
35    document.title = "Violet Online - " + docName;
36  }
37}
38
39function SetWindowState() {
40  var full = (g_Flash.width == "100%");
41  g_Flash.width  = full? "800": "100%";
42  g_Flash.height = full? "580": "100%";
43}
44
45// Handle all the FSCommand messages in a Flash movie.
46function LectorEditorOnline_DoFSCommand(command, args) {
47  switch (command) {
48    case "Set Title": SetWindowTitle(args); break;
49    case "Get Clipboard": GetClipboardItem(); break;
50    case "Set Clipboard": SetClipboardItem(args); break;
51    case "Set State": SetWindowState(); break;
52    case "Quit": window.open('','_self').close(); break;
53    case "trace": alert(args); break;
54  }
55}
56
57// Hook for Internet Explorer.
58if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
59  document.write('<script language=\"VBScript\"\>\n');
60  document.write('On Error Resume Next\n');
61  document.write('Sub LectorEditorOnline_FSCommand(ByVal command, ByVal args)\n');
62  document.write('  Call LectorEditorOnline_DoFSCommand(command, args)\n');
63  document.write('End Sub\n');
64  document.write('</script\>\n');
65}
66
67//-->
68</script>
69<?php $langParam = $_REQUEST['language']? '&language='.$_REQUEST['language']: '' ?>
70<?php $flashVars = 'online=true&applicationId=Violet Online' ?>
71<?php $flashVars.= '&commonLibList=sxIOE3.xml,sxIOE4.xml,sxIOE5.xml,tnIOE3.xml,tnIOE4.xml,tnIOE5.xml' ?>
72<?php $flashVars.= '&youtubeUrl=Service/fake_youtube.php'.$langParam.'&command=Init OK' ?>
73<body bgcolor="#ffffff" onload="InitViolet()">
74  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="LectorEditorOnline">
75    <param name="allowScriptAccess" value="sameDomain" />
76    <param name="movie" value="Lecture/LectureEditor.swf" />
77    <param name="flashVars" value="<?php echo $flashVars ?>">
78    <param name="quality" value="high" />
79    <param name="bgcolor" value="#ffffff" />
80    <embed src="Lecture/LectureEditor.swf" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="LectorEditorOnline" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashVars="<?php echo $flashVars ?>"/>
81  </object>
82</body>
Note: See TracBrowser for help on using the repository browser.