2 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
);
3 require('./roots.php');
4 require($root_path.'include/inc_environment_global.php');
6 * CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005 Elpidio Latorilla
11 * See the file "copy_notice.txt" for the licence notice
15 # Define here the width of the preview image
17 define('PREVIEW_SIZE',400);
20 # The ImageJ applet control panel height
24 define('IMAGEJ_PANEL_HEIGHT', 100);
26 # The ImageJ applet control panel height
28 define('IMAGEJ_PANEL_WIDTH_MIN', 250);
30 $lang_tables=array('images.php');
31 define('LANG_FILE','nursing.php');
32 define('NO_2LEVEL_CHK',1);
33 require_once($root_path.'include/inc_front_chain_lang.php');
34 require($root_path.'global_conf/inc_remoteservers_conf.php');
35 /* Load date formatter */
36 include_once($root_path.'include/inc_date_format_functions.php');
39 $final_path="$root_path$fotoserver_localpath$pn/";
41 $final_path="$fotoserver_http$pn/";
44 /* Create image object */
45 include_once($root_path.'include/care_api_classes/class_image.php');
48 if(isset($mode)&&$mode=='save'){
50 //$HTTP_POST_VARS['history']="CONCAT(history,'Notes ".date('Y-m-d H:i:s')." ".$HTTP_SESSION_VARS['sess_user_name']."\n')";
51 $HTTP_POST_VARS['history']=$img_obj->ConcatHistory("Notes ".date('Y-m-d H:i:s')." ".$HTTP_SESSION_VARS['sess_user_name']."\n");
52 $HTTP_POST_VARS['modify_id']=$HTTP_SESSION_VARS['sess_user_name'];
53 $HTTP_POST_VARS['modify_time']=date('YmdHis');
54 //$img_obj->setDataArray($HTTP_POST_VARS);
55 if($img_obj->updateImageNotes($HTTP_POST_VARS)){
56 header('Location:'.basename(__FILE__
).URL_REDIRECT_APPEND
.'&pn='.$pn.'&nr='.$nr.'&bShowImageJApplet='.$bShowImageJApplet);
61 if($img_data=$img_obj->getImageData($nr)){
62 $image=$img_data->FetchRow();
63 $sImgFileName = $image['nr'].'.'.$image['mime_type'];
64 $picsource=$final_path.$sImgFileName;
69 <?php
html_rtl($lang); ?
>
71 <script language
="javascript">
75 if(d
.notes
.value
=="") return false;
80 <?php
echo setCharSet(); ?
>
82 <body topmargin
=0 marginheight
=0>
83 <form name
="picnotes" method
="post" onSubmit
="return check(this)">
84 <?php
//echo $LDPreview ?>
87 if(file_exists($picsource)){
89 # If java applet class exists, show link
91 if(file_exists($root_path.'modules/fotolab/IJBasicViewer.class') && file_exists($root_path.'modules/fotolab/ij.jar')){
92 echo '<font face=arial><a href="'.basename(__FILE__
).URL_APPEND
.'&pn='.$pn.'&nr='.$nr.'&bShowImageJApplet='.(!$bShowImageJApplet).'">';
93 if($bShowImageJApplet) echo $LDHideJavaApplet;
94 else echo $LDShowJavaApplet;
95 echo '</a> </font>';
98 # If ImageJ applet class exists, show link
100 if(file_exists($root_path.'modules/fotolab/IJApplet.class') && file_exists($root_path.'modules/fotolab/ij.jar')){
101 echo '<font face=arial>
102 <a href="ijapplet_launcher.php'.URL_APPEND
.'&pn='.$pn.'&img='.$sImgFileName.'&bShowImageJApplet='.(!$bShowImageJApplet).'">'.$LDEditWithImageJ.'</a>
107 <table border
=0 cellspacing
=0 cellpadding
=0>
109 <td
><font size
=2 face
=arial color
=maroon
><?php
echo $LDShotDate ?
>:
111 <td
><font size
=2 face
=arial
><?php
echo formatDate2Local($image['shot_date'],$date_format); ?
></td
>
114 <td
><font size
=2 face
=arial color
=maroon
><?php
echo $LDShotNr ?
>:</td
>
115 <td
><font size
=2 face
=arial
><?php
echo $image['shot_nr'] ?
></td
>
119 if(!isset($preview_size)) $preview_size=0;
121 list($w,$h,$t,$wh)=getImageSize($picsource); // get the size of the image
123 if(isset($bShowImageJApplet) && $bShowImageJApplet){
125 # Set appletĀ“s dimensions
127 $iAppletHeight=$h + IMAGEJ_PANEL_HEIGHT
;
129 if($w < IMAGEJ_PANEL_WIDTH_MIN
) $iAppletWidth = IMAGEJ_PANEL_WIDTH_MIN
;
130 else $iAppletWidth = $w;
132 echo '<applet codebase="." code="ij.ImageJApplet.class" archive="ij.jar" width='.$iAppletWidth.' height='.$iAppletHeight.'>
133 <param name=url value='.$picsource.'>
139 if($preview_size) $preview_size=0;
140 else $preview_size=PREVIEW_SIZE
;
146 if($toggle_pic) echo '<a href="'.basename(__FILE__
).URL_APPEND
.'&pn='.$pn.'&nr='.$nr.'&preview_size='.$preview_size.'">';
152 <img src
="<?php echo $picsource; ?>" <?php
if($preview_size) echo 'width="'.$preview_size.'"'; else echo $wh; ?
> border
=0 name
="preview"
155 }elseif(($toggle_pic&&!$preview_size)||
(!$toggle_pic&&$preview_size)){
157 <img src
="<?php echo $picsource; ?>" <?php
if($preview_size) echo 'width="'.$preview_size.'"'; else echo $wh; ?
> border
=0 name
="preview"
161 <img src
="<?php echo $root_path.'main/imgcreator/thumbnail.php?mx='.$preview_size.'&my='.$preview_size.'&imgfile=/'.$fotoserver_localpath.$pn.'/'.$image['nr'].'.'.$image['mime_type'] ?>" border
=0 name
="preview"
167 alt
="<?php if($preview_size) echo $LDTogglePreviewOrig; else echo $LDToggleOrigPreview; ?>"
168 title
="<?php if($preview_size) echo $LDTogglePreviewOrig; else echo $LDToggleOrigPreview; ?>"
173 if($toggle_pic) echo '</a>';
178 if(!empty($image['notes'])){
179 $notes=str_replace('[[','<font size=1 color="#abcdef">',htmlspecialchars($image['notes']));
180 $notes=str_replace(']]','</font>',$notes);
182 <table border
=0 width
="100%" cellspacing
=0 cellpadding
=1 bgcolor
="#abcdef">
185 <table border
=0 width
="100%" cellspacing
=0 cellpadding
=5 bgcolor
="#ffffff">
187 <td
><font size
=2 face
="arial,verdana,helvetica">
188 <?php
echo nl2br($notes); ?
>
198 <textarea name
="notes" cols
=40 rows
=4 wrap
="physical"></textarea
><br
>
199 <input type
="hidden" name
="pn" value
="<?php echo $pn ?>">
200 <input type
="hidden" name
="nr" value
="<?php echo $nr ?>">
201 <input type
="hidden" name
="sid" value
="<?php echo $sid ?>">
202 <input type
="hidden" name
="lang" value
="<?php echo $lang ?>">
203 <input type
="hidden" name
="bShowImageJApplet" value
="<?php echo $bShowImageJApplet ?>">
204 <input type
="hidden" name
="preview_size" value
="<?php if(isset($preview_size)) echo $preview_size ?>">
205 <input type
="hidden" name
="mode" value
="save">
206 <input type
="image" <?php
echo createLDImgSrc($root_path,'savedisc.gif','0'); ?
>>