Location: PHPKode > projects > Communication Kit > programs/live/pt_display_inc.php
<?php
$sql = mysql_query("SELECT * FROM ".PT_VIEWS."
		 	 							WHERE pt_id = '$page_form_id' ");
$row = mysql_fetch_array($sql);
foreach( $row AS $key => $val ){
  $$key = stripslashes( $val );
}
print "<script>";
print "cnMenu.onshow=\"document.layers?document.layers.formLayer.visibility='hidden':document.getElementById('formDiv').style.visibility='hidden';\"\n";
print "cnMenu.onhide=\"document.layers?document.layers.formLayer.visibility='visible':document.getElementById('formDiv').style.visibility='visible';\"\n";
print "</script>";

print "<ilayer id='formLayer'><div id='formDiv'><table cellpadding=6>";
print "<tr><td colspan=2 class='small_text'>".nl2br($pt_intro_text)."</td></tr>\n";
print "</table>\n";
if (file_exists(ROOT."images/page/ptv_$page_ref.jpg")){
?>
<script language="JavaScript">
//----------------------------------------------------------------------
// JavaScript code to operate the control buttons for the PTViewer.
//
// You need to include this code only once on your HTML page,
// regardless of how many PTViewers you embed in your page.
//----------------------------------------------------------------------
var isNav = false;
var isIE = false;
var handCursor;

// Figure out which browser is running.

if ((navigator.appName.indexOf("Netscape") != -1) &&
(parseInt(navigator.appVersion) >= 4)) {
isNav = true;
} else if ((navigator.appName.indexOf("Microsoft") != -1) &&
(parseInt(navigator.appVersion) >= 4)) {
isIE = true;
} else {
}
if (isIE) {
handCursor = 'hand';
} else {
handCursor = 'pointer';
}
</script>
<table title="<?="ptview_$page_ref"?>" border="0" cellpadding="0" cellspacing="0" width="320">
<tr>
  <td colspan="2" bgcolor="#000000" width="320" height="240"
   valign="middle" align="center">
    <applet id="<?="ptv_$page_ref"?>" codebase="ptviewer/"
     archive="ptviewer.jar" code="ptviewer.class"
     width="318" height="238" align="center"
     onmouseover="this.style.cursor='move'">
      <param name="file" value="images/page/ptv_<?=$page_ref?>.jpg">
      <param name="fov" value="<?=$pt_fov?>">
      <param name="pan" value="<?=($pt_pan-180)?>">
      <param name="tilt" value="<?=($pt_tilt-90)?>">
      <param name="auto" value="<?=($pt_auto/100)?>">
    </applet>
  </td>
</tr>
<tr>
  <td colspan="2" width="320" height="2"></td>
</tr>
<tr>
  <td width="57" bgcolor="#000000" height="20"
   valign="bottom" align="right"><img
    src="ptviewer/zoomin.gif" alt="Zoom In"
     onmouseover="this.style.cursor=handCursor"
     onmousedown="ZoomIn(document.<?="ptv_$page_ref"?>)"
     onmouseup="StopZoom(document.<?="ptv_$page_ref"?>)"
     onmouseout="StopZoom(document.<?="ptv_$page_ref"?>)"
     WIDTH="19" HEIGHT="19"><img
    src="ptviewer/zoomout.gif" alt="Zoom Out"
     onmouseover="this.style.cursor=handCursor"
     onmousedown="ZoomOut(document.<?="ptv_$page_ref"?>)"
     onmouseup="StopZoom(document.<?="ptv_$page_ref"?>)"
     onmouseout="StopZoom(document.<?="ptv_$page_ref"?>)"
     WIDTH="19" HEIGHT="19"><img
    src="ptviewer/hotspots.gif" alt="Show/Hide Hotspots"
     onmouseover="this.style.cursor=handCursor"
     onmousedown="document.<?="ptv_$page_ref"?>.toggleHS()"
     WIDTH="19" HEIGHT="19"></td>
  <td width="281" height="20"></td>
</tr>
</table></table</ilayer></p>
<?
}//end if if jpeg exists
?>
Return current item: Communication Kit