Current File : /home/inlingua/www/icentex/pdfsave/test_pdf1.php |
<?php
echo $browser = strtolower($_SERVER['HTTP_USER_AGENT']);
//presto is for opera
//
?>
<!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">
<head>
<script>
var PDFOK = true;
function PDFLoadError() {
PDFOK = false;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript" src="test.js"></script>
<script type="text/javascript">
document.onkeyup = function(evt) {
evt = evt || window.event;
var charCode = evt.which || evt.keyCode;
var charTyped = charCode;
if(charTyped=="44")
{
alert("Character typed: " + charTyped+".Doing Something Wrong");
}
//document.getElementById('dd').style.display="none";
};
</script>
</head>
<body id='dd'>
<?php
if (strpos($browser, 'firefox') || strpos($browser, 'presto') )
{
?>
<div>
<object width="100%" style="z-index:-10px;" height="500" type="application/pdf" data="savepdf.php?#zoom=100&scrollbar=1&toolbar=0&navpanes=0" id="pdf_content" onerror="PDFLoadError();">
<p>There is some problem.</p>
</object>
</div>
<?php
}
else if(strpos($browser, 'chrome'))
{
?>
<object width="100%" style="z-index:-10px;" height="500" type="application/pdf" data="images/example_016.pdf?#zoom=100&scrollbar=1&toolbar=0&navpanes=0" id="pdf_content" onerror="PDFLoadError();">
<p>There is some problem.</p>
</object>
<?php
}
elseif (strpos($browser, 'msie')) {
?>
<object width="100%" style="z-index:-10px;" height="500" type="application/pdf" data="images/example_016.pdf?#zoom=100&scrollbar=1&toolbar=0&navpanes=0" id="pdf_content" onerror="PDFLoadError();">
<p>There is some problem.</p>
</object>
<?php
//die();
}
?>
<script>
if (!PDFOK) {
// PDF reader is not installed...
alert("There is aome problem");
}
</script>
</body>
</html>