1<?php 2 3 //fix for Opera XMLHttpRequests 4 if(!count($_POST) && $HTTP_RAW_POST_DATA){ 5 parse_str($HTTP_RAW_POST_DATA, $_POST); 6 } 7 8 if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../'); 9 require_once(DOKU_INC.'inc/init.php'); 10 require_once(DOKU_INC.'inc/common.php'); 11 require_once(DOKU_INC.'inc/pageutils.php'); 12 require_once(DOKU_INC.'inc/auth.php'); 13 //close sesseion 14 session_write_close(); 15 16 header('Content-Type: text/html; charset=utf-8'); 17 18 $hostName = "http".($_SERVER['HTTPS'] ? 's' : null).'://'.$_SERVER['HTTP_HOST']; 19 20 $imageFormat = "PNG"; 21 22 $cookies; 23 foreach (array_keys($_COOKIE) as $cookieName) { 24 $cookies.=bin2hex($cookieName)."=".bin2hex($_COOKIE[$cookieName]).";"; 25 } 26 27 $pageName = $_GET["pageName"]; 28 $edid = $_GET["edid"]; 29?> 30 31<script language="JavaScript" type="text/javascript"><!-- 32 var _info = navigator.userAgent; 33 var _ns = false; 34 var _ns6 = false; 35 var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0); 36//--></script> 37 <comment> 38 <script language="JavaScript" type="text/javascript"><!-- 39 var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) || (_info.indexOf("IRIX") > 0))); 40 var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0)); 41//--></script> 42 </comment> 43 44<script language="JavaScript" type="text/javascript"><!-- 45 if (_ie == true) document.writeln('<object classid="clsid:CAFEEFAC-0017-0000-0020-ABCDEFFEDCBA" NAME = "jCapture" WIDTH = "1" HEIGHT = "1" codebase="http://java.sun.com/update/1.7.0/jinstall-1_7_0-windows-i586.cab#Version=7,0,0,0"><xmp>'); 46 else if (_ns == true && _ns6 == false) document.writeln('<embed ' + 47 'type="application/x-java-applet;jpi-version=1.7.0" \ 48 ID = "jCaptureApplet" \ 49 scriptable = "true" \ 50 mayscript = "true" \ 51 WIDTH = "1" 52 JAVA_CODEBASE = "/somenonexistingcodebase" \ 53 HEIGHT = "1" 54 CODE = "com.hammurapi.jcapture.JCaptureApplet.class" \ 55 ARCHIVE = "<?php echo DOKU_BASE; ?>lib/plugins/jcapture/lib/jcapture.jar" \ 56 NAME = "jCapture" \ 57 dokuBase ="<?php echo bin2hex(DOKU_BASE); ?>" \ 58 sectok ="<?php echo getSecurityToken(); ?>" \ 59 cookies ="<?php echo $cookies; ?>" \ 60 authtok = "<?php echo auth_createToken(); ?>" \ 61 pageName = "<?php echo $pageName; ?>" \ 62 edid = "<?php echo $edid; ?>" \ 63 host ="<?php echo $hostName; ?>" ' + 64 'scriptable=false ' + 65 'pluginspage="http://java.sun.com/products/plugin/index.html#download"><xmp>'); 66//--></script> 67<applet id="jCaptureApplet" CODE = "com.hammurapi.jcapture.JCaptureApplet.class" WIDTH="1" HEIGHT="1" ARCHIVE = "<?php echo DOKU_BASE; ?>lib/plugins/jcapture/lib/jcapture.jar" NAME = "jCapture"></xmp> 68 <PARAM NAME = CODE VALUE = "com.hammurapi.jcapture.JCaptureApplet.class" > 69 <PARAM NAME = ARCHIVE VALUE = "<?php echo DOKU_BASE; ?>lib/plugins/jcapture/lib/jcapture.jar" > 70 <PARAM NAME = NAME VALUE = "jCapture" > 71 <param name="type" value="application/x-java-applet;jpi-version=1.7.0"> 72 <param name="scriptable" value="true"> 73 <param name="mayscript" value="true"> 74 <PARAM NAME = "dokuBase" VALUE="<?php echo bin2hex(DOKU_BASE); ?>"> 75 <PARAM NAME = "sectok" VALUE="<?php echo getSecurityToken(); ?>"> 76 <PARAM NAME = "cookies" VALUE="<?php echo $cookies; ?>"> 77 <PARAM NAME = "host" VALUE="<?php echo $hostName; ?>"> 78 <PARAM NAME = "pageName" VALUE="<?php echo $pageName; ?>"> 79 <PARAM NAME = "edid" VALUE="<?php echo $edid; ?>"> 80 <PARAM NAME = CODEBASE VALUE = "/somenonexistingcodebase" > 81 <PARAM NAME = "authtok" VALUE="<?php echo auth_createToken(); ?>"> 82 83Java 2 Standard Edition v 1.7 or above is required for this applet.<br/> 84 Download it from <a href="http://java.sun.com">http://java.sun.com</a>. 85</applet> 86</embed> 87</object> 88 89<!-- 90<APPLET CODE = "com.hammurapi.jcapture.JCaptureApplet.class" ARCHIVE = "<?php echo DOKU_BASE; ?>lib/plugins/jcapture/lib/jcapture.jar" NAME = "jCapture"> 91<PARAM NAME = "dokuBase" VALUE="<?php echo bin2hex(DOKU_BASE); ?>"> 92<PARAM NAME = "sectok" VALUE="<?php echo getSecurityToken(); ?>"> 93<PARAM NAME = "cookies" VALUE="<?php echo $cookies; ?>"> 94<PARAM NAME = "host" VALUE="<?php echo $hostName; ?>"> 95Java 2 Standard Edition v 1.7 or above is required for this applet.<br/> 96 Download it from <a href="http://java.sun.com">http://java.sun.com</a>. 97 98</APPLET> 99--> 100