8.0) { $zoom = 8.0; } if ($zoom <= 0.0) { $zoom = 1.0; } if ($thumb > 1024) { $thumb = 1024; } # # Check to make sure this is a valid PID/EID tuple. # if (! TBValidExperiment($exp_pid, $exp_eid)) { USERERROR("The experiment $exp_eid is not a valid experiment ". "in project $exp_pid.", 1); } # # Verify Permission. # if (! TBExptAccessCheck($uid, $exp_pid, $exp_eid, $TB_EXPT_READINFO)) { USERERROR("You do not have permission to view experiment $exp_eid!", 1); } # # XXX If an admin type, then use an appropriate gid so that we can get # get to the top file. This needs more thought. # $gid = "nobody"; if (ISADMIN($uid)) { $gid = $exp_pid; } $arguments = ""; # note that we've already ensured that $detail and $thumb are numeric above. if ($detail != 0) { $arguments .= " -d $detail"; } if ($thumb != 0) { $arguments .= " -t $thumb"; } # # Spit out the image with a content header. # if ($fp = popen("$TBSUEXEC_PATH $uid $gid webvistopology " . "$arguments -z $zoom $pid $eid", "r")) { header("Content-type: image/png"); fpassthru($fp); } # # No Footer! # ?>