| Server IP : 180.180.241.3 / Your IP : 216.73.216.25 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/umedia3/ |
Upload File : |
<?
$is_annotation=library_gotpermission("metadata-annotation");
if ($is_annotation!=true) {
die;
}
if ($issave=="yes") {
$now=time();
$text=addslashes($text);
tmq("insert into media_ftitems_anno set
x1='$x1' ,
y1='$y1' ,
x2='$x2' ,
y2='$y2' ,
width='$width' ,
height='$height' ,
text='$text' ,
useradminid='$useradminid' ,
dt='$now' ,
ftid='$viewsinglefile' ,
mid='$mid'
",false);
}
?>
<script type="text/javascript" src="./js/jquery-1.2.2.pack.js"></script>
<script type="text/javascript" src="./js/animatedcollapse.js">
/***********************************************
* Animated Collapsible DIV v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
<script type="text/javascript">
animatedcollapse.addDiv('exifinfo', 'fade=1')
animatedcollapse.addDiv('bibrating', 'fade=1')
animatedcollapse.addDiv('fullbibinfo', 'fade=1')
animatedcollapse.init()
</script>
<?php
$midname=stripslashes(marc_gettitle($mid));
$fullname=$midname;
if (strlen($midname)>50) {
$midname=substr($midname,0,47)."..";
}
$addlink[]="index.php?mode=viewrecord&mid=$mid::".stripslashes($midname);
/////////////////////////////////////////////////////////////////////////////////////////////////
?><?
$anno=tmq("select * from media_ftitems where id='$viewsinglefile' and mid='$mid' and cachecate='images' ");
$anno=tmq_fetch_array($anno);
$annooame=stripslashes($anno[text]);
$mediapath=get_fturl($anno);
//printr($anno);
if ($viewsinglefile=="" && count($viewbytypecode)==0) {
include("index.mediabox.php");
}
if ($viewsinglefile=="" && $viewmode=="") {
?><BR><?
echo html_getbymid($mid);
} else {
}
index_sepper(getlang("รายการ Annotation"));
//dsp
$dsp[3][text]="Text::l::Text";
$dsp[3][field]="text";
$dsp[3][width]="30%";
$dsp[10][text]="วันที่เพิ่ม";
$dsp[10][field]="dt";
$dsp[10][filter]="date";
$dsp[10][width]="30%";
$dsp[11][text]="ผู้เพิ่ม";
$dsp[11][field]="useradminid";
$dsp[11][filter]="foreign:$dbname,library,UserAdminID,UserAdminName";
$dsp[11][width]="30%";
$tbname="media_ftitems_anno";
$o[tablewidth]="100%";
fixform_tablelister($tbname," ftid='$viewsinglefile' and mid='$mid' ",$dsp,"no","no","yes","mid=$mid&mode=$mode&viewsinglefile=$viewsinglefile",$c,"",$o);
echo "<BR>";
if ($displayannotationform=="yes") {
index_sepper("Annotation:".$annooame);
?>
<SCRIPT LANGUAGE="JavaScript">
<!--
pic1= new Image(100,25);
pic1.src="<? echo $mediapath;?>";
//-->
</SCRIPT>
<script src="<? echo $dcrURL?>js/cropper/lib/prototype.js" type="text/javascript"></script>
<script src="<? echo $dcrURL?>js/cropper/lib/scriptaculous.js?load=builder,dragdrop" type="text/javascript"></script>
<script src="<? echo $dcrURL?>js/cropper/cropper.js" type="text/javascript"></script>
<TABLE width=100%><FORM METHOD=POST ACTION="index.php">
<TR>
<TD class=alpha70>
<input type="hidden" name="issave" id="issave" value="yes" />
<input type="hidden" name="mid" id="mid" value="<? echo $mid;?>" />
<input type="hidden" name="viewsinglefile" id="viewsinglefile" value="<? echo $viewsinglefile;?>" />
<input type="hidden" name="mode" id="mode" value="<? echo $mode;?>" />
ข้อความ <INPUT TYPE="text" NAME="text" size=70 value="กรุณาใส่ข้อความที่นี่" onfocus="this.select();">
<input type="hidden" name="x1" id="x1" />
<input type="hidden" name="y1" id="y1" />
<input type="hidden" name="x2" id="x2" />
<input type="hidden" name="y2" id="y2" />
<input type="hidden" name="width" id="width" />
<input type="hidden" name="height" id="height" />
<INPUT TYPE="submit" value=" บันทึก ">
<INPUT TYPE="reset" value=" กลับ " style="color:red;" onclick="self.location='index.php?mode=viewrecord&mid=<? echo $mid; ?>&viewsinglefile=<? echo $viewsinglefile; ?>'">
</TD>
</TR>
<TR>
<TD></TD>
</TR>
</FORM>
</TABLE>
<?
$currentimagesize = getimagesize("$dcrURL/_fulltext/$mid/".$anno[filename]);
//printr($currentimagesize);
?>
<style type="text/css">
#testWrap {
margin: 10px 0 0 10px;
/* Just while testing, to make sure we return the correct positions for the image & not the window */
}
</style>
<!-- <link rel="stylesheet" type="text/css" href="debug.css" media="all" /> -->
<script type="text/javascript" charset="utf-8">
function onEndCrop( coords, dimensions ) {
$( 'x1' ).value = coords.x1;
$( 'y1' ).value = coords.y1;
$( 'x2' ).value = coords.x2;
$( 'y2' ).value = coords.y2;
$( 'width' ).value = dimensions.width;
$( 'height' ).value = dimensions.height;
}
// example with minimum dimensions
/*
Event.observe(
window,
'load',
function() {
new Cropper.Img(
'annotatineimage',
{
maxWidth: 200,
maxHeight: 200,
minWidth: 64,
minHeight: 64,
displayOnInit: true,
onEndCrop: onEndCrop
}
)
}
);
*/
/*
if( typeof(dump) != 'function' ) {
Debug.init(true, '/');
function dump( msg ) {
// Debug.raise( msg );
};
} else dump( '---------------------------------------\n' );
*/
Event.observe(
window,
'load',
function() {
new Cropper.Img(
'annotatineimage',
{
maxWidth: 200,
maxHeight: 200,
minWidth: 64,
minHeight: 64,
onEndCrop: onEndCrop
}
)
}
);
//alert(s);
</script>
<div id="testWrap">
<img src="<? echo $mediapath;?>" border=3 bordercolor=999999
ID="annotatineimage" width="<? echo $currentimagesize[0]?>" height="<? echo $currentimagesize[1]?>" />
</div>
<?
//ob_flush();
//flush();
//sleep(1);
?>
<?
} else {
?><TABLE align=center>
<FORM METHOD=POST ACTION="index.php">
<INPUT TYPE="hidden" NAME="mode" value="<? echo $mode?>">
<INPUT TYPE="hidden" NAME="displayannotationform" value="yes">
<INPUT TYPE="hidden" NAME="mid" value="<? echo $mid?>">
<INPUT TYPE="hidden" NAME="viewsinglefile" value="<? echo $viewsinglefile?>">
<TR>
<TD><INPUT TYPE="submit" value=" เพิ่มรายการใหม่ "> <INPUT TYPE="reset" value=" กลับ " style="color:red;" onclick="self.location='index.php?mode=viewrecord&mid=<? echo $mid; ?>&viewsinglefile=<? echo $viewsinglefile; ?>'">
</TD>
</TR>
</FORM>
</TABLE><?
}
index_reindex($mid);?>