Code: Select all
foreach ($uids as $uid) {
$result = $dbcon->query("SELECT path FROM image where uuid='$uid';");
$row = $dbcon->fetch_row($result);
$file = $row[0];
Code: Select all
foreach ($uids as $uid) {
$result = $dbcon->query("SELECT path FROM image where uuid='$uid';");
$row = $dbcon->fetch_row($result);
$file = $row[0];
Code: Select all
<?php
//
// applet.php
//
// Module for displaying images through Radscaper
//
// Modified based on an original version written by Xiaohui Li
//
function appletExists()
{
$jar = dirname($_SERVER['SCRIPT_FILENAME']) . "/radscaper/radscaper.jar";
return file_exists($jar);
}
//
// uids - array of SOP instance UIDs to display
//
function appletViewer(&$uids)
{
$dbcon = new MyConnection();
print "<APPLET codebase=radscaper/ archive=radscaper.jar code=com.divinev.radscaper.Main.class width=100% height=95%>\n";
print "<PARAM NAME=Config VALUE=config.xml>\n";
$count = 0;
foreach ($uids as $uid) {
$result = $dbcon->query("SELECT path FROM image where uuid='$uid';");
$row = $dbcon->fetch_row($result);
$file = $row[0];
$ls = $file . ".ls";
$ly = $file . ".ly";
$rle = $file . ".rle";
// lossless compression
if (file_exists($ls) && filesize($ls))
$file = $ls;
// lossy compression
else if (file_exists($ly) && filesize($ly))
$file = $ly;
// RLE compression
else if (file_exists($rle) && filesize($rle))
$file = $rle;
printf ("<PARAM NAME=DicomImg%d VALUE=\"%s\">\n", ++$count, $file);
}
print "</APPLET>\n";
}
?>
Code: Select all
session_start();
Code: Select all
<?php
//
// applet.php
//
// Module for displaying images through Radscaper
//
// Modified based on an original version written by Xiaohui Li
//
session_start();
function appletExists()
{
$jar = dirname($_SERVER['SCRIPT_FILENAME']) . "/radscaper/radscaper.jar";
return file_exists($jar);
}
//
// uids - array of SOP instance UIDs to display
//
function appletViewer(&$uids)
{
$dbcon = new MyConnection();
print "<APPLET codebase=radscaper/ archive=radscaper.jar code=com.divinev.radscaper.Main.class width=100% height=95%>\n";
print "<PARAM NAME=Config VALUE=config.xml>\n";
$count = 0;
foreach ($uids as $uid) {
$result = $dbcon->query("SELECT path FROM image where uuid='$uid';");
$row = $dbcon->fetch_row($result);
$file = $row[0];
$ls = $file . ".ls";
$ly = $file . ".ly";
$rle = $file . ".rle";
// lossless compression
if (file_exists($ls) && filesize($ls))
$file = $ls;
// lossy compression
else if (file_exists($ly) && filesize($ly))
$file = $ly;
// RLE compression
else if (file_exists($rle) && filesize($rle))
$file = $rle;
printf ("<PARAM NAME=DicomImg%d VALUE=\"%s\">\n", ++$count, $file);
}
print "</APPLET>\n";
}
?>
Code: Select all
<html>
<head><title>PacsOne Server - Show Images</title></head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body leftmargin="0" topmargin="0" bgcolor="#cccccc">
<APPLET codebase=radscaper/ archive=radscaper.jar code=com.divinev.radscaper.Main.class width=100% height=95%>
<PARAM NAME=Config VALUE=config.xml>
#0 MyDatabase->fetch_row() called at [C:\Program Files (x86)\PacsOne\php\applet.php:30]
#1 appletViewer(Array ([0] => 1.2.392.200036.9125.4.0.319806482.2051802472.399170569)) called at [C:\Program Files (x86)\PacsOne\php\risAccess2.php:73]
<br>uids array = Array
(
[0] => 1.2.392.200036.9125.4.0.319806482.2051802472.399170569
)
<br>uid = 1.2.392.200036.9125.4.0.319806482.2051802472.399170569<br>result = <br>row array = <br><br><PARAM NAME=DicomImg1 VALUE="">
</APPLET>
</td></tr><tr><td><HR></td></tr><tr><td><TABLE width=100% border=0 cellpadding=0><TR><TD ALIGN=LEFT><SMALL>PacsOne Server 6.3.8</SMALL></TD><TD ALIGN=CENTER><SMALL>Your current annual technical support option will expire on <u>2015-10-20 10:07:17
</u></SMALL><TD ALIGN=RIGHT><SMALL>Copyright 2003-2013 (c) RainbowFish Software</SMALL></TD></TR></TABLE></td></tr></TABLE></body>
</html>
Code: Select all
// save login information
$_SESSION['authenticatedHost'] = "localhost";
Code: Select all
// save login information
$_SESSION['authenticatedDatabase'] = $database;
$_SESSION['authenticatedUser'] = $username;
$_SESSION['authenticatedPassword'] = $password;
$_SESSION['authenticatedHost'] = "localhost";
Code: Select all
function appletViewer(&$uids)
{
$dbcon = new MyConnection();
print_r ($dbcon);
print "<APPLET codebase=radscaper/ archive=radscaper.jar code=com.divinev.radscaper.Main.class width=100% height=95%>\n";
print "<PARAM NAME=Config VALUE=config.xml>\n";
Code: Select all
MyConnection Object ( [database] => CIA [username] => cw [password] => xxxxxxxx [connection] => mysqli Object ( [affected_rows] => -1 [client_info] => mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $ [client_version] => 50008 [connect_errno] => 0 [connect_error] => [errno] => 0 [error] => [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 0 [server_info] => 5.6.15-log [server_version] => 50615 [stat] => Uptime: 3545993 Threads: 4 Questions: 9771406 Slow queries: 0 Opens: 109 Flush tables: 1 Open tables: 102 Queries per second avg: 2.755 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 7356 [warning_count] => 0 ) [useMysql] => 1 [useOracle] => [dbapi] => MysqlAPI Object ( [connection] => mysqli Object ( [affected_rows] => -1 [client_info] => mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $ [client_version] => 50008 [connect_errno] => 0 [connect_error] => [errno] => 0 [error] => [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 0 [server_info] => 5.6.15-log [server_version] => 50615 [stat] => Uptime: 3545993 Threads: 4 Questions: 9771407 Slow queries: 0 Opens: 109 Flush tables: 1 Open tables: 102 Queries per second avg: 2.755 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 7356 [warning_count] => 0 ) [useMysqli] => 1 ) [hostname] => localhost )
Code: Select all
MyConnection Object ( [database] => CIA [username] => É»][Ñì [password] => ÝSý‰y¾˜© [connection] => [useMysql] => 1 [useOracle] => [dbapi] => MysqlAPI Object ( [connection] => [useMysqli] => 1 ) [hostname] => localhost )
Code: Select all
// save login information
$_SESSION['authenticatedHost'] = "localhost";
$_SESSION['authenticatedDatabase'] = $database;
if (function_exists("mcrypt_module_open")) { // encrypt username/password
$key = function_exists("hash")? hash("MD5", session_id()) : session_id();
setcookie("sessionCookie", $key, time()+7*24*60*60);
$td = mcrypt_module_open('tripledes', '', 'ecb', '');
$key = substr($key, 0, mcrypt_enc_get_key_size($td));
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td, $key, $iv);
$_SESSION['authenticatedUser'] = mcrypt_generic($td, $username);
$_SESSION['authenticatedPassword'] = mcrypt_generic($td, $password);
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
} else {
$_SESSION['authenticatedUser'] = $username;
$_SESSION['authenticatedPassword'] = $password;
}