<?php
    $_SKIP_TITLE_ELEMENT = true;	// skip title. applications print the element.
    include("template/Head.php");
?>
<script language="JavaScript" src="js/init.js"></script>
<script language="JavaScript" src="js/image.js"></script>
<script language="JavaScript" src="js/memo.js"></script>
<?php
// list the photo album
// GetPersonalInfo(&$name,&$mail,&$pswd,&$sbjt);
GetPersonalInfo($name,$mail,$pswd,$sbjt);
if (isset($_GET['mode'])) {
    if ($_GET['mode'] == 'full') $full_mode = 1;
}
else $full_mode = 0;
if (isset($_GET['tid']) && isset($_GET['did'])) {
    $tid = (int)$_GET['tid'];
    $did = (int)$_GET['did'];

	echo "<script src=\"/js/keyword-popup.js\" type=\"text/javascript\"></script>\n";
	echo "<div id='keyword_layer' style='position:absolute;z-index:20'></div>\n";

    echo "<table width=800 border=0><tr><td align=right>";
    echo "<a href='delete.php?tid=".$tid."&did=".$did."' onClick=\"javascript:term(); return confirm('Do you really want to delete this picture?');\" onMouseOver=\"window.status=('Delete this photo.'); return true;\" onMouseOut=\"window.status=(''); return true;\" onfocus='this.blur()'><img src='icon/delete.gif' hsrc='icon/delete_h.gif' border=0 alt='Delete'></a>\n";
    if ($_kr) $lang_tag = '&lang=kr';
    else $lang_tag = '';
    echo "<a href='modify.php?tid=".$tid."&did=".$did.$lang_tag."' onClick=\"javascript:term();\" onMouseOver=\"window.status=('Modify.'); return true;\" onMouseOut=\"window.status=(''); return true;\" onfocus='this.blur()'><img src='icon/modify.gif' hsrc='icon/modify_h.gif' border=0 alt='Modify'></a>\n";
    echo "&nbsp; &nbsp; </td></tr></table>\n";

	if ($tid == 6 || $tid == 7 || $tid == 8)
		$cmd = 'bin/apa.web_image '.$tid.' '.$did.' '.$full_mode.' '.$_kr;
	else
		$cmd = 'bin/apa.get_document '.$tid.' '.$did.' '.$full_mode.' '.$_kr;
    passthru($cmd);

}
else {
/*
    $locHead = "LOCATION: list.php";
    if ($_kr) $locHead = $locHead."&lang=kr";
    header($locHead);
*/
    echo "<script>document.location.href='/';</script>\n";
    exit(0);
}
?>
<!-- facebook comments begin -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/ko_KR/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<table border=0 cellspacing=1 cellpadding=2 width=800>
<tr><td width=100 align=center class=form_text bgcolor='#f0f0f0'><b></b></td>
<td width=3></td>
<TD>
<div class="fb-comments" data-href="<?php echo '/view.php?tid='.$tid.'&did='.$did; ?>" data-num-posts="3" data-width="680"></div>
</TD></TR></TABLE>
<!-- facebook comments ends -->

<!-- Copyright Tail -->
<table cellpadding=5 border=0 width=800>
<tr>
<td width=100 align=center class=form_text bgcolor='#f0f0f0'><b>
<?php
    if ($_kr) echo "저작권 정보";
	else echo "Copyright Info";
?>
</b></td>
<td width=700 class=read_detail><font color=#AA3339>
<?php
    if ($_kr) {
		echo "사진의 저작권은 원저작자에게 있습니다.";
		echo " 동물그림창고는 동물관련 사진을 전시할 수 있는 ";
		echo "공간만을 제공합니다.";
		echo "사진을 사용하고자 할 경우에는 저작권자와 협의하시기 바랍니다.";
	}
	else {
		echo "AnimmalPicturesArchive.com does not have the copyright for this image.";
		echo " This photograph or artwork is copyright by the photographer or the original artist.";
		echo " If you are to use this photograph, please contact the copyright owner or the poster.";
	}
?>
</font>
</td>
<td align=right bgcolor=black>

<!--Google Search for animal web pages-->
<TABLE border=0><TR>
<form action="http://www.google.com/cse" id="cse-search-box">
  <div>
  <TD ALIGN=RIGHT>
  <input type="hidden" name="cx" value="partner-pub-8155877059829995:rs87or-x478" />
  <input type="hidden" name="ie" value="UTF-8" />
  <input type="text" name="q" size="25" />
  <input type="submit" name="sa" value="Search" />
  <br><font class=fo_txt color=white>Search Major Animal Websites</font>
</TD>
  </div>
</form>
</TR></TABLE>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
<!--End Google Search for animal web pages-->

</td>
</tr>
</table>

<!-- Comment Tail -->
<table cellpadding=5 border=0 width=796 bgcolor=#F0F0F0>
<form name='memo' action='memo.php' method='post'>
<input type=hidden name=tid value="<?php echo $tid ?>">
<input type=hidden name=did value="<?php echo $did ?>">
<tr><td class=form_text rowspan=4>
<?php
    if ($_kr) {
	echo '동정이 잘못되었거나 남기고 싶은 말이 있으면 여기에 남겨주세요.';
    }
    else {
	echo 'Misidentified?<br>';
	echo 'Need further identification?<br>';
	echo 'Any comment?<br>';
	echo 'Leave your message here.';
    }
?>

</td></tr>
<tr height='45'>
<?php
if (strlen($name) <= 0) $name='@@@@@@@@';
if (strlen($mail) <= 0) $mail='***@***.***';
?>

<td align=right><font class=list_subject><?php if ($_kr) echo "이름"; else echo 'Name'; ?> : </font><input type=text name=NAME maxlength=30 size=20 value="<?php echo $name ?>" class=fo_txt onFocus="if(this.value=='your-name')this.value='';">
&nbsp;&nbsp;&nbsp;<font class=list_subject><?php if ($_kr) echo "암호"; else echo 'PASSWORD'; ?> : </font><input type=password name=PSWD maxlength=8 size=8 value="<?php echo $pswd ?>" class=fo_txt>
<br><font class=list_subject><?php if ($_kr) echo "메일주소"; else echo 'Email'; ?> : </font><input type=text name=MAIL size=47 value="<?php echo $mail ?>" class=fo_txt onFocus="if(this.value=='***@***.***')this.value='';"></td>
</tr>
<tr>
<td class=read_memo_name height=30 align=right><textarea name=CMMT cols=88 rows=5 class=fo_txt_area autoscroll colspan=2 onFocus="if(this.value=='Leave a message here')this.value='';">Leave a message here</textarea></td>
</tr>
<tr>
<?php if ($_kr) echo '<input type=hidden name=lang value=kr>'; ?>
<td height=30 align=right><input type=submit value=Comment onClick="return memo_submit_check();" class=fo_memo_btn> &nbsp;</td>
</tr>
</form>
</table>



<?php include("template/tail.php"); ?>
</body>
</html>

<HEAD>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</HEAD>
</html>
