<?
include_once('./_common.php');

if(!$member['mb_id']) alert_close('회원만 이용하실 수 있습니다.');

// 설정 저장-------------------------------------------------------
if ($w == "u") mb_photo_upload($member['mb_id'], $del_mb_icon2, $_FILES); //Save
//--------------------------------------------------------------------

$g4['title'] = "내사진 등록/수정하기";

include_once(G4_PATH.'/head.sub.php');

include_once(AMINA_PATH.'/css.php');

?>

<style>
	body { padding:0px; margin:0px; background:#fff; }
	h2 { display:block; margin:0px; padding:15px; background:#000;font:bold 18px tahoma; color:gold; }
	p img { border:6px solid #efefef;}
	.photo_upload { padding:10px 20px; text-align:center; line-height:1.8;}
	.photo_save { cursor:pointer; padding:8px 20px; background:red; font-weight:bold; color:#ffffff; border:0px; cursor:pointer; }
</style>

<h2>My Photo</h2>


<form name="fphotoform" method="post" action="./mb.photo.php" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="w" value="u">

<div class="photo_upload">
	<p><?=mb_photo('', $member['mb_id'], $xp['photo_size'], $xp['photo_size'])?></p>

	<p>
	회원사진은 이미지(gif/jpg/png) 파일만 가능하며, 등록시 <?=$xp['photo_size']?>x<?=$xp['photo_size']?> 사이즈로 자동 리사이즈됩니다.
		<? if($xp['animated_gif_photo']) { ?>
			(움직이는 GIF 등록가능. 단, 리사이즈 안됨)
		<? } else { ?>
			(단, 움직이는 GIF 등록불가)
		<? } ?>
	</p>

	<p><input type=file name='mb_icon2'></p>
	<? if (file_exists(G4_DATA_PATH.'/mb_photo/'.$member['mb_id'])) echo '<p><label><input type="checkbox" name="del_mb_icon2" value="1"> 회원사진 삭제</label></p>'; ?>

	<p><input type="submit" accesskey="s" value="저장하기" class="photo_save"></p>
</div>
</form>

<script>
$(function() {
    var sw = screen.width;
    var sh = screen.height;
    var cw = document.body.clientWidth;
    var ch = document.body.clientHeight;
    var top  = sh / 2 - ch / 2 - 100;
    var left = sw / 2 - cw / 2;
    moveTo(left, top);
});
</script>

<? include_once(G4_PATH.'/tail.sub.php'); ?>
