This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,295 @@
<?php
$S = 0;
$N = 0;
if ($files)
{
$d['mediaset'] = getArrayString($files);
foreach($d['mediaset']['data'] as $_val)
{
$U = getUidData($table['s_upload'],$_val);
if ($U['uid'])
{
$S+= $U['size'];
$N++;
}
}
}
$P = array();
if (!$_SESSION['upsescode'])
{
$_SESSION['upsescode'] = str_replace('.','',$g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if ($sescode)
{
$PHOTOS = getDbArray($table['s_upload'],"tmpcode='".$sescode."' and fileonly=1",'*','pid','asc',0,0);
while($R = db_fetch_array($PHOTOS))
{
$P[] = $R;
$S += $R['size'];
$N++;
}
}
$d['mediaset']['limitnum'] = $d['mediaset']['maxnum_img'];
$d['mediaset']['limitsize'] = $d['mediaset']['maxsize_img'];
$d['mediaset']['limitsize'] = $d['mediaset']['limitsize'] * 1024 * 1024;
$LimitNum = $d['mediaset']['limitnum'] - $N;
$LimitSize= $d['mediaset']['limitsize'] - $S;
$gparamExp= explode('|',$gparam);
if ($tab == 'file_info')
{
if (!$file_uid)
{
$file_uid = $P[0]['uid'];
$_R = $P[0];
}
else {
$_R = getUidData($table['s_upload'],$file_uid);
}
}
?>
<?php getImport('bootstrap-select','bootstrap-select',false,'css')?>
<?php getImport('bootstrap-select','bootstrap-select',false,'js')?>
<form name="_upload_form_" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="upload">
<input type="hidden" name="saveDir" value="<?php echo $g['path_file']?>">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="fileonly" value="Y">
<input name="upfiles[]" type="file" multiple="true" accept="image/*" id="filefiled" class="hidden" onchange="getFiles();" />
</form>
<iframe name="_upload_iframe_" width="1" height="1" frameborder="0" scrolling="no"></iframe>
<div id="photobox">
<div id="progressBar" class="progress progress-striped active">
<div id="progressPer" class="progress-bar progress-bar-danger" role="progressbar"></div>
</div>
<div class="photo-box">
<?php if($N):?>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/core.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/events.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/css.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/coordinates.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/drag.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/dragsort.js"></script>
<script>
var dragsort = ToolMan.dragsort();
function slideshowOpen()
{
dragsort.makeListSortable(getId("photoorder"));
}
window.onload = slideshowOpen;
</script>
<form name="photolistForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="">
<ul id="photoorder">
<?php foreach($P as $val):?>
<li<?php if($file_uid==$val['uid']):?> class="selected"<?php endif?>>
<table>
<tr>
<td width="30"><input type="checkbox" class="rb-photo-check" name="photomembers[]" value="<?php echo $val['uid']?>|<?php echo $val['url'].$val['folder'].'/'.$val['tmpname']?>|<?php echo $val['name']?>|"></td>
<td width="30"><img src="<?php echo $g['img_core']?>/file/small/<?php echo $val['ext']?>.gif" alt=""></td>
<td><?php echo $val['name']?></td>
<td width="100" style="color:#c0c0c0;font-family:arial;font-size:11px;"><?php echo $val['ext']?></td>
<td width="100" style="color:#c0c0c0;font-family:arial;font-size:11px;text-align:center;"><?php echo getSizeFormat($val['size'],1)?></td>
</tr>
</table>
</li>
<?php endforeach?>
</ul>
</form>
<?php else:?>
<div class="none">
<!--div class="ment">
<span><?php echo getSizeFormat($d['mediaset']['limitsize'],0)?>,<?php echo $d['mediaset']['limitnum']?>개</span>까지 올릴 수 있습니다.
<br>
<button type="button" class="btn btn-default" onclick="getId('filefiled').click();">사진추가</button>
</div-->
</div>
<?php endif?>
</div>
</div>
<!----------------------------------------------------------------------------
@부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴
----------------------------------------------------------------------------->
<div id="_modal_header" class="hidden">
<button type="button" class="close rb-close-white" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title"><i class="fa fa-picture-o fa-lg"></i> 파일올리기</h4>
</div>
<div id="_modal_footer" class="hidden">
<button type="button" class="btn btn-primary pull-left" onclick="frames._modal_iframe_modal_window.getId('filefiled').click();">파일추가</button>
<?php if($N>1):?>
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.orderCheck();">순서변경</button>
<?php endif?>
<?php if($N):?>
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.deleteCheck(1);">선택삭제</button>
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.deleteCheck(2);">전체삭제</button>
<?php endif?>
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">닫기</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">첨부</button>
</div>
<script language="javascript">
function getFiles()
{
for (var i = 0; i < parent.getId('_modal_footer_modal_window').children.length; i++)
{
parent.getId('_modal_footer_modal_window').children[i].disabled = true;
}
getId('progressBar').style.display = 'block';
var f = document._upload_form_;
f.submit();
}
function gridProgress()
{
setTimeout("location.reload();",1000);
}
function deleteCheck(x)
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
for (i = 0; i < n; i++)
{
if (x == 2) l[i].checked = true;
if (l[i].checked == true)
{
j++;
}
}
if (!j)
{
alert('삭제할 사진을 선택해 주세요.');
return false;
}
if (confirm('정말로 삭제하시겠습니까?'))
{
f.a.value = 'files_delete_file';
f.submit();
}
return false;
}
function orderCheck()
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
if (confirm('정말로 변경하시겠습니까?'))
{
for (i = 0; i < n; i++)
{
l[i].checked = true;
}
f.a.value = 'files_order';
f.submit();
}
return false;
}
function infoCheck()
{
var f = document.captionForm;
f.submit();
}
function photoCheck(uid)
{
getId('captioncontent').value = getId('caption_'+uid).innerHTML;
}
function modalSetting()
{
//parent.getId('modal_window_dialog_modal_window').style.width = (parent.innerWidth-100)+'px'; //모달창 가로폭
parent.getId('_modal_iframe_modal_window').style.height = '450px'; //높이(px)
/*
parent.getId('modal_window_dialog_modal_window').style.position = 'absolute';
parent.getId('modal_window_dialog_modal_window').style.display = 'block';
parent.getId('modal_window_dialog_modal_window').style.width = '97%';
parent.getId('modal_window_dialog_modal_window').style.top = '0';
parent.getId('modal_window_dialog_modal_window').style.left = '0';
parent.getId('modal_window_dialog_modal_window').style.right = '0';
parent.getId('modal_window_dialog_modal_window').style.bottom = '0';
parent.getId('modal_window_dialog_modal_window').children[0].style.height = '100%';
*/
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
parent.getId('_modal_header_modal_window').className = 'modal-header';
parent.getId('_modal_header_modal_window').style.background = '#3F424B';
parent.getId('_modal_header_modal_window').style.color = '#fff';
/*
parent.getId('_modal_body_modal_window').style.position = 'absolute';
parent.getId('_modal_body_modal_window').style.display = 'block';
parent.getId('_modal_body_modal_window').style.paddingRight = '2px';
parent.getId('_modal_body_modal_window').style.top = '50px';
parent.getId('_modal_body_modal_window').style.left = '0';
parent.getId('_modal_body_modal_window').style.right = '0';
parent.getId('_modal_body_modal_window').style.bottom = '15px';
*/
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
/*
parent.getId('_modal_footer_modal_window').style.position = 'absolute';
parent.getId('_modal_footer_modal_window').style.background = '#fff';
parent.getId('_modal_footer_modal_window').style.width = '100%';
parent.getId('_modal_footer_modal_window').style.bottom = '0';
parent.getId('_modal_iframe_modal_window').style.overflow = 'hidden';
parent.getId('_modal_iframe_modal_window').scrolling = 'no';
*/
}
modalSetting();
$('.selectpicker').selectpicker();
</script>
<!----------------------------------------------------------------------------
//부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴
----------------------------------------------------------------------------->
<style>
#photobox {position:absolute;display:block;top:0;left:0;bottom:0;right:0px;overflow:hidden;height:450px;}
#photobox .photo-box {position:absolute;display:block;top:22px;left:0;bottom:0;right:0;overflow-x:hidden;overflow-y:auto;}
#photoorder {padding:0;border-top:#efefef solid 1px;}
#photoorder .rb-photo-check {}
#photoorder li {list-style-type:none;}
#photoorder li table {width:100%;border-bottom:#efefef solid 1px;}
#progressBar {display:none;margin-right:15px;}
#progressPer {}
</style>

View File

@@ -0,0 +1,657 @@
<?php
$S = 0;
$N = 0;
if ($files)
{
$d['mediaset'] = getArrayString($files);
foreach($d['mediaset']['data'] as $_val)
{
$U = getUidData($table['s_upload'],$_val);
if ($U['uid'])
{
$S+= $U['size'];
$N++;
}
}
}
$P = array();
if (!$_SESSION['upsescode'])
{
$_SESSION['upsescode'] = str_replace('.','',$g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if ($sescode)
{
$PHOTOS = getDbArray($table['s_upload'],"tmpcode='".$sescode."' and (type=-1 or type=2) and fileonly=0",'*','pid','asc',0,0);
while($R = db_fetch_array($PHOTOS))
{
$P[] = $R;
$S += $R['size'];
$N++;
}
}
$d['mediaset']['limitnum'] = $d['mediaset']['maxnum_img'];
$d['mediaset']['limitsize'] = $d['mediaset']['maxsize_img'];
$d['mediaset']['limitsize'] = $d['mediaset']['limitsize'] * 1024 * 1024;
$LimitNum = $d['mediaset']['limitnum'] - $N;
$LimitSize= $d['mediaset']['limitsize'] - $S;
$gparamExp= explode('|',$gparam);
if ($tab == 'file_info')
{
if (!$file_uid)
{
$file_uid = $P[0]['uid'];
$_R = $P[0];
}
else {
$_R = getUidData($table['s_upload'],$file_uid);
}
}
$g['base_href'] = $g['s'].'/?r='.$r.'&amp;m='.$m.'&amp;iframe=Y&amp;mdfile='.$mdfile.'&amp;dropfield='.$dropfield.'&amp;dropfiles='.$dropfiles;
?>
<?php getImport('bootstrap-select','bootstrap-select',false,'css')?>
<?php getImport('bootstrap-select','bootstrap-select',false,'js')?>
<form name="_upload_form_" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>" />
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="upload">
<input type="hidden" name="saveDir" value="<?php echo $g['path_file']?>">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="category" value="0">
<input name="upfiles[]" type="file" multiple="true" accept="image/*" id="filefiled" class="hidden" onchange="getFiles();" />
</form>
<iframe name="_upload_iframe_" width="1" height="1" frameborder="0" scrolling="no"></iframe>
<div id="photobox">
<div id="progressBar" class="progress progress-striped active">
<div id="progressPer" class="progress-bar progress-bar-danger" role="progressbar"></div>
</div>
<div class="photo-box">
<?php if($N):?>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/core.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/events.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/css.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/coordinates.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/drag.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/dragsort.js"></script>
<script>
var dragsort = ToolMan.dragsort();
function slideshowOpen()
{
dragsort.makeListSortable(getId("photoorder"));
}
window.onload = slideshowOpen;
</script>
<form name="photolistForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="">
<ul id="photoorder">
<?php foreach($P as $val):$val['xurl']=$val['type']>0?(($g['s']=='/'?$g['s']:$g['s'].'/').'files/'.$val['folder'].'/'.$val['tmpname']):$val['src']?>
<li<?php if($file_uid==$val['uid']):?> class="selected"<?php endif?> ondblclick="location.href='<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info';">
<input type="checkbox" class="rb-photo-check" name="photomembers[]" value="<?php echo $val['uid']?>|<?php echo $val['xurl']?>|<?php echo $val['name']?>|<?php echo $val['linkto']?>|" onclick="photoCheck(<?php echo $val['uid']?>);">
<span id="caption_<?php echo $val['uid']?>" class="hidden"><?php echo htmlspecialchars($val['caption'])?></span>
<?php if($val['type']>0):?>
<div title="<?php echo $val['name']?> (<?php echo getSizeFormat($val['size'],1)?>/<?php echo $val['width']?>*<?php echo $val['height']?>px)" class="photo" style="background:url('<?php echo $val['url'].$val['folder'].'/'.$val['thumbname']?>') center center no-repeat;" data-tooltip="tooltip"></div>
<?php else:?>
<div title="<?php echo $val['name']?> (외부링크)" class="photo" data-tooltip="tooltip"><img src="<?php echo $val['src']?>" width="100%" height="100%"></div>
<?php endif?>
<div class="btn-group">
<button class="btn btn-default btn-xs" type="button" title="형식:<?php if($val['type']>0):?>내부사진<?php else:?>외부링크<?php endif?>" data-tooltip="tooltip">
<i class="<?php if($val['type']>0):?>glyphicon glyphicon-cloud-upload<?php else:?>fa fa-link<?php endif?> fa-lg"></i>
</button>
<button class="btn btn-default btn-xs" type="button" title="수정" data-tooltip="tooltip" onclick="location.href='<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info';">
<i class="fa fa-edit fa-lg"></i>
</button>
<button class="btn btn-default btn-xs" type="button" title="보기" data-tooltip="tooltip" onclick="window.open('<?php echo $val['type']<0?$val['src']:$val['url'].$val['folder'].'/'.$val['tmpname']?>');">
<i class="fa fa-external-link fa-lg"></i>
</button>
<button class="btn btn-default btn-xs" type="button" title="삭제" data-tooltip="tooltip" onclick="deleteCheck(0,<?php echo $val['uid']?>);">
<i class="fa fa-trash-o fa-lg"></i>
</button>
</div>
</li>
<?php endforeach?>
</ul>
</form>
<?php else:?>
<div class="alert alert-success">
<span class="glyphicon glyphicon-info-sign"></span>
첨부할 사진을 선택해 주세요.
<button type="button" class="btn btn-default" onclick="getId('filefiled').click();">PC사진 업로드</button>
<button type="button" class="btn btn-default" onclick="picAdd();">외부사진 링크</button>
</div>
<?php endif?>
</div>
</div>
<?php if($N || $outlink == 'Y'):?>
<div id="infobox">
<?php if($outlink=='Y'):?>
<ul class="nav nav-tabs">
<li class="active"><a href="#">외부사진 추가</a></li>
</ul>
<div class="infobox-body">
<div class="pic-info1">
<div id="_pic_play_layer_" class="media-pic">
</div>
<form name="_upload_form1_" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="upload">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="link" value="Y">
<input type="hidden" name="category" value="0">
<div class="panel-body">
<div class="form-group">
<label>이미지주소 (URL)</label>
<textarea name="src" id="_pic_embed_code_" class="form-control" rows="4"><?php echo $_R['src']?></textarea>
</div>
</div>
</form>
</div>
<div class="pic-submit1">
<div class="text-center">
<button type="button" class="btn btn-default" onclick="getPicPreview();" style="margin-bottom:3px;">이미지 불러오기</button>
<button type="button" class="btn btn-primary" onclick="getPicSave();">이미지 저장하기</button>
</div>
</div>
</div>
<?php else:?>
<ul class="nav nav-tabs">
<li<?php if($file_uid):?> class="active"<?php endif?>><a href="<?php echo $g['base_href']?>&amp;file_uid=<?php echo $file_uid?>&amp;tab=file_info">사진정보</a></li>
<li<?php if(!$file_uid):?> class="active"<?php endif?>><a href="<?php echo $g['base_href']?>">삽입하기</a></li>
</ul>
<?php if($tab == 'file_info'):?>
<div class="infobox-body">
<div class="pic-info">
<div class="media-pic">
<img alt="<?php echo $_R['name']?>" class="img-rounded img-responsive" src="<?php echo $_R['type']>0?$_R['url'].$_R['folder'].'/'.$_R['tmpname']:$_R['src']?>" width="100%">
</div>
<form name="captionForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="caption_regis">
<input type="hidden" name="uid" value="<?php echo $_R['uid']?>">
<div class="panel-body">
<div class="form-group">
<label>File Name</label>
<input type="text" class="form-control" name="name" value="<?php echo substr($_R['name'],0,strlen($_R['name'])-strlen($_R['ext'])-1)?>">
</div>
<div class="form-group">
<label>Alt Text</label>
<input type="text" class="form-control" name="alt" value="<?php echo $_R['alt']?>">
</div>
<?php if($_R['type']<0):?>
<div class="form-group">
<label>Image Url</label>
<textarea class="form-control" name="src" rows="3"><?php echo $_R['src']?></textarea>
</div>
<?php endif?>
<div class="form-group">
<label>Caption</label>
<textarea class="form-control" name="caption" rows="3"><?php echo $_R['caption']?></textarea>
</div>
<div class="form-group">
<label>Description</label>
<textarea class="form-control" name="description" rows="3"><?php echo $_R['description']?></textarea>
</div>
<div class="form-group">
<label>Display Download</label>
<select name="hidden" class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-default" data-size="auto">
<option value="0"<?php if(!$_R['hidden']):?> selected<?php endif?>>YES</option>
<option value="1"<?php if($_R['hidden']):?> selected<?php endif?>>NO</option>
</select>
</div>
<div class="form-group">
<label>Link To</label>
<select name="linkto" class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-default" data-size="auto">
<option value="0"<?php if(!$_R['linkto']):?> selected<?php endif?>>링크없음</option>
<option value="1"<?php if($_R['linkto']==1):?> selected<?php endif?>>일반사진</option>
<option value="2"<?php if($_R['linkto']==2):?> selected<?php endif?>>라이트박스</option>
<option value="3"<?php if($_R['linkto']==3):?> selected<?php endif?>>미디어링크</option>
</select>
</div>
<div class="form-group">
<label class="control-label">License</label>
<select name="license" class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-default" data-size="auto">
<option value="0"<?php if($_R['license']==0):?> selected<?php endif?>>None (All rights reserved)</option>
<option value="1"<?php if($_R['license']==1):?> selected<?php endif?>>저작자표시-비영리-동일조건변경허락 Creative Commons</option>
<option value="2"<?php if($_R['license']==2):?> selected<?php endif?>>저작자표시-비영리 Creative Commons</option>
<option value="3"<?php if($_R['license']==3):?> selected<?php endif?>>저작자표시-비영리-변경금지 Creative Commons</option>
<option value="4"<?php if($_R['license']==4):?> selected<?php endif?>>저작자표시 Creative Commons</option>
<option value="5"<?php if($_R['license']==5):?> selected<?php endif?>>저작자표시-동일조건변경허락 Creative Commons</option>
<option value="6"<?php if($_R['license']==6):?> selected<?php endif?>>저작자표시-변경금지 Creative Commons</option>
</select>
</div>
<div class="form-group">
<label>Category</label>
<select name="category" class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-default" data-size="auto">
<?php $_CT_RCD = getDbArray($table['s_uploadcat'],'mbruid='.$my['uid']." and type=1 and name<>'none' and name<>'trash'",'*','gid','asc',0,1)?>
<option value="0"<?php if($_R['category']==0):?> selected<?php endif?>>미분류</option>
<?php while($_CT=db_fetch_array($_CT_RCD)):?>
<option value="<?php echo $_CT['uid']?>"<?php if($_R['category']==$_CT['uid']):?> selected<?php endif?>><?php echo $_CT['name']?>(<?php echo number_format($_CT['r_num'])?>)</option>
<?php endwhile?>
<option value="-1"<?php if($_R['category']==-1):?> selected<?php endif?>>휴지통</option>
</select>
</div>
<div class="form-group">
<label>파일정보</label>
<?php if($_R['type']>0):?>
<ul class="list-unstyled photo-info">
<li class="text-muted">등록일시 : <?php echo getDateFormat($_R['d_update']?$_R['d_update']:$_R['d_regis'],'Y.m.d H:i')?></li>
<li class="text-muted">사진크기 : <?php echo $_R['width']?> × <?php echo $_R['height']?></li>
<li class="text-muted">파일용량 : <?php echo getSizeFormat($_R['size'],1)?></li>
<li class="text-muted">파일종류 : <?php echo $_R['ext']?></li>
</ul>
<?php else:?>
<ul class="list-unstyled photo-info">
<li class="text-muted">등록일시 : <?php echo getDateFormat($_R['d_update']?$_R['d_update']:$_R['d_regis'],'Y.m.d H:i')?></li>
<li class="text-muted">사진출처 : <?php echo getDomain($_R['src'])?></li>
<li class="text-muted">파일종류 : <?php echo $_R['ext']?></li>
</ul>
<?php endif?>
</div>
</div>
</form>
</div>
<div class="pic-submit">
<div class="text-center">
<button type="button" class="btn btn-primary" onclick="infoCheck();">정보수정</button>
</div>
</div>
</div>
<?php else:?>
<div class="layoutbox-body">
<div class="selectbox">
<select class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-default" data-size="auto" onchange="frames._template_iframe_.location.href='<?php echo $g['url_module'].'/lang.'.$_HS['lang']?>/modal/template/'+this.value;">
<option value="photo-base.html">템플릿 선택하기</option>
<option data-divider="true"></option>
<?php $tdir = $g['dir_module'].'lang.'.$_HS['lang'].'/modal/template/'?>
<?php $dirs = opendir($tdir)?>
<?php while(false !== ($skin = readdir($dirs))):?>
<?php if(!strstr($skin,'.html') || !strstr($skin,'photo-') || $skin == 'photo-base.html')continue?>
<option value="<?php echo $skin?>"><?php echo $skin?></option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="iframebox">
<iframe name="_template_iframe_" src="<?php echo $g['dir_module'].'lang.'.$_HS['lang']?>/modal/template/photo-base.html" width="100%" height="100%" frameborder="0"></iframe>
</div>
<div class="optionbox">
<div class="text-center">
<button type="button" class="btn btn-primary" onclick="templateCheck();">삽입하기</button>
</div>
</div>
<?php endif?>
</div>
<?php endif?>
</div>
<?php endif?>
<!----------------------------------------------------------------------------
@부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴
----------------------------------------------------------------------------->
<div id="_modal_header" class="hidden">
<button type="button" class="close rb-close-white" style="position:absolute;right:15px;z-index:1;" data-dismiss="modal" aria-hidden="true">&times;</button>
<ul class="nav nav-tabs" style="position:relative;left:5px;margin-bottom:-20px;z-index:0;">
<li class="active"><a href="#">업로드 패널</a></li>
<li><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;iframe=Y&amp;mdfile=modal.photo.media&amp;dropfield=<?php echo $dropfield?>&amp;dropfiles=<?php echo $dropfiles?>" target="_modal_iframe_modal_window">포토셋</a></li>
</ul>
</div>
<div id="_modal_footer" class="hidden">
<button type="button" class="btn btn-primary pull-left" onclick="frames._modal_iframe_modal_window.getId('filefiled').click();"><i class="fa fa-cloud-upload fa-lg"></i> PC사진</button>
<button type="button" class="btn btn-primary pull-left" onclick="frames._modal_iframe_modal_window.picAdd();"><i class="fa fa-link fa-lg"></i> 외부사진</button>
<?php if($N>1):?>
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.orderCheck();">순서변경</button>
<?php endif?>
<?php if($N):?>
<!--
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.deleteCheck(1,'');">선택삭제</button>
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.deleteCheck(2,'');">전체삭제</button>
-->
<?php endif?>
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">닫기</button>
</div>
<script language="javascript">
var isGetPic = false;
function getPicPreview()
{
if (getId('_pic_embed_code_').value == '' || getId('_pic_embed_code_').value.indexOf('://') == -1)
{
alert('파일의 주소를 입력해주세요. ');
getId('_pic_embed_code_').focus();
return false;
}
getId('_pic_play_layer_').innerHTML = '<img width="90%" src="'+getId('_pic_embed_code_').value+'" style="margin:15px 0 0 15px;">';
isGetPic = true;
}
function getPicSave()
{
if (isGetPic == false)
{
alert('이미지를 불러온 후 저장해 주세요. ');
return false;
}
//if (confirm('정말로 저장하시겠습니까? '))
//{
var f = document._upload_form1_;
f.submit();
//}
return false;
}
function getFiles()
{
for (var i = 0; i < parent.getId('_modal_footer_modal_window').children.length; i++)
{
parent.getId('_modal_footer_modal_window').children[i].disabled = true;
}
getId('progressBar').style.display = 'block';
var f = document._upload_form_;
f.submit();
}
function gridProgress()
{
setTimeout("location.reload();",1000);
}
function picAdd()
{
location.href = '<?php echo $g['base_href']?>&outlink=Y';
}
function deleteCheck(x,uid)
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
var gx;
for (i = 0; i < n; i++)
{
if (x == 0)
{
gx = l[i].value.split('|');
if (uid != parseInt(gx[0])) l[i].checked = false;
else l[i].checked = true;
}
if (x == 2) l[i].checked = true;
if (l[i].checked == true)
{
j++;
}
}
if (!j)
{
alert('삭제할 사진을 선택해 주세요.');
return false;
}
if (confirm('정말로 삭제하시겠습니까?'))
{
f.a.value = 'files_delete';
f.submit();
}
return false;
}
function orderCheck()
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
if (confirm('정말로 변경하시겠습니까?'))
{
for (i = 0; i < n; i++)
{
l[i].checked = true;
}
f.a.value = 'files_order';
f.submit();
}
return false;
}
function infoCheck()
{
var f = document.captionForm;
f.submit();
}
function photoCheck(uid)
{
}
function templateCheck()
{
var ifr = frames._template_iframe_;
if(ifr.select_tpl == '')
{
alert('적용할 템플릿을 선택해 주세요. ');
return false;
}
if (ifr.select_tpl == '__tpl__all')
{
var table = '';
var stable = ifr.document.getElementById(ifr.select_tpl).innerHTML;
var _stable = stable;
var _stable1 = '';
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
for (i = 0; i < n; i++)
{
val = l[i].value.split('|');
_stable = stable.replace('[HREF]',val[1]).replace('[SRC]',val[1]).replace('[ALT]',val[2]).replace('[CAPTION]',getId('caption_'+val[0]).innerHTML);
if (val[3] == '0')
{
_stable = _stable.replace('[A]','').replace('[/A]','');
}
if (val[3] == '1')
{
_stable = _stable.replace('[A]','<a href="'+val[1]+'" title="'+val[2]+'">').replace('[/A]','</a>');
}
if (val[3] == '2')
{
_stable = _stable.replace('[A]','<a href="'+val[1]+'" title="'+val[2]+'" class="data-gallery">').replace('[/A]','</a>');
}
if (val[3] == '3')
{
_stable = _stable.replace('[A]','<a href="'+rooturl+'/photos/'+val[0]+'">').replace('[/A]','</a>');
}
_stable1 += _stable;
}
table = _stable1;
table = table.replace(/\[ROOTURL\]/g,rooturl);
}
else {
var table = ifr.document.getElementById(ifr.select_tpl).innerHTML;
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
var val;
for (i = 0; i < n; i++)
{
if(l[i].checked == true)
{
val = l[i].value.split('|');
table = table.replace('[HREF-'+j+']',val[1]);
table = table.replace('[SRC-'+j+']',val[1]);
table = table.replace('[ALT-'+j+']',val[2]);
table = table.replace('[CAPTION-'+j+']',getId('caption_'+val[0]).innerHTML);
if (val[3] == '0')
{
table = table.replace('[A-'+j+']','').replace('[/A-'+j+']','');
}
if (val[3] == '1')
{
table = table.replace('[A-'+j+']','<a href="'+val[1]+'" title="'+val[2]+'">').replace('[/A-'+j+']','</a>');
}
if (val[3] == '2')
{
table = table.replace('[A-'+j+']','<a href="'+val[1]+'" title="'+val[2]+'" class="data-gallery">').replace('[/A-'+j+']','</a>');
}
if (val[3] == '3')
{
table = table.replace('[A-'+j+']','<a href="'+rooturl+'/photos/'+val[0]+'">').replace('[/A-'+j+']','</a>');
}
j++;
}
}
if(!j)
{
alert('적용할 사진을 선택해 주세요. ');
return false;
}
table = table.replace(/\[ROOTURL\]/g,rooturl);
}
parent.CKEDITOR.instances['ckeditor_textarea'].insertHtml(table);
parent.$('#modal_window').modal('hide');
}
function modalSetting()
{
//parent.getId('modal_window-dialog').style.width = (parent.innerWidth-100)+'px'; //모달창 가로폭
//parent.getId('_modal_iframe_modal_window').style.height = (parent.innerHeight-280)+'px'; //높이(px)
parent.getId('modal_window_dialog_modal_window').style.position = 'absolute';
parent.getId('modal_window_dialog_modal_window').style.display = 'block';
parent.getId('modal_window_dialog_modal_window').style.width = '97%';
parent.getId('modal_window_dialog_modal_window').style.top = '0';
parent.getId('modal_window_dialog_modal_window').style.left = '0';
parent.getId('modal_window_dialog_modal_window').style.right = '0';
parent.getId('modal_window_dialog_modal_window').style.bottom = '0';
parent.getId('modal_window_dialog_modal_window').children[0].style.height = '100%';
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
parent.getId('_modal_header_modal_window').className = 'modal-header';
parent.getId('_modal_header_modal_window').style.height = '57px';
parent.getId('_modal_body_modal_window').style.position = 'absolute';
parent.getId('_modal_body_modal_window').style.display = 'block';
parent.getId('_modal_body_modal_window').style.paddingRight = '2px';
parent.getId('_modal_body_modal_window').style.top = '50px';
parent.getId('_modal_body_modal_window').style.left = '0';
parent.getId('_modal_body_modal_window').style.right = '0';
parent.getId('_modal_body_modal_window').style.bottom = '15px';
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
parent.getId('_modal_footer_modal_window').style.position = 'absolute';
parent.getId('_modal_footer_modal_window').style.background = '#fff';
parent.getId('_modal_footer_modal_window').style.width = '100%';
parent.getId('_modal_footer_modal_window').style.bottom = '0';
parent.getId('_modal_iframe_modal_window').style.overflow = 'hidden';
parent.getId('_modal_iframe_modal_window').scrolling = 'no';
parent.getId('_modal_header_modal_window').style.background = '#3F424B';
parent.getId('_modal_header_modal_window').style.color = '#fff';
}
modalSetting();
$('.selectpicker').selectpicker();
</script>
<!----------------------------------------------------------------------------
//부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴
----------------------------------------------------------------------------->
<style>
<?php $_isIE = strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')||strpos($_SERVER['HTTP_USER_AGENT'],'rv:1')?true:false?>
#photobox {position:absolute;display:block;top:15px;left:0;bottom:0;right:<?php echo $N?290:0?>px;overflow:hidden;}
#photobox .photo-box {position:absolute;display:block;top:42px;left:0;bottom:0;right:0;overflow-x:hidden;overflow-y:auto;}
#photobox .alert {margin-right:<?php echo $outlink=='Y'?'305':'15'?>px;}
#photoorder {padding:0 0 10px 0;}
#photoorder .rb-photo-check {position:absolute;margin-left:5px;}
#photoorder li {float:left;list-style-type:none;border:#dfdfdf solid 3px;padding:0;margin:0 9px 20px 10px;}
#photoorder .selected {border:#FC5F4A solid 3px;}
#photoorder li .photo {width:105px;height:78px;cursor:move;}
#photoorder li .btn-group {display:none;}
#photoorder li:hover .btn-group {display:block;position:absolute;}
#photoorder li:hover .btn-group button {top:-22px;}
#infobox {position:absolute;display:block;width:290px;top:15px;right:0;bottom:0;overflow:hidden;}
#infobox .infobox-body {display:block;width:100%;height:100%;border-left:#dfdfdf solid 1px;overflow:hidden;}
#infobox .infobox-body .pic-info {position:absolute;display:block;width:100%;top:42px;bottom:<?php echo $_isIE?'95px':'55px'?>;overflow-x:hidden;overflow-y:auto;}
#infobox .infobox-body .pic-info img {padding:15px 15px 0 15px;}
#infobox .infobox-body .pic-submit {position:absolute;display:block;width:100%;bottom:<?php echo $_isIE?'40px':'0'?>;border-top:#dfdfdf solid 1px;padding:10px 15px 10px 15px;}
#infobox .infobox-body .pic-info1 {position:absolute;display:block;width:100%;top:42px;bottom:<?php echo $_isIE?'132px':'92px'?>;overflow-x:hidden;overflow-y:auto;}
#infobox .infobox-body .pic-submit1 {position:absolute;display:block;width:100%;bottom:<?php echo $_isIE?'40px':'0'?>;border-top:#dfdfdf solid 1px;padding:10px 15px 10px 15px;}
#infobox .text-center .btn {width:100%;}
#infobox .layoutbox-body {display:block;width:100%;height:100%;border-left:#dfdfdf solid 1px;overflow:hidden;}
#infobox .layoutbox-body .selectbox {position:absolute;display:block;width:100%;left:0;right:0;padding:10px 15px 0 15px;}
#infobox .layoutbox-body .iframebox {position:absolute;display:block;width:100%;top:95px;bottom:<?php echo $_isIE?'105px':'55px'?>;padding:0 0 0 15px;overflow:hidden;border-top:#dfdfdf solid 1px;}
#infobox .layoutbox-body .optionbox {position:absolute;display:block;width:100%;padding:1px 15px 10px 15px;bottom:<?php echo $_isIE?'40px':'0'?>;border-top:#dfdfdf solid 1px;}
#infobox .layoutbox-body .optionbox .text-center {border-top:0; padding-top:10px;padding-bottom:0;}
#progressBar {display:none;margin-right:15px;}
#progressPer {}
</style>

View File

@@ -0,0 +1,618 @@
<?php
function getVodCode($src)
{
$exp1 = explode('youtube.com/embed/',$src);
$exp2 = strstr($exp1[1],'?') ? explode('?',$exp1[1]) : explode('"',$exp1[1]);
return $exp2[0];
}
function getVodThumb($src,$what)
{
return '//img.youtube.com/vi/'.getVodCode($src).'/'.$what.'.jpg';
}
function getVodUrl($src)
{
return '//www.youtube.com/watch?feature=player_detailpage&v='.getVodCode($src);
}
$S = 0;
$N = 0;
if ($files)
{
$d['mediaset'] = getArrayString($files);
foreach($d['mediaset']['data'] as $_val)
{
$U = getUidData($table['s_upload'],$_val);
if ($U['uid'])
{
$S+= $U['size'];
$N++;
}
}
}
$P = array();
if (!$_SESSION['upsescode'])
{
$_SESSION['upsescode'] = str_replace('.','',$g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if ($sescode)
{
$PHOTOS = getDbArray($table['s_upload'],"tmpcode='".$sescode."' and (type=0 or type=5) and fileonly=0",'*','pid','asc',0,0);
while($R = db_fetch_array($PHOTOS))
{
$P[] = $R;
$S += $R['size'];
$N++;
}
}
$d['mediaset']['limitnum'] = $d['mediaset']['maxnum_img'];
$d['mediaset']['limitsize'] = $d['mediaset']['maxsize_img'];
$d['mediaset']['limitsize'] = $d['mediaset']['limitsize'] * 1024 * 1024;
$LimitNum = $d['mediaset']['limitnum'] - $N;
$LimitSize= $d['mediaset']['limitsize'] - $S;
$gparamExp= explode('|',$gparam);
if ($tab == 'file_info')
{
if (!$file_uid)
{
$file_uid = $P[0]['uid'];
$_R = $P[0];
}
else {
$_R = getUidData($table['s_upload'],$file_uid);
}
}
$g['base_href'] = $g['s'].'/?r='.$r.'&amp;m='.$m.'&amp;iframe=Y&amp;mdfile='.$mdfile.'&amp;dropfield='.$dropfield.'&amp;dropfiles='.$dropfiles;
?>
<?php getImport('bootstrap-select','bootstrap-select',false,'css')?>
<?php getImport('bootstrap-select','bootstrap-select',false,'js')?>
<form name="_upload_form_" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="upload_vod">
<input type="hidden" name="saveDir" value="<?php echo $g['path_file']?>">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="category" value="0">
<input name="upfiles[]" type="file" accept="video/mp4" id="filefiled" class="hidden" onchange="getFiles();" />
</form>
<iframe name="_upload_iframe_" width="1" height="1" frameborder="0" scrolling="no"></iframe>
<div id="photobox">
<div id="progressBar" class="progress progress-striped active">
<div id="progressPer" class="progress-bar progress-bar-danger" role="progressbar"></div>
</div>
<div class="photo-box">
<?php if($N):?>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/core.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/events.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/css.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/coordinates.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/drag.js"></script>
<script type="text/javascript" src="<?php echo $g['s']?>/_core/opensrc/tool-man/dragsort.js"></script>
<script>
var dragsort = ToolMan.dragsort();
function slideshowOpen()
{
dragsort.makeListSortable(getId("photoorder"));
}
window.onload = slideshowOpen;
</script>
<form name="photolistForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="">
<ul id="photoorder">
<?php foreach($P as $val):$val['xurl']=($g['s']=='/'?$g['s']:$g['s'].'/').'files/'?>
<li<?php if($file_uid==$val['uid']):?> class="selected"<?php endif?> ondblclick="location.href='<?php echo $g['s']?>/?r=<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info';">
<input type="checkbox" class="rb-photo-check" name="photomembers[]" value="<?php echo $val['uid']?>|<?php echo $val['xurl'].$val['folder'].'/'.$val['tmpname']?>|<?php echo $val['name']?>|" onclick="photoCheck(<?php echo $val['uid']?>);">
<span id="caption_<?php echo $val['uid']?>" class="hidden"><?php echo htmlspecialchars($val['caption'])?></span>
<?php if($val['type']):?>
<div id="vod_<?php echo $val['uid']?>" class="photo"><video src="<?php echo $val['url'].$val['folder'].'/'.$val['tmpname']?>" width="100%" height="100%"></video></div>
<span id="vodsrc_<?php echo $val['uid']?>" class="hidden"><iframe src="<?php echo $g['url_root'].'/_core/opensrc/thumb/image.php?vod='.$val['url'].$val['folder'].'/'.$val['tmpname']?>" width="350" height="250" frameborder="0" scrolling="no"></iframe></span>
<?php else:?>
<div id="vod_<?php echo $val['uid']?>" class="photo" style="background:url('<?php echo getVodThumb($val['src'],'mqdefault')?>') center center no-repeat;"></div>
<span id="vodsrc_<?php echo $val['uid']?>" class="hidden"><iframe width="350" height="250" src="http://www.youtube.com/embed/<?php echo getVodCode($val['src'])?>/?autohide=1&rel=0&wmode=transparent" frameborder="0" allowfullscreen></iframe></span>
<?php endif?>
<div class="btn-group">
<button class="btn btn-default" type="button" title="형식:<?php if($val['type']>0):?>내부동영상<?php else:?>외부동영상<?php endif?>" data-tooltip="tooltip">
<i class="<?php if($val['type']>0):?>glyphicon glyphicon-cloud-upload<?php else:?>fa fa-link<?php endif?> fa-lg"></i>
</button>
<button class="btn btn-default" type="button" title="수정" data-tooltip="tooltip" onclick="location.href='<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info';">
<i class="fa fa-edit fa-lg"></i>
</button>
<button class="btn btn-default" type="button" title="보기" data-tooltip="tooltip" onclick="location.href='<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info&autoplay=Y';">
<i class="glyphicon glyphicon-play-circle fa-lg"></i>
</button>
<button class="btn btn-default" type="button" title="삭제" data-tooltip="tooltip" onclick="deleteCheck(0,<?php echo $val['uid']?>);">
<i class="fa fa-trash-o fa-lg"></i>
</button>
</div>
</li>
<?php endforeach?>
</ul>
</form>
<?php else:?>
<div class="alert alert-success">
<span class="glyphicon glyphicon-info-sign"></span>
첨부할 동영상을 선택해 주세요.
<button type="button" class="btn btn-default" onclick="getId('filefiled').click();">PC동영상 업로드</button>
<button type="button" class="btn btn-default" onclick="vodAdd();">외부동영상 링크</button>
</div>
<?php endif?>
</div>
</div>
<?php if($N || $outlink == 'Y'):?>
<div id="infobox">
<?php if($outlink=='Y'):?>
<ul class="nav nav-tabs">
<li class="active"><a href="#">외부동영상 추가</a></li>
</ul>
<div class="infobox-body">
<div class="pic-info1">
<div id="_vod_play_layer_" class="media-pic">
</div>
<form name="_upload_form1_" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="upload_vod">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="link" value="Y">
<input type="hidden" name="category" value="0">
<div class="panel-body">
<div class="form-group">
<label>유투브소스 (Embed Code)</label>
<textarea name="src" id="_vod_embed_code_" class="form-control" rows="4"><?php echo $_R['src']?></textarea>
</div>
</div>
</form>
</div>
<div class="pic-submit1">
<div class="text-center">
<button type="button" class="btn btn-default" onclick="getVodPreview();" style="margin-bottom:3px;">동영상 불러오기</button>
<button type="button" class="btn btn-primary" onclick="getVodSave();">동영상 저장하기</button>
</div>
</div>
</div>
<?php else:?>
<ul class="nav nav-tabs">
<li<?php if($file_uid):?> class="active"<?php endif?>><a href="<?php echo $g['base_href']?>&amp;file_uid=<?php echo $file_uid?>&amp;tab=file_info">동영상정보</a></li>
<li<?php if(!$file_uid):?> class="active"<?php endif?>><a href="<?php echo $g['base_href']?>">삽입하기</a></li>
</ul>
<?php if($tab == 'file_info'):?>
<?php $_videoSrc=getVodCode($_R['src'])?>
<div class="infobox-body">
<div class="pic-info">
<div id="_vod_play_layer_" class="media-pic">
<?php if($autoplay=='Y'):?>
<?php if(!$_R['type']):?>
<iframe width="90%" src="http://www.youtube.com/embed/<?php echo $_videoSrc?>/?autoplay=1&autohide=1&rel=0&wmode=transparent" frameborder="0" allowfullscreen style="margin:15px;"></iframe>
<?php else:?>
<video src="<?php echo $_R['url'].$_R['folder'].'/'.$_R['tmpname']?>" width="90%" controls autoplay preload="auto" style="margin:15px;"></video>
<?php endif?>
<?php else:?>
<?php if(!$_R['type']):?>
<iframe width="90%" src="http://www.youtube.com/embed/<?php echo $_videoSrc?>/?autoplay=0&autohide=0&rel=0&wmode=transparent" frameborder="0" allowfullscreen style="margin:15px;"></iframe>
<?php else:?>
<video src="<?php echo $_R['url'].$_R['folder'].'/'.$_R['tmpname']?>" width="90%" controls preload="auto" style="margin:15px;"></video>
<?php endif?>
<?php endif?>
</div>
<form name="captionForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="caption_regis_vod">
<input type="hidden" name="uid" value="<?php echo $_R['uid']?>">
<div class="panel-body">
<div class="form-group">
<label>Video Name</label>
<input type="text" class="form-control" name="name" value="<?php echo $_R['name']?>">
</div>
<div class="form-group">
<label>Alt Text</label>
<input type="text" class="form-control" name="alt" value="<?php echo $_R['alt']?>">
</div>
<div class="form-group">
<label>Caption</label>
<textarea class="form-control" name="caption" rows="3"><?php echo $_R['caption']?></textarea>
</div>
<div class="form-group">
<label>Description</label>
<textarea class="form-control" name="description" rows="3"><?php echo $_R['description']?></textarea>
</div>
<?php if(!$_R['type']):?>
<div class="form-group">
<label>유투브소스 (Embed Code)</label>
<textarea name="src" id="_vod_embed_code_" class="form-control" rows="4"><?php echo $_R['src']?></textarea>
</div>
<?php endif?>
<div class="form-group">
<label class="control-label">License</label>
<select name="license" class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-default" data-size="auto">
<option value="0"<?php if($_R['license']==0):?> selected<?php endif?>>None (All rights reserved)</option>
<option value="1"<?php if($_R['license']==1):?> selected<?php endif?>>저작자표시-비영리-동일조건변경허락 Creative Commons</option>
<option value="2"<?php if($_R['license']==2):?> selected<?php endif?>>저작자표시-비영리 Creative Commons</option>
<option value="3"<?php if($_R['license']==3):?> selected<?php endif?>>저작자표시-비영리-변경금지 Creative Commons</option>
<option value="4"<?php if($_R['license']==4):?> selected<?php endif?>>저작자표시 Creative Commons</option>
<option value="5"<?php if($_R['license']==5):?> selected<?php endif?>>저작자표시-동일조건변경허락 Creative Commons</option>
<option value="6"<?php if($_R['license']==6):?> selected<?php endif?>>저작자표시-변경금지 Creative Commons</option>
</select>
</div>
<div class="form-group">
<label>Category</label>
<select name="category" class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-default" data-size="auto">
<?php $_CT_RCD = getDbArray($table['s_uploadcat'],'mbruid='.$my['uid']." and type=2 and name<>'none' and name<>'trash'",'*','gid','asc',0,1)?>
<option value="0"<?php if($_R['category']==0):?> selected<?php endif?>>미분류</option>
<?php while($_CT=db_fetch_array($_CT_RCD)):?>
<option value="<?php echo $_CT['uid']?>"<?php if($_R['category']==$_CT['uid']):?> selected<?php endif?>><?php echo $_CT['name']?>(<?php echo number_format($_CT['r_num'])?>)</option>
<?php endwhile?>
<option value="-1"<?php if($_R['category']==-1):?> selected<?php endif?>>휴지통</option>
</select>
</div>
</div>
</form>
</div>
<div class="pic-submit">
<div class="text-center">
<button type="button" class="btn btn-primary" onclick="infoCheck();">정보수정</button>
</div>
</div>
</div>
<?php else:?>
<div class="layoutbox-body">
<div class="selectbox">
<select class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-default" data-size="auto" onchange="frames._template_iframe_.location.href='<?php echo $g['url_module'].'/lang.'.$_HS['lang']?>/modal/template/'+this.value;">
<option value="video-base.html">템플릿 선택하기</option>
<option data-divider="true"></option>
<?php $tdir = $g['dir_module'].'lang.'.$_HS['lang'].'/modal/template/'?>
<?php $dirs = opendir($tdir)?>
<?php while(false !== ($skin = readdir($dirs))):?>
<?php if(!strstr($skin,'.html') || !strstr($skin,'video-') || $skin == 'video-base.html')continue?>
<option value="<?php echo $skin?>"><?php echo $skin?></option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="iframebox">
<iframe name="_template_iframe_" src="<?php echo $g['dir_module'].'lang.'.$_HS['lang']?>/modal/template/video-base.html" width="100%" height="100%" frameborder="0"></iframe>
</div>
<div class="optionbox">
<div class="text-center">
<button type="button" class="btn btn-primary" onclick="templateCheck();">삽입하기</button>
</div>
</div>
<?php endif?>
</div>
<?php endif?>
</div>
<?php endif?>
<!----------------------------------------------------------------------------
@부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴
----------------------------------------------------------------------------->
<div id="_modal_header" class="hidden">
<button type="button" class="close rb-close-white" style="position:absolute;right:15px;z-index:1;" data-dismiss="modal" aria-hidden="true">&times;</button>
<ul class="nav nav-tabs" style="position:relative;left:5px;margin-bottom:-20px;z-index:0;">
<li class="active"><a href="#">업로드 패널</a></li>
<li><a href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $m?>&amp;iframe=Y&amp;mdfile=modal.video.media&amp;dropfield=<?php echo $dropfield?>&amp;dropfiles=<?php echo $dropfiles?>" target="_modal_iframe_modal_window">비디오셋</a></li>
</ul>
</div>
<div id="_modal_footer" class="hidden">
<button type="button" class="btn btn-primary pull-left" onclick="frames._modal_iframe_modal_window.getId('filefiled').click();"><i class="fa fa-cloud-upload fa-lg"></i> PC동영상</button>
<button type="button" class="btn btn-primary pull-left" onclick="frames._modal_iframe_modal_window.picAdd();"><i class="fa fa-link fa-lg"></i> 외부동영상</button>
<?php if($N>1):?>
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.orderCheck();">순서변경</button>
<?php endif?>
<?php if($N):?>
<!--
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.deleteCheck(1,'');">선택삭제</button>
<button type="button" class="btn btn-default pull-left" onclick="frames._modal_iframe_modal_window.deleteCheck(2,'');">전체삭제</button>
-->
<?php endif?>
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">닫기</button>
</div>
<script language="javascript">
function playVod(vod,src)
{
getId('vod_'+vod).innerHTML = '<iframe width="175" height="98" src="http://www.youtube.com/embed/' + src + '/?autoplay=1&autohide=1&rel=0&wmode=transparent" frameborder="0" allowfullscreen></iframe>';
}
var isGetVod = false;
function getVodPreview()
{
if (getId('_vod_embed_code_').value.indexOf('<iframe') == -1)
{
alert('유투브 iframe 소스를 입력해주세요. ');
getId('_vod_embed_code_').focus();
return false;
}
var gx1 = getId('_vod_embed_code_').value.split('src="');
var gx2 = gx1[1].split('"');
getId('_vod_play_layer_').innerHTML = '<iframe width="90%" src="'+gx2[0]+'" frameborder="0" allowfullscreen style="margin:15px;"></iframe>';
isGetVod = true;
}
function getVodSave()
{
if (isGetVod == false)
{
alert('동영상을 불러온 후 저장해 주세요. ');
return false;
}
//if (confirm('정말로 저장하시겠습니까? '))
//{
var f = document._upload_form1_;
f.submit();
//}
return false;
}
function vodAdd()
{
location.href = '<?php echo $g['base_href']?>&outlink=Y';
}
function getFiles()
{
for (var i = 0; i < parent.getId('_modal_footer_modal_window').children.length; i++)
{
parent.getId('_modal_footer_modal_window').children[i].disabled = true;
}
getId('progressBar').style.display = 'block';
var f = document._upload_form_;
f.submit();
}
function gridProgress()
{
setTimeout("location.reload();",1000);
}
function deleteCheck(x,uid)
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
var gx;
for (i = 0; i < n; i++)
{
if (x == 0)
{
gx = l[i].value.split('|');
if (uid != parseInt(gx[0])) l[i].checked = false;
else l[i].checked = true;
}
if (x == 2) l[i].checked = true;
if (l[i].checked == true)
{
j++;
}
}
if (!j)
{
alert('삭제할 동영상을 선택해 주세요.');
return false;
}
if (confirm('정말로 삭제하시겠습니까?'))
{
f.a.value = 'files_delete';
f.submit();
}
return false;
}
function orderCheck()
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
if (confirm('정말로 변경하시겠습니까?'))
{
for (i = 0; i < n; i++)
{
l[i].checked = true;
}
f.a.value = 'files_order';
f.submit();
}
return false;
}
function infoCheck()
{
var f = document.captionForm;
f.submit();
}
function photoCheck(uid)
{
}
function templateCheck()
{
var ifr = frames._template_iframe_;
if(ifr.select_tpl == '')
{
alert('적용할 템플릿을 선택해 주세요. ');
return false;
}
if (ifr.select_tpl == '__tpl__all')
{
var table = '';
var stable = ifr.document.getElementById(ifr.select_tpl).innerHTML;
var _stable = stable;
var _stable1 = '';
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
for (i = 0; i < n; i++)
{
val = l[i].value.split('|');
_stable = stable.replace('[VOD]',getId('vodsrc_'+val[0]).innerHTML).replace('[CAPTION]',getId('caption_'+val[0]).innerHTML);
_stable1 += _stable;
}
table = _stable1;
}
else {
var table = ifr.document.getElementById(ifr.select_tpl).innerHTML;
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
var val;
for (i = 0; i < n; i++)
{
if(l[i].checked == true)
{
val = l[i].value.split('|');
table = table.replace('[VOD-'+j+']',getId('vodsrc_'+val[0]).innerHTML);
table = table.replace('[CAPTION-'+j+']',getId('caption_'+val[0]).innerHTML);
j++;
}
}
if(!j)
{
alert('적용할 동영상을 선택해 주세요. ');
return false;
}
}
parent.CKEDITOR.instances['ckeditor_textarea'].insertHtml(table);
parent.$('#modal_window').modal('hide');
}
function modalSetting()
{
//parent.getId('modal_window_dialog_modal_window').style.width = (parent.innerWidth-100)+'px'; //모달창 가로폭
//parent.getId('_modal_iframe_modal_window').style.height = (parent.innerHeight-280)+'px'; //높이(px)
parent.getId('modal_window_dialog_modal_window').style.position = 'absolute';
parent.getId('modal_window_dialog_modal_window').style.display = 'block';
parent.getId('modal_window_dialog_modal_window').style.width = '97%';
parent.getId('modal_window_dialog_modal_window').style.top = '0';
parent.getId('modal_window_dialog_modal_window').style.left = '0';
parent.getId('modal_window_dialog_modal_window').style.right = '0';
parent.getId('modal_window_dialog_modal_window').style.bottom = '0';
parent.getId('modal_window_dialog_modal_window').children[0].style.height = '100%';
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
parent.getId('_modal_header_modal_window').className = 'modal-header';
parent.getId('_modal_header_modal_window').style.height = '57px';
parent.getId('_modal_body_modal_window').style.position = 'absolute';
parent.getId('_modal_body_modal_window').style.display = 'block';
parent.getId('_modal_body_modal_window').style.paddingRight = '2px';
parent.getId('_modal_body_modal_window').style.top = '50px';
parent.getId('_modal_body_modal_window').style.left = '0';
parent.getId('_modal_body_modal_window').style.right = '0';
parent.getId('_modal_body_modal_window').style.bottom = '15px';
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
parent.getId('_modal_footer_modal_window').style.position = 'absolute';
parent.getId('_modal_footer_modal_window').style.background = '#fff';
parent.getId('_modal_footer_modal_window').style.width = '100%';
parent.getId('_modal_footer_modal_window').style.bottom = '0';
parent.getId('_modal_iframe_modal_window').style.overflow = 'hidden';
parent.getId('_modal_iframe_modal_window').scrolling = 'no';
parent.getId('_modal_header_modal_window').style.background = '#3F424B';
parent.getId('_modal_header_modal_window').style.color = '#fff';
}
modalSetting();
$('.selectpicker').selectpicker();
</script>
<!----------------------------------------------------------------------------
//부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴
----------------------------------------------------------------------------->
<style>
<?php $_isIE = strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')||strpos($_SERVER['HTTP_USER_AGENT'],'rv:1')?true:false?>
#photobox {position:absolute;display:block;top:15px;left:0;bottom:0;right:<?php echo $N?290:0?>px;overflow:hidden;}
#photobox .photo-box {position:absolute;display:block;top:42px;left:0;bottom:0;right:0;overflow-x:hidden;overflow-y:auto;}
#photobox .alert {margin-right:<?php echo $outlink=='Y'?'305':'15'?>px;}
#photoorder {padding:0 0 10px 0;}
#photoorder .rb-photo-check {position:absolute;margin-left:5px;}
#photoorder li {float:left;list-style-type:none;border:#dfdfdf solid 3px;padding:0;margin:0 9px 20px 10px;}
#photoorder .selected {border:#FC5F4A solid 3px;}
#photoorder li .photo {width:170px;height:98px;cursor:move;}
#photoorder li .btn-group {display:none;}
#photoorder li:hover .btn-group {display:block;position:absolute;}
#photoorder li:hover .btn-group button {top:-34px;}
#infobox {position:absolute;display:block;width:290px;top:15px;right:0;bottom:0;overflow:hidden;}
#infobox .infobox-body {display:block;width:100%;height:100%;border-left:#dfdfdf solid 1px;overflow:hidden;}
#infobox .infobox-body .pic-info {position:absolute;display:block;width:100%;top:42px;bottom:<?php echo $_isIE?'95px':'55px'?>;overflow-x:hidden;overflow-y:auto;}
#infobox .infobox-body .pic-info img {padding:15px 15px 0 15px;}
#infobox .infobox-body .pic-submit {position:absolute;display:block;width:100%;bottom:<?php echo $_isIE?'40px':'0'?>;border-top:#dfdfdf solid 1px;padding:10px 15px 10px 15px;}
#infobox .infobox-body .pic-info1 {position:absolute;display:block;width:100%;top:42px;bottom:<?php echo $_isIE?'132px':'92px'?>;overflow-x:hidden;overflow-y:auto;}
#infobox .infobox-body .pic-submit1 {position:absolute;display:block;width:100%;bottom:<?php echo $_isIE?'40px':'0'?>;border-top:#dfdfdf solid 1px;padding:10px 15px 10px 15px;}
#infobox .text-center .btn {width:100%;}
#infobox .layoutbox-body {display:block;width:100%;height:100%;border-left:#dfdfdf solid 1px;overflow:hidden;}
#infobox .layoutbox-body .selectbox {position:absolute;display:block;width:100%;left:0;right:0;padding:10px 15px 0 15px;}
#infobox .layoutbox-body .iframebox {position:absolute;display:block;width:100%;top:95px;bottom:<?php echo $_isIE?'105px':'55px'?>;padding:0 0 0 15px;overflow:hidden;border-top:#dfdfdf solid 1px;}
#infobox .layoutbox-body .optionbox {position:absolute;display:block;width:100%;padding:1px 15px 10px 15px;bottom:<?php echo $_isIE?'40px':'0'?>;border-top:#dfdfdf solid 1px;}
#infobox .layoutbox-body .optionbox .text-center {border-top:0; padding-top:10px;padding-bottom:0;}
#progressBar {display:none;margin-right:15px;}
#progressPer {}
</style>

View File

@@ -0,0 +1,981 @@
<?php
if (!$my['uid']) exit;
$S = 0;
$N = 0;
$P = array();
if ($dfiles)
{
$ufilesArray = getArrayString($dfiles);
foreach($ufilesArray['data'] as $_val)
{
$R = getUidData($table['s_upload'],$_val);
if ($R['mbruid'] != $my['uid'] || ($R['type']!=-1 && $R['type']!=2)) continue;
$P[] = $R;
$S += $R['size'];
$N++;
}
$NUM = $N;
$TPG = 1;
}
else {
$sort = $sort ? $sort : 'pid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = 50;
$_WHERE = 'site='.$s.' and mbruid='.$my['uid'].' and (type=-1 or type=2) and fileonly=0';
if ($album)
{
$_album = $album;
if ($album == 'none') $_album = 0;
if ($album == 'trash') $_album = -1;
$_WHERE .= ' and category='.$_album;
}
if ($where && $keyw)
{
if (strstr('[mbruid]',$where)) $_WHERE .= " and ".$where."='".$keyw."'";
else $_WHERE .= getSearchSql($where,$keyw,$ikeyword,'or');
}
$RCD = getDbArray($table['s_upload'],$_WHERE,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_upload'],$_WHERE);
$TPG = getTotalPage($NUM,$recnum);
while($R = db_fetch_array($RCD))
{
$P[] = $R;
$S += $R['size'];
$N++;
}
}
if ($tab == 'file_info')
{
if (!$file_uid)
{
$file_uid = $P[0]['uid'];
$_R = $P[0];
}
else {
$_R = getUidData($table['s_upload'],$file_uid);
}
}
$g['base_href'] = $g['s'].'/?r='.$r.'&m='.$m.'&iframe=Y&mdfile='.$mdfile.'&dropfield='.$dropfield.'&dropfiles='.$dropfiles.'&dfiles='.$dfiles;
?>
<style>
<?php $_gapAdj = strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')||strpos($_SERVER['HTTP_USER_AGENT'],'Firefox')||strpos($_SERVER['HTTP_USER_AGENT'],'rv:1')?true:false?>
#rb-body {
background-color: inherit;
}
#photobox {
position: absolute;
display: block;
top: 0;
left: 0;
bottom: 42px;
right: 0;
overflow: hidden;
}
#photobox .category-box {
position: absolute;
display: block;
top: 0;
left: 0;
bottom: 0;
width: <?php echo $dfiles?'0px': '195px'?>;
overflow-x: hidden;
overflow-y: auto;
}
#photobox .photo-box {
position: absolute;
display: block;
top: 0;
left: <?php echo $dfiles?'0px': '210px'?>;
bottom: 0;
right: 0;
overflow-x: hidden;
overflow-y: auto;
}
#photobox .photo-box.sideOpen {
right: 355px;
}
#photobox .btn-toolbar {
position: relative;
top: -15px;
left: 15px;
margin-right: 40px;
}
#photoorder {
margin-bottom: 0;
padding: 0;
}
#photoorder .rb-photo-check {
position: absolute;
margin-top: 5px;
margin-left: 5px;
}
#photoorder li {
position: relative;
float: left;
list-style-type: none;
border: #ddd solid 1px;
padding: 0;
margin: 0 5px 20px 5px;
overflow: hidden;
}
#photoorder .selected::before {
border: 5px solid #007bff;
content: "";
position: absolute;
top: -1px;
bottom: -1px;
left: -1px;
right: -1px;
}
#photoorder li .photo {
width: 100px;
height: 67px;
cursor: pointer;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
#photoorder li .btn-group {
position: absolute;
bottom: -25px;
width: 100%
}
#photoorder li:hover .btn-group {
display: block;
bottom:0;
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
transition: all 0.2s linear;
background-color: rgba(0, 0, 0, 0.8);
}
#photoorder li .btn-group-sm>.btn {
padding: .15rem .4rem;
font-size: 0.575rem;
line-height: 1.5;
border-radius: .2rem;
background-color: transparent;
color: #fff;
}
#infobox {
position: absolute;
display: block;
width: 320px;
top: 0;
right: 15px;
bottom: 50px;
overflow: hidden;
}
#infobox .card-img-overlay .btn {
position: absolute;
top: 180px;
right: 0;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 0;
color: #ccc;
font-size: 12px
}
#infobox .card-img-overlay .btn:hover {
text-decoration: none;
color: #fff;
}
#infobox .infobox-body {
overflow-y: auto;
position: absolute;
top: 212px;
bottom: 0;
}
#infobox .layoutbox-body {
display: block;
width: 100%;
height: 100%;
border-left: #dfdfdf solid 1px;
overflow: hidden;
}
#infobox .layoutbox-body .selectbox {
position: absolute;
display: block;
width: 100%;
left: 0;
right: 0;
padding: 10px 15px 0 15px;
}
#infobox .layoutbox-body .iframebox {
position: absolute;
display: block;
width: 100%;
top: 95px;
bottom: <?php echo $_gapAdj?'105px': '55px'?>;
padding: 0 0 0 15px;
overflow: hidden;
border-top: #dfdfdf solid 1px;
}
#infobox .layoutbox-body .optionbox {
position: absolute;
display: block;
width: 100%;
padding: 1px 15px 10px 15px;
bottom: <?php echo $_gapAdj?'40px': '0'?>;
border-top: #dfdfdf solid 1px;
}
#infobox .layoutbox-body .optionbox .text-center {
border-top: 0;
padding-top: 10px;
padding-bottom: 0;
}
#progressBar {
display: none;
margin-right: 15px;
}
.rb-list-group a {
padding: 8px 5px 3px 7px;
}
.rb-list-group a span {
font-weight: normal;
}
.rb-data-none {
height: 88%;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #9a9eac;
}
#_pic_play_layer_ {
height: 165px;
background-color: #eee
}
</style>
<form name="_upload_form_" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="mediaset/upload">
<input type="hidden" name="saveDir" value="<?php echo $g['path_file']?>mediaset/">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="category" value="<?php echo $_album?>">
<input type="hidden" name="mediaset" value="Y">
<input type="hidden" name="ablum_type" value="1">
<input name="upfiles[]" type="file" accept="image/*" id="filefiled" class="d-none" onchange="getFiles();">
</form>
<iframe name="_upload_iframe_" width="1" height="1" frameborder="0" scrolling="no"></iframe>
<div id="photobox">
<?php if(!$dfiles):?>
<div class="category-box">
<div class="list-group">
<a href="<?php echo $g['base_href']?>" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center py-2<?php if(!$album):?> active<?php endif?>">전체사진<span class="badge"><?php echo getDbCnt($table['s_uploadcat'],'sum(r_num)','site='.$s.' and mbruid='.$my['uid'].' and type=1')?></span></a>
<a href="<?php echo $g['base_href']?>&album=none" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center py-2<?php if($album=='none'):?> active<?php endif?>">미카테고리<span class="badge"><?php echo getDbCnt($table['s_uploadcat'],'sum(r_num)','site='.$s.' and mbruid='.$my['uid']." and type=1 and name='none'")?></span></a>
<?php $_TMP_CT=array()?>
<?php $_CT_RCD = getDbArray($table['s_uploadcat'],'site='.$s.' and mbruid='.$my['uid']." and type=1 and name<>'none' and name<>'trash'",'*','gid','asc',0,1)?>
<?php while($_CT=db_fetch_array($_CT_RCD)):$_TMP_CT[]=$_CT?>
<a href="<?php echo $g['base_href']?>&album=<?php echo $_CT['uid']?>" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center py-2<?php if($album==$_CT['uid']):?> active<?php endif?>"><?php echo $_CT['name']?><span class="badge"><?php echo $_CT['r_num']?></span></a></li>
<?php endwhile?>
<a href="<?php echo $g['base_href']?>&album=trash" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center py-2<?php if($album=='trash'):?> active<?php endif?>">휴지통<span class="badge"><?php echo getDbCnt($table['s_uploadcat'],'sum(r_num)','site='.$s.' and mbruid='.$my['uid']." and type=1 and name='trash'")?></span></a>
</div>
<div class="my-3">
<form action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_" onsubmit="return AddAlbumRcheck(this);">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="mediaset/category_add">
<input type="hidden" name="ablum_type" value="1">
<div class="input-group">
<input type="text" name="name" class="form-control" placeholder="추가할 카테고리">
<span class="input-group-append">
<button type="submit" class="btn btn-outline-secondary">추가</button>
</span>
</div>
</form>
</div>
</div>
<?php endif?>
<div class="photo-box<?php echo $file_uid || $outlink=='Y'?' sideOpen':''?>">
<div id="progressBar" class="progress progress-striped active">
<div id="progressPer" class="progress-bar progress-bar-danger" role="progressbar"></div>
</div>
<?php if($NUM):?>
<?php if(!$dfiles):?>
<div class="d-flex mb-3">
<div class="btn-group btn-group-sm mr-auto">
<button type="button" class="btn btn-light" title="전체선택" data-toggle="tooltip" data-placement="top" onclick="elementsCheck('photomembers[]','true');"><i class="fa fa-check-square-o"></i></button>
<button type="button" class="btn btn-light" title="선택해제" data-toggle="tooltip" data-placement="top" onclick="elementsCheck('photomembers[]','false');"><i class="fa fa-minus-square-o"></i></button>
<button type="button" class="btn btn-light"title="휴지통" data-toggle="tooltip" data-placement="top" onclick="deleteCheck(1,'');"><i class="fa fa-trash-o"></i></button>
<div class="btn-group btn-group-sm">
<button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-folder-o fa-fw"></i> 옮기기
<span class="caret"></span>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#." onclick="deleteCheck('move','0');"><i class="fa fa-folder-o fa-fw"></i> 미카테고리</a>
<?php foreach($_TMP_CT as $_CT):?>
<a class="dropdown-item" href="#." onclick="deleteCheck('move','<?php echo $_CT['uid']?>');"><i class="fa fa-folder-o fa-fw"></i> <?php echo $_CT['name']?></a>
<?php endforeach?>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#." onclick="deleteCheck('delete','');"><i class="fa fa-times fa-fw"></i> 영구삭제</a>
</div>
</div>
</div>
<div class="btn-group btn-group-sm">
<button type="button" class="btn btn-light"<?php if($p-1<1):?> disabled="disabled"<?php endif?> data-toggle="tooltip" data-placement="bottom" title="이전" onclick="location.href=getPageGo(<?php echo $p-1?>,0);"><i class="fa fa-angle-left fa-lg"></i></button>
<button type="button" class="btn btn-light"<?php if($p+1>$TPG):?> disabled="disabled"<?php endif?> data-toggle="tooltip" data-placement="bottom" title="다음" onclick="location.href=getPageGo(<?php echo $p+1?>,0);"><i class="fa fa-angle-right fa-lg"></i></button>
</div>
<div class="btn-group btn-group-sm mx-2">
<button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown"><?php echo number_format($NUM)?>개 <span class="badge badge-light"><?php echo $p?>/<?php echo sprintf('%s 페이지',$TPG)?></span></button>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item<?php if($p==1):?> active<?php endif?>" href="#." onclick="location.href=getPageGo(1,0);">첫 페이지</a>
<?php for($i=2;$i<$TPG;$i++):?>
<a class="dropdown-item<?php if($p==$i):?> active<?php endif?>" href="#." onclick="location.href=getPageGo(<?php echo $i?>,0);"><?php echo sprintf('%s 페이지',$i)?></a>
<?php endfor?>
<?php if($TPG>1):?>
<a class="dropdown-item<?php if($p==$TPG):?> active<?php endif?>" href="#." onclick="location.href=getPageGo(<?php echo $TPG?>,0);">마지막 페이지</a>
<?php else:?>
<a class="dropdown-item disabled" href="#">마지막 페이지</a>
<?php endif?>
</div>
</div>
</div>
<?php endif?>
<form name="photolistForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="">
<input type="hidden" name="mediaset" value="Y">
<input type="hidden" name="dtype" value="">
<input type="hidden" name="mcat" value="">
<ul id="photoorder" class="clearfix">
<?php foreach($P as $val):$val['xurl']=$val['type']>0?($val['fserver']?$val['url'].$val['folder'].'/'.$val['tmpname']:(($g['s']=='/'?$g['s']:$g['s'].'/').'files/'.$val['folder'].'/'.$val['tmpname'])):$val['src']?>
<li<?php if($file_uid==$val['uid']):?> class="selected"<?php endif?> click="location.href='<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info&album=<?php echo $album?>';">
<input type="checkbox" class="rb-photo-check" name="photomembers[]" value="<?php echo $val['uid']?>|<?php echo $val['xurl']?>|<?php echo $val['name']?>|<?php echo $val['linkto']?>|" onclick="photoCheck(<?php echo $val['uid']?>);"<?php if($dfiles):?> checked<?php endif?>>
<span id="caption_<?php echo $val['uid']?>" class="hidden"><?php echo htmlspecialchars($val['caption'])?></span>
<?php if($val['type']>0):?>
<div class="photo"
style="background-image:url('<?php echo getPreviewResize($val['src'],'t')?>');" onclick="location.href='<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info&album=<?php echo $album?>';"></div>
<?php else:?>
<div title="외부링크" class="photo" data-toggle="tooltip"><img src="./_core/opensrc/timthumb/thumb.php?src=<?php echo $val['src'] ?>&w=100&h=67&s=1" onclick="location.href='<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info&album=<?php echo $album?>';"></div>
<?php endif?>
</li>
<?php endforeach?>
</ul>
</form>
<?php else:?>
<div class="rb-data-none text-center">
<div class="">
<div class="display-3"><i class="fa fa-exclamation-circle" aria-hidden="true"></i></div>
등록된 사진이 없습니다.
</div>
</div>
<?php endif?>
</div>
</div>
<?php if((($file_uid || $dropfield=='editor') && $NUM) || $outlink == 'Y'):$_sideOpen=true?>
<div id="infobox" class="card">
<?php if($outlink=='Y'):?>
<div class="card-header">
외부사진 추가
</div>
<div id="_pic_play_layer_" class="card-img-top"></div>
<div class="infobox-body card-body w-100 px-3">
<div class="pic-info1">
<form name="_upload_form1_" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="mediaset/upload">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="link" value="Y">
<input type="hidden" name="category" value="<?php echo $_album?>">
<input type="hidden" name="mediaset" value="Y">
<div class="panel-body">
<div class="form-group">
<label>이미지주소 (URL)</label>
<textarea name="src" id="_pic_embed_code_" class="form-control" rows="4" autofocus><?php echo $_R['src']?></textarea>
</div>
</div>
</form>
</div>
<div class="pic-submit1">
<div class="text-center">
<button type="button" class="btn btn-light" onclick="getPicPreview();" style="margin-bottom:3px;">이미지 불러오기</button>
<button type="button" class="btn btn-primary" onclick="getPicSave();">이미지 저장하기</button>
</div>
</div>
</div>
<?php else:?>
<img alt="<?php echo $_R['name']?>" class="card-img-top" src="<?php echo $_R['type']>0?getPreviewResize($_R['src'],'n'):'./_core/opensrc/timthumb/thumb.php?src='.$_R['src'].'&w=320&h=213&s=1'?>">
<div class="card-img-overlay">
<button class="btn btn-link" type="button" onclick="window.open('<?php echo $_R['src']?>');">
원본보기
</button>
</div>
<?php if($tab == 'file_info'):?>
<div class="infobox-body card-body p-3">
<form name="captionForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="mediaset/caption_regis">
<input type="hidden" name="uid" value="<?php echo $_R['uid']?>">
<?php if($_R['type']>0):?>
<ul class="list-unstyled photo-info small">
<li class="text-muted">등록일시 : <?php echo getDateFormat($_R['d_update']?$_R['d_update']:$_R['d_regis'],'Y.m.d H:i')?> </li>
<li class="text-muted">사진크기 : <?php echo $_R['width']?> × <?php echo $_R['height']?></li>
<li class="text-muted">파일용량 : <?php echo getSizeFormat($_R['size'],1)?></li>
<li class="text-muted">파일종류 : <?php echo $_R['ext']?></li>
</ul>
<?php else:?>
<ul class="list-unstyled photo-info small">
<li class="text-muted">등록일시 : <?php echo getDateFormat($_R['d_update']?$_R['d_update']:$_R['d_regis'],'Y.m.d H:i')?></li>
<li class="text-muted">사진출처 : <span class="text-danger"><?php echo getDomain($_R['src'])?></span></li>
<li class="text-muted">파일종류 : <?php echo $_R['ext']?></li>
</ul>
<?php endif?>
<div class="form-group">
<label>파일명</label>
<input type="text" class="form-control form-control-sm" name="name" value="<?php echo substr($_R['name'],0,strlen($_R['name'])-strlen($_R['ext'])-1)?>">
</div>
<div class="form-group">
<label>Alt 값</label>
<input type="text" class="form-control form-control-sm" name="alt" value="<?php echo $_R['alt']?>">
</div>
<?php if($_R['type']<0):?>
<div class="form-group">
<label>이미지 Url</label>
<textarea class="form-control form-control-sm" name="src" rows="3"><?php echo $_R['src']?></textarea>
</div>
<?php endif?>
<div class="form-group">
<label>캡션</label>
<textarea class="form-control form-control-sm" name="caption" rows="3"><?php echo $_R['caption']?></textarea>
</div>
<div class="form-group">
<label>설명</label>
<textarea class="form-control" name="description" rows="3"><?php echo $_R['description']?></textarea>
</div>
<div class="form-group">
<label>다운로드 허용</label>
<select name="hidden" class="form-control custom-select custom-select-sm">
<option value="0"<?php if(!$_R['hidden']):?> selected<?php endif?>>예</option>
<option value="1"<?php if($_R['hidden']):?> selected<?php endif?>>아니오</option>
</select>
</div>
<div class="form-group">
<label>링크</label>
<select name="linkto" class="form-control custom-select custom-select-sm">
<option value="0"<?php if(!$_R['linkto']):?> selected<?php endif?>>링크없음</option>
<option value="1"<?php if($_R['linkto']==1):?> selected<?php endif?>>일반사진</option>
<option value="2"<?php if($_R['linkto']==2):?> selected<?php endif?>>라이트박스</option>
<option value="3"<?php if($_R['linkto']==3):?> selected<?php endif?>>연결링크</option>
<option value="4"<?php if($_R['linkto']==4):?> selected<?php endif?>>연결링크(새창)</option>
</select>
</div>
<div class="form-group">
<label>링크 주소</label>
<input type="text" class="form-control form-control-sm" name="linkurl" value="<?php echo $_R['linkurl']?>" placeholder="http://를 포함해서 입력해 주세요.">
</div>
<div class="form-group">
<label class="control-label">라이센스</label>
<select name="license" class="form-control custom-select custom-select-sm">
<option value="0"<?php if($_R['license']==0):?> selected<?php endif?>>None (All rights reserved)</option>
<option value="1"<?php if($_R['license']==1):?> selected<?php endif?>>저작자표시-비영리-동일조건변경허락 Creative Commons</option>
<option value="2"<?php if($_R['license']==2):?> selected<?php endif?>>저작자표시-비영리 Creative Commons</option>
<option value="3"<?php if($_R['license']==3):?> selected<?php endif?>>저작자표시-비영리-변경금지 Creative Commons</option>
<option value="4"<?php if($_R['license']==4):?> selected<?php endif?>>저작자표시 Creative Commons</option>
<option value="5"<?php if($_R['license']==5):?> selected<?php endif?>>저작자표시-동일조건변경허락 Creative Commons</option>
<option value="6"<?php if($_R['license']==6):?> selected<?php endif?>>저작자표시-변경금지 Creative Commons</option>
</select>
</div>
</form>
<div class="pic-submit">
<div class="text-center">
<button type="button" class="btn btn-outline-primary btn-block" onclick="infoCheck();">저장하기</button>
</div>
</div>
</div>
<?php else:?>
<?php endif?>
</div>
<?php endif?>
</div><!-- /.card -->
<?php endif?>
<!-- @부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->
<div id="_modal_header" hidden>
<ul class="nav nav-tabs border-bottom-0" style="margin-top: .1rem">
<li class="nav-item">
<a href="#" class="nav-link active">
포토셋
</a>
</li>
<?php if(!$dfiles && !$dropfield):?>
<li class="nav-item">
<a class="nav-link" href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&iframe=Y&mdfile=modal.video.media&dropfield=<?php echo $dropfield?>&dropfiles=<?php echo $dropfiles?>" target="_modal_iframe_modal_window">
비디오셋
</a>
</li>
<?php endif?>
</ul>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div id="_modal_footer" hidden>
<?php if(!$dfiles):?>
<div class="">
<button type="button" class="btn btn-light" <?php if($album!='trash'):?>onclick="frames._modal_iframe_modal_window.getId('filefiled').click();"<?php else:?>disabled<?php endif?>><i class="fa fa-cloud-upload fa-lg"></i> 내컴퓨터에서</button>
<button type="button" class="btn btn-light" <?php if($album!='trash'):?>onclick="frames._modal_iframe_modal_window.picAdd();"<?php else:?>disabled<?php endif?>><i class="fa fa-link fa-lg"></i> 외부사진</button>
<?php if($album>0):?>
<button type="button" class="btn btn-danger" onclick="frames._modal_iframe_modal_window.catDelete();">카테고리 삭제</button>
<?php endif?>
<?php if($NUM>1):?>
<?php if($album>0):?>
<button type="button" class="btn btn-danger" onclick="frames._modal_iframe_modal_window.orderCheck();">순서변경</button>
<?php endif?>
<?php endif?>
<?php if($NUM&&$album=='trash'):?>
<button type="button" class="btn btn-danger" onclick="frames._modal_iframe_modal_window.deleteCheck(3,'');">휴지통 비우기</button>
<?php endif?>
</div>
<?php endif?>
<div class="">
<button type="button" class="btn btn-light" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">닫기</button>
<?php if($dropfield&&$dropfield!='editor'):?>
<button type="button" class="btn btn-danger" onclick="frames._modal_iframe_modal_window.fieldDrop();">적용하기</button>
<?php endif?>
</div>
</div>
<?php if($NUM>1&&$album>0):?>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/core.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/events.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/css.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/coordinates.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/drag.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/dragsort.js"></script>
<script>
var dragsort = ToolMan.dragsort();
dragsort.makeListSortable(getId("photoorder"));
</script>
<?php endif?>
<script>
$(function () {
putCookieAlert('mediaset_result') // 실행결과 알림 메시지 출
$('[data-toggle="tooltip"]').tooltip()
})
var isGetPic = false;
function getPicPreview()
{
if (getId('_pic_embed_code_').value == '' || getId('_pic_embed_code_').value.indexOf('://') == -1)
{
alert('파일의 주소를 입력해주세요. ');
getId('_pic_embed_code_').focus();
return false;
}
getId('_pic_play_layer_').innerHTML = '<img width="90%" src="'+getId('_pic_embed_code_').value+'" style="margin:15px 0 0 15px;">';
isGetPic = true;
}
function getPicSave()
{
if (isGetPic == false)
{
alert('이미지를 불러온 후 저장해 주세요. ');
return false;
}
var f = document._upload_form1_;
f.submit();
return false;
}
function getFiles()
{
for (var i = 0; i < parent.getId('_modal_footer_modal_window').children.length; i++)
{
parent.getId('_modal_footer_modal_window').children[i].disabled = true;
}
getId('progressBar').style.display = 'block';
var f = document._upload_form_;
f.submit();
}
function gridProgress()
{
setTimeout("location.reload();",1000);
}
function picAdd()
{
location.href = '<?php echo $g['base_href']?>&album=<?php echo $album?>&outlink=Y';
}
function gridProgress()
{
setTimeout("location.reload();",1000);
}
function fieldDrop()
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
var s = '';
var x;
for (i = 0; i < n; i++)
{
if (l[i].checked == true)
{
j++;
x = l[i].value.split('|');
s += '['+x[0]+']';
}
}
if (!j)
{
alert('사진을 선택해 주세요. ');
return false;
}
parent.getId('<?php echo $dropfield?>').value <?php if(!$dfiles):?>+<?php endif?>= s;
parent.$('#modal_window').modal('hide');
}
function AddAlbumRcheck(f)
{
if (f.name.value == '')
{
alert('카테고리명을 입력해 주세요. ');
f.name.focus();
return false;
}
return true;
}
function catDelete()
{
if (confirm('정말로 삭제하시겠습니까? '))
{
var f = document._upload_form_;
f.a.value = 'mediaset/category_delete';
f.submit();
}
return false;
}
function deleteCheck(x,uid)
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
if (x == 3)
{
if (confirm('정말로 휴지통을 비우시겠습니까?'))
{
f.a.value = 'mediaset/files_empty';
f.submit();
}
return false;
}
for (i = 0; i < n; i++)
{
if (x == 0)
{
gx = l[i].value.split('|');
if (uid != parseInt(gx[0])) l[i].checked = false;
else l[i].checked = true;
}
if (x == 2) l[i].checked = true;
if (l[i].checked == true)
{
j++;
}
}
if (x == 'move')
{
if (!j)
{
alert('이동할 사진을 선택해 주세요.');
return false;
}
f.a.value = 'mediaset/files_delete';
f.dtype.value = x;
f.mcat.value = uid;
f.submit();
}
else if (x == 'delete')
{
if (!j)
{
alert('영구삭제할 사진을 선택해 주세요.');
return false;
}
if (confirm('정말로 삭제하시겠습니까?'))
{
f.a.value = 'mediaset/files_delete';
f.dtype.value = x;
f.submit();
}
}
else {
if (!j)
{
alert('삭제할 사진을 선택해 주세요.');
return false;
}
if (confirm('휴지통으로 이동하시겠습니까?'))
{
f.a.value = 'mediaset/files_delete';
f.submit();
}
}
return false;
}
function orderCheck()
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
for (i = 0; i < n; i++)
{
l[i].checked = true;
}
f.a.value = 'mediaset/files_order';
f.submit();
}
function infoCheck()
{
var f = document.captionForm;
f.submit();
}
function photoCheck(uid)
{
}
function elementsCheck(members,flag)
{
var l = document.getElementsByName(members);
var n = l.length;
var i;
for (i = 0; i < n; i++)
{
if (flag == 'true')
{
l[i].checked = true;
}
else {
l[i].checked = false;
}
}
return false;
}
function templateCheck()
{
var ifr = frames._template_iframe_;
if(ifr.select_tpl == '')
{
alert('적용할 템플릿을 선택해 주세요. ');
return false;
}
if (ifr.select_tpl == '__tpl__all')
{
var table = '';
var stable = ifr.document.getElementById(ifr.select_tpl).innerHTML;
var _stable = stable;
var _stable1 = '';
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
for (i = 0; i < n; i++)
{
val = l[i].value.split('|');
_stable = stable.replace('[HREF]',val[1]).replace('[SRC]',val[1]).replace('[ALT]',val[2]).replace('[CAPTION]',getId('caption_'+val[0]).innerHTML);
if (val[3] == '0')
{
_stable = _stable.replace('[A]','').replace('[/A]','');
}
if (val[3] == '1')
{
_stable = _stable.replace('[A]','<a href="'+val[1]+'" title="'+val[2]+'">').replace('[/A]','</a>');
}
if (val[3] == '2')
{
_stable = _stable.replace('[A]','<a href="'+val[1]+'" title="'+val[2]+'" class="data-gallery">').replace('[/A]','</a>');
}
if (val[3] == '3')
{
_stable = _stable.replace('[A]','<a href="'+rooturl+'/photos/'+val[0]+'">').replace('[/A]','</a>');
}
_stable1 += _stable;
}
table = _stable1;
table = table.replace(/\[ROOTURL\]/g,rooturl);
}
else {
var table = ifr.document.getElementById(ifr.select_tpl).innerHTML;
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
var val;
for (i = 0; i < n; i++)
{
if(l[i].checked == true)
{
val = l[i].value.split('|');
table = table.replace('[HREF-'+j+']',val[1]);
table = table.replace('[SRC-'+j+']',val[1]);
table = table.replace('[ALT-'+j+']',val[2]);
table = table.replace('[CAPTION-'+j+']',getId('caption_'+val[0]).innerHTML);
if (val[3] == '0')
{
table = table.replace('[A-'+j+']','').replace('[/A-'+j+']','');
}
if (val[3] == '1')
{
table = table.replace('[A-'+j+']','<a href="'+val[1]+'" title="'+val[2]+'">').replace('[/A-'+j+']','</a>');
}
if (val[3] == '2')
{
table = table.replace('[A-'+j+']','<a href="'+val[1]+'" title="'+val[2]+'" class="data-gallery">').replace('[/A-'+j+']','</a>');
}
if (val[3] == '3')
{
table = table.replace('[A-'+j+']','<a href="'+rooturl+'/photos/'+val[0]+'">').replace('[/A-'+j+']','</a>');
}
j++;
}
}
if(!j)
{
alert('적용할 사진을 선택해 주세요. ');
return false;
}
table = table.replace(/\[ROOTURL\]/g,rooturl);
}
parent.InserHTMLtoEditor(table);
parent.$('#modal_window').modal('hide');
}
function modalSetting()
{
parent.getId('modal_window_dialog_modal_window').style.position = 'absolute';
parent.getId('modal_window_dialog_modal_window').style.display = 'block';
parent.$('#modal_window_dialog_modal_window').css('max-width','100%');
parent.getId('modal_window_dialog_modal_window').style.padding = '0 20px 0 20px';
parent.getId('modal_window_dialog_modal_window').style.top = '0';
parent.getId('modal_window_dialog_modal_window').style.left = '0';
parent.getId('modal_window_dialog_modal_window').style.right = '0';
parent.getId('modal_window_dialog_modal_window').style.bottom = '0';
parent.getId('modal_window_dialog_modal_window').children[0].style.height = '100%';
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
parent.getId('_modal_header_modal_window').className = 'modal-header';
parent.getId('_modal_header_modal_window').style.height = '57px';
parent.getId('_modal_body_modal_window').style.position = 'absolute';
parent.getId('_modal_body_modal_window').style.display = 'block';
parent.getId('_modal_body_modal_window').style.paddingRight = '2px';
parent.getId('_modal_body_modal_window').style.top = '50px';
parent.getId('_modal_body_modal_window').style.left = '0';
parent.getId('_modal_body_modal_window').style.right = '0';
parent.getId('_modal_body_modal_window').style.bottom = '15px';
parent.getId('_modal_footer_modal_window').className = 'modal-footer d-flex justify-content-between';
parent.getId('_modal_footer_modal_window').style.position = 'absolute';
parent.getId('_modal_footer_modal_window').style.width = '100%';
parent.getId('_modal_footer_modal_window').style.bottom = '0';
parent.getId('_modal_iframe_modal_window').style.overflow = 'hidden';
parent.getId('_modal_iframe_modal_window').scrolling = 'no';
}
modalSetting();
</script>
<!-- //부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->

View File

@@ -0,0 +1,960 @@
<?php
if (!$my['uid']) exit;
include $g['dir_module'].'function.php';
$S = 0;
$N = 0;
$P = array();
if ($dfiles)
{
$ufilesArray = getArrayString($dfiles);
foreach($ufilesArray['data'] as $_val)
{
$R = getUidData($table['s_upload'],$_val);
if ($R['mbruid'] != $my['uid'] || ($R['type']!=0 && $R['type']!=5)) continue;
$P[] = $R;
$S += $R['size'];
$N++;
}
$NUM = $N;
$TPG = 1;
}
else {
$sort = $sort ? $sort : 'pid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = 50;
$_WHERE = 'site='.$s.' and mbruid='.$my['uid'].' and (type=0 or type=5) and fileonly=0';
if ($album)
{
$_album = $album;
if ($album == 'none') $_album = 0;
if ($album == 'trash') $_album = -1;
$_WHERE .= ' and category='.$_album;
}
if ($where && $keyw)
{
if (strstr('[mbruid]',$where)) $_WHERE .= " and ".$where."='".$keyw."'";
else $_WHERE .= getSearchSql($where,$keyw,$ikeyword,'or');
}
$RCD = getDbArray($table['s_upload'],$_WHERE,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_upload'],$_WHERE);
$TPG = getTotalPage($NUM,$recnum);
while($R = db_fetch_array($RCD))
{
$P[] = $R;
$S += $R['size'];
$N++;
}
}
if ($tab == 'file_info')
{
if (!$file_uid)
{
$file_uid = $P[0]['uid'];
$_R = $P[0];
}
else {
$_R = getUidData($table['s_upload'],$file_uid);
}
}
$g['base_href'] = $g['s'].'/?r='.$r.'&m='.$m.'&iframe=Y&mdfile='.$mdfile.'&dropfield='.$dropfield.'&dropfiles='.$dropfiles.'&dfiles='.$dfiles;
?>
<style>
<?php $_gapAdj = strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')||strpos($_SERVER['HTTP_USER_AGENT'],'Firefox')||strpos($_SERVER['HTTP_USER_AGENT'],'rv:1')?true:false?>
#photobox {
position: absolute;
display: block;
top: 0;
left: 0;
bottom: 0;
right: <?php echo $_sideOpen?290: 0?>px;
overflow: hidden;
}
#photobox .category-box {
position: absolute;
display: block;
top: 0;
left: 0;
bottom: 0;
width: <?php echo $dfiles?'0px': '195px'?>;
padding-top: 25px;
overflow-x: hidden;
overflow-y: auto;
}
#photobox .photo-box {
position: absolute;
display: block;
top: 0;
left: <?php echo $dfiles?'0px': '210px'?>;
bottom: 0;
right: 0;
padding-top: 45px;
overflow-x: hidden;
overflow-y: auto;
}
#photobox .alert {
margin-right: <?php echo $_sideOpen=true?'15': '305'?>px;
}
#photobox .btn-toolbar {
position: relative;
top: -15px;
left: 15px;
margin-right: 40px;
}
#photoorder {
padding: 0 0 10px 0;
}
#photoorder .rb-photo-check {
position: absolute;
margin-left: 5px;
}
#photoorder li {
float: left;
list-style-type: none;
border: #dfdfdf solid 3px;
padding: 0;
margin: 0 9px 20px 10px;
}
#photoorder .selected {
border: #FC5F4A solid 3px;
}
#photoorder li .photo {
width: 170px;
height: 98px;
cursor: move;
}
#photoorder li .btn-group {
display: none;
}
#photoorder li:hover .btn-group {
display: block;
position: absolute;
}
#photoorder li:hover .btn-group button {
top: -34px;
}
#infobox {
position: absolute;
display: block;
width: 290px;
top: 15px;
right: 0;
bottom: 0;
overflow: hidden;
}
#infobox .infobox-body {
display: block;
width: 100%;
height: 100%;
border-left: #dfdfdf solid 1px;
overflow: hidden;
}
#infobox .infobox-body .pic-info {
position: absolute;
display: block;
width: 100%;
top: 42px;
bottom: <?php echo $_gapAdj?'95px': '55px'?>;
overflow-x: hidden;
overflow-y: auto;
}
#infobox .infobox-body .pic-info img {
padding: 15px 15px 0 15px;
}
#infobox .infobox-body .pic-submit {
position: absolute;
display: block;
width: 100%;
bottom: <?php echo $_gapAdj?'40px': '0'?>;
border-top: #dfdfdf solid 1px;
padding: 10px 15px 10px 15px;
}
#infobox .infobox-body .pic-info1 {
position: absolute;
display: block;
width: 100%;
top: 42px;
bottom: <?php echo $_gapAdj?'132px': '92px'?>;
overflow-x: hidden;
overflow-y: auto;
}
#infobox .infobox-body .pic-submit1 {
position: absolute;
display: block;
width: 100%;
bottom: <?php echo $_gapAdj?'40px': '0'?>;
border-top: #dfdfdf solid 1px;
padding: 10px 15px 10px 15px;
}
#infobox .text-center .btn {
width: 100%;
}
#infobox .layoutbox-body {
display: block;
width: 100%;
height: 100%;
border-left: #dfdfdf solid 1px;
overflow: hidden;
}
#infobox .layoutbox-body .selectbox {
position: absolute;
display: block;
width: 100%;
left: 0;
right: 0;
padding: 10px 15px 0 15px;
}
#infobox .layoutbox-body .iframebox {
position: absolute;
display: block;
width: 100%;
top: 95px;
bottom: <?php echo $_gapAdj?'105px': '55px'?>;
padding: 0 0 0 15px;
overflow: hidden;
border-top: #dfdfdf solid 1px;
}
#infobox .layoutbox-body .optionbox {
position: absolute;
display: block;
width: 100%;
padding: 1px 15px 10px 15px;
bottom: <?php echo $_gapAdj?'40px': '0'?>;
border-top: #dfdfdf solid 1px;
}
#infobox .layoutbox-body .optionbox .text-center {
border-top: 0;
padding-top: 10px;
padding-bottom: 0;
}
#progressBar {
display: none;
margin-right: 15px;
}
#progressPer {}
.rb-list-group a {
padding: 8px 5px 3px 7px;
}
.rb-list-group a span {
font-weight: normal;
}
.rb-data-none {
height: 88%;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #9a9eac;
}
</style>
<form name="_upload_form_" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="mediaset/upload_vod">
<input type="hidden" name="saveDir" value="<?php echo $g['path_file']?>">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="category" value="<?php echo $_album?>">
<input type="hidden" name="mediaset" value="Y">
<input type="hidden" name="ablum_type" value="2">
<input name="upfiles[]" type="file" accept="video/mp4" id="filefiled" class="d-none" onchange="getFiles();">
</form>
<iframe name="_upload_iframe_" width="1" height="1" frameborder="0" scrolling="no"></iframe>
<div id="photobox">
<div class="category-box">
<div class="list-group rb-list-group">
<a href="<?php echo $g['base_href']?>" class="list-group-item<?php if(!$album):?> active<?php endif?>">전체 동영상<span class="badge"><?php echo getDbCnt($table['s_uploadcat'],'sum(r_num)','mbruid='.$my['uid'].' and type=2')?></span></a>
<a href="<?php echo $g['base_href']?>&album=none" class="list-group-item<?php if($album=='none'):?> active<?php endif?>">미분류<span class="badge"><?php echo getDbCnt($table['s_uploadcat'],'sum(r_num)','mbruid='.$my['uid']." and type=2 and name='none'")?></span></a>
<?php $_TMP_CT = array()?>
<?php $_CT_RCD = getDbArray($table['s_uploadcat'],'site='.$s.' and mbruid='.$my['uid']." and type=2 and name<>'none' and name<>'trash'",'*','gid','asc',0,1)?>
<?php while($_CT=db_fetch_array($_CT_RCD)):$_TMP_CT[]=$_CT?>
<a href="<?php echo $g['base_href']?>&album=<?php echo $_CT['uid']?>" class="list-group-item<?php if($album==$_CT['uid']):?> active<?php endif?>"><?php echo $_CT['name']?><span class="badge"><?php echo $_CT['r_num']?></span></a></li>
<?php endwhile?>
<a href="<?php echo $g['base_href']?>&album=trash" class="list-group-item<?php if($album=='trash'):?> active<?php endif?>">휴지통<span class="badge"><?php echo getDbCnt($table['s_uploadcat'],'sum(r_num)','mbruid='.$my['uid']." and type=2 and name='trash'")?></span></a>
</div>
<div class="list-group">
<form action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_" onsubmit="return AddAlbumRcheck(this);">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="mediaset/category_add">
<input type="hidden" name="ablum_type" value="2">
<div class="input-group mt-3">
<input type="text" name="name" class="form-control" placeholder="추가할 분류">
<span class="input-group-btn">
<input type="submit" class="btn btn-light" value="추가">
</span>
</div>
</form>
</div>
</div>
<div class="photo-box">
<div id="progressBar" class="progress progress-striped active">
<div id="progressPer" class="progress-bar progress-bar-danger" role="progressbar"></div>
</div>
<?php if($NUM):?>
<?php if(!$dfiles):?>
<div class="btn-toolbar well well-sm">
<div class="btn-group">
<button type="button" class="btn btn-light" title="전체선택" data-tooltip="tooltip" onclick="elementsCheck('photomembers[]','true');"><i class="fa fa-check-square-o fa-lg"></i></button>
<button type="button" class="btn btn-light" title="선택해제" data-tooltip="tooltip" onclick="elementsCheck('photomembers[]','false');"><i class="fa fa-minus-square-o fa-lg"></i></button>
<button type="button" class="btn btn-light" title="휴지통" data-tooltip="tooltip" onclick="deleteCheck(1,'');"><i class="fa fa-trash-o fa-lg"></i></button>
<div class="btn-group">
<button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-folder fa-lg"></i> 옮기기
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#." onclick="deleteCheck('move','0');"><i class="fa fa-folder"></i> 미분류</a></li>
<?php foreach($_TMP_CT as $_CT):?>
<li><a href="#." onclick="deleteCheck('move','<?php echo $_CT['uid']?>');"><i class="fa fa-folder"></i> <?php echo $_CT['name']?></a></li>
<?php endforeach?>
<li class="divider"></li>
<li><a href="#." onclick="deleteCheck('delete','');"><i class="fa fa-times fa-lg"></i> 영구삭제</a></li>
</ul>
</div>
</div>
<div class="btn-group pull-right">
<button type="button" class="btn btn-light"<?php if($p-1<1):?> disabled="disabled"<?php endif?> data-toggle="tooltip" data-placement="bottom" title="" data-original-title="이전" onclick="location.href=getPageGo(<?php echo $p-1?>,0);"><i class="fa fa-chevron-left fa-lg"></i></button>
<button type="button" class="btn btn-light"<?php if($p+1>$TPG):?> disabled="disabled"<?php endif?> data-toggle="tooltip" data-placement="bottom" title="" data-original-title="다음" onclick="location.href=getPageGo(<?php echo $p+1?>,0);"><i class="fa fa-chevron-right fa-lg"></i></button>
</div>
<div class="btn-group pull-right">
<button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown"><?php echo number_format($NUM)?>개 (<?php echo $p?>/<?php echo sprintf('%s 페이지',$TPG)?>)</button>
<ul class="dropdown-menu" role="menu">
<li<?php if($p==1):?> class="active"<?php endif?>><a href="#." onclick="location.href=getPageGo(1,0);">첫 페이지</a></li>
<?php for($i=2;$i<$TPG;$i++):?>
<li<?php if($p==$i):?> class="active"<?php endif?>><a href="#." onclick="location.href=getPageGo(<?php echo $i?>,0);"><?php echo sprintf('%s 페이지',$i)?></a></li>
<?php endfor?>
<?php if($TPG>1):?>
<li<?php if($p==$TPG):?> class="active"<?php endif?>><a href="#." onclick="location.href=getPageGo(<?php echo $TPG?>,0);">마지막 페이지</a></li>
<?php else:?>
<li class="disabled"><a>마지막 페이지</a></li>
<?php endif?>
</ul>
</div>
</div>
<?php endif?>
<form name="photolistForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="">
<input type="hidden" name="mediaset" value="Y">
<input type="hidden" name="dtype" value="">
<input type="hidden" name="mcat" value="">
<ul id="photoorder">
<?php foreach($P as $val):?>
<li<?php if($file_uid==$val['uid']):?> class="selected"<?php endif?> ondblclick="location.href='<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info&album=<?php echo $album?>';">
<input type="checkbox" class="rb-photo-check" name="photomembers[]" value="<?php echo $val['uid']?>|<?php echo $val['xurl'].$val['folder'].'/'.$val['tmpname']?>|<?php echo $val['name']?>|" onclick="photoCheck(<?php echo $val['uid']?>);"<?php if($dfiles):?> checked<?php endif?>>
<span id="caption_<?php echo $val['uid']?>" class="hidden"><?php echo htmlspecialchars($val['caption'])?></span>
<?php if($val['type']):?>
<div id="vod_<?php echo $val['uid']?>" class="photo"><video src="<?php echo $val['url'].$val['folder'].'/'.$val['tmpname']?>" width="100%" height="100%"></video></div>
<span id="vodsrc_<?php echo $val['uid']?>" class="hidden"><iframe src="<?php echo $g['url_root'].'/_core/opensrc/thumb/image.php?vod='.$val['url'].$val['folder'].'/'.$val['tmpname']?>" width="350" height="250" frameborder="0" scrolling="no"></iframe></span>
<?php else:?>
<div id="vod_<?php echo $val['uid']?>" class="photo" style="background:url('<?php echo getVodThumb($val['src'],'mqdefault')?>') center center no-repeat;"></div>
<span id="vodsrc_<?php echo $val['uid']?>" class="hidden"><iframe width="350" height="250" src="http://www.youtube.com/embed/<?php echo getVodCode($val['src'])?>/?autohide=1&rel=0&wmode=transparent" frameborder="0" allowfullscreen></iframe></span>
<?php endif?>
<div class="btn-group">
<button class="btn btn-light" type="button" title="형식:<?php if($val['type']>0):?>내부 동영상<?php else:?>외부 동영상<?php endif?>" data-tooltip="tooltip">
<i class="<?php if($val['type']>0):?>glyphicon glyphicon-cloud-upload<?php else:?>fa fa-link<?php endif?> fa-lg"></i>
</button>
<button class="btn btn-light" type="button" title="수정" onclick="location.href='<?php echo $g['s']?>/?r=<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info&album=<?php echo $album?>';">
<i class="fa fa-edit fa-lg"></i>
</button>
<button class="btn btn-light" type="button" title="보기" onclick="location.href='<?php echo $g['s']?>/?r=<?php echo $g['base_href']?>&file_uid=<?php echo $val['uid']?>&tab=file_info&autoplay=Y&album=<?php echo $album?>';">
<i class="glyphicon glyphicon-play-circle fa-lg"></i>
</button>
<button class="btn btn-light" type="button" title="삭제" onclick="deleteCheck(0,<?php echo $val['uid']?>);">
<i class="fa fa-trash-o fa-lg"></i>
</button>
</div>
</li>
<?php endforeach?>
</ul>
</form>
<?php else:?>
<div class="rb-data-none text-center">
<div class="">
<div class="display-3"><i class="fa fa-exclamation-circle" aria-hidden="true"></i></div>
등록된 비디오가 없습니다.
</div>
</div>
<?php endif?>
</div>
</div>
<?php if((($file_uid || $dropfield=='editor') && $NUM) || $outlink == 'Y'):$_sideOpen=true?>
<div id="infobox">
<?php if($outlink=='Y'):?>
<ul class="nav nav-tabs">
<li class="active"><a href="#">동영상 추가</a></li>
</ul>
<div class="infobox-body">
<div class="pic-info1">
<div id="_vod_play_layer_" class="media-pic">
</div>
<form name="_upload_form1_" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="mediaset/upload_vod">
<input type="hidden" name="gparam" value="<?php echo $gparam?>">
<input type="hidden" name="category" value="<?php echo $_album?>">
<input type="hidden" name="mediaset" value="Y">
<input type="hidden" name="link" value="Y">
<div class="panel-body">
<div class="form-group">
<label>유투브소스 (Embed Code)</label>
<textarea name="src" id="_vod_embed_code_" class="form-control" rows="4"><?php echo $_R['src']?></textarea>
</div>
</div>
</form>
</div>
<div class="pic-submit1">
<div class="text-center">
<button type="button" class="btn btn-light" onclick="getVodPreview();" style="margin-bottom:3px;">동영상 불러오기</button>
<button type="button" class="btn btn-primary" onclick="getVodSave();">동영상 저장하기</button>
</div>
</div>
</div>
<?php else:?>
<ul class="nav nav-tabs">
<?php if($dropfield=='editor'):?>
<li<?php if($file_uid):?> class="active"<?php endif?>><a href="<?php echo $g['base_href']?>&file_uid=<?php echo $file_uid?>&tab=file_info&album=<?php echo $album?>">동영상 정보</a></li>
<li<?php if(!$file_uid):?> class="active"<?php endif?>><a href="<?php echo $g['base_href']?>&album=<?php echo $album?>">삽입하기</a></li>
<?php else:?>
<li<?php if($file_uid):?> class="active"<?php endif?>><a href="<?php echo $g['base_href']?>&file_uid=<?php echo $file_uid?>&tab=file_info&album=<?php echo $album?>">동영상 정보</a></li>
<?php endif?>
</ul>
<?php if($tab == 'file_info'):?>
<?php $_videoSrc=getVodCode($_R['src'])?>
<div class="infobox-body">
<div class="pic-info">
<div id="_vod_play_layer_" class="media-pic">
<?php if($autoplay=='Y'):?>
<?php if(!$_R['type']):?>
<iframe width="90%" src="http://www.youtube.com/embed/<?php echo $_videoSrc?>/?autoplay=1&autohide=1&rel=0&wmode=transparent" frameborder="0" allowfullscreen style="margin:15px;"></iframe>
<?php else:?>
<video src="<?php echo $_R['url'].$_R['folder'].'/'.$_R['tmpname']?>" width="90%" controls autoplay preload="auto" style="margin:15px;"></video>
<?php endif?>
<?php else:?>
<?php if(!$_R['type']):?>
<iframe width="90%" src="http://www.youtube.com/embed/<?php echo $_videoSrc?>/?autoplay=0&autohide=0&rel=0&wmode=transparent" frameborder="0" allowfullscreen style="margin:15px;"></iframe>
<?php else:?>
<video src="<?php echo $_R['url'].$_R['folder'].'/'.$_R['tmpname']?>" width="90%" controls preload="auto" style="margin:15px;"></video>
<?php endif?>
<?php endif?>
</div>
<form name="captionForm" action="<?php echo $g['s']?>/" method="post" target="_upload_iframe_">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="a" value="mediaset/caption_regis_vod">
<input type="hidden" name="uid" value="<?php echo $_R['uid']?>">
<div class="panel-body">
<div class="form-group">
<label>Video Name</label>
<input type="text" class="form-control" name="name" value="<?php echo $_R['name']?>">
</div>
<div class="form-group">
<label>Alt Text</label>
<input type="text" class="form-control" name="alt" value="<?php echo $_R['alt']?>">
</div>
<div class="form-group">
<label>Caption</label>
<textarea class="form-control" name="caption" rows="3"><?php echo $_R['caption']?></textarea>
</div>
<div class="form-group">
<label>Description</label>
<textarea class="form-control" name="description" rows="3"><?php echo $_R['description']?></textarea>
</div>
<?php if(!$_R['type']):?>
<div class="form-group">
<label>유투브소스 (Embed Code)</label>
<textarea name="src" id="_vod_embed_code_" class="form-control" rows="4"><?php echo $_R['src']?></textarea>
</div>
<?php endif?>
<div class="form-group">
<label class="control-label">License</label>
<select name="license" class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-light" data-size="auto">
<option value="0"<?php if($_R['license']==0):?> selected<?php endif?>>None (All rights reserved)</option>
<option value="1"<?php if($_R['license']==1):?> selected<?php endif?>>저작자표시-비영리-동일조건변경허락 Creative Commons</option>
<option value="2"<?php if($_R['license']==2):?> selected<?php endif?>>저작자표시-비영리 Creative Commons</option>
<option value="3"<?php if($_R['license']==3):?> selected<?php endif?>>저작자표시-비영리-변경금지 Creative Commons</option>
<option value="4"<?php if($_R['license']==4):?> selected<?php endif?>>저작자표시 Creative Commons</option>
<option value="5"<?php if($_R['license']==5):?> selected<?php endif?>>저작자표시-동일조건변경허락 Creative Commons</option>
<option value="6"<?php if($_R['license']==6):?> selected<?php endif?>>저작자표시-변경금지 Creative Commons</option>
</select>
</div>
</div>
</form>
</div>
<div class="pic-submit">
<div class="text-center">
<button type="button" class="btn btn-primary" onclick="infoCheck();">정보수정</button>
</div>
</div>
</div>
<?php else:?>
<div class="layoutbox-body">
<div class="selectbox">
<select class="selectpicker show-tick show-menu-arrow scrollMe" data-width="100%" data-style="btn btn-light" data-size="auto" onchange="frames._template_iframe_.location.href='<?php echo $g['url_module']?>/modal/template/'+this.value;">
<option value="video-base.html">템플릿 선택하기</option>
<option data-divider="true"></option>
<?php $tdir = $g['dir_module'].'modal/template/'?>
<?php $dirs = opendir($tdir)?>
<?php while(false !== ($skin = readdir($dirs))):?>
<?php if(!strstr($skin,'.html') || !strstr($skin,'video-') || $skin == 'video-base.html')continue?>
<option value="<?php echo $skin?>"><?php echo $skin?></option>
<?php endwhile?>
<?php closedir($dirs)?>
</select>
</div>
<div class="iframebox">
<iframe name="_template_iframe_" src="<?php echo $g['dir_module']?>/modal/template/video-base.html" width="100%" height="100%" frameborder="0"></iframe>
</div>
<div class="optionbox">
<div class="text-center">
<button type="button" class="btn btn-primary" onclick="templateCheck();">삽입하기</button>
</div>
</div>
<?php endif?>
<?php endif?>
</div>
</div>
<?php endif?>
<!-- @부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->
<div id="_modal_header" hidden>
<ul class="nav nav-tabs border-bottom-0" style="margin-top: .1rem">
<?php if(!$dfiles && !$dropfield):?>
<li class="nav-item"><a class="nav-link" href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&iframe=Y&mdfile=modal.photo.media&dropfield=<?php echo $dropfield?>&dropfiles=<?php echo $dropfiles?>" target="_modal_iframe_modal_window">포토셋</a></li>
<?php endif?>
<li class="nav-item"><a class="nav-link active" href="#">비디오셋</a></li>
</ul>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div id="_modal_footer" hidden>
<button type="button" class="btn btn-primary pull-left" <?php if($album!='trash'):?>onclick="frames._modal_iframe_modal_window.getId('filefiled').click();"<?php else:?>disabled<?php endif?>><i class="fa fa-cloud-upload fa-lg"></i> PC동영상</button>
<button type="button" class="btn btn-primary pull-left" <?php if($album!='trash'):?>onclick="frames._modal_iframe_modal_window.vodAdd();"<?php else:?>disabled<?php endif?>><i class="fa fa-link fa-lg"></i> 외부동영상</button>
<?php if($album>0):?>
<button type="button" class="btn btn-light pull-left" onclick="frames._modal_iframe_modal_window.catDelete();">분류삭제</button>
<?php endif?>
<?php if($NUM>1):?>
<?php if($album>0):?>
<button type="button" class="btn btn-light pull-left" onclick="frames._modal_iframe_modal_window.orderCheck();">순서변경</button>
<?php endif?>
<?php endif?>
<?php if($NUM&&$album=='trash'):?>
<button type="button" class="btn btn-light pull-left" onclick="frames._modal_iframe_modal_window.deleteCheck(3,'');">휴지통비우기</button>
<?php endif?>
<button type="button" class="btn btn-light" data-dismiss="modal" aria-hidden="true" id="_modalclosebtn_">닫기</button>
<?php if($dropfield&&$dropfield!='editor'):?>
<button type="button" class="btn btn-danger" onclick="frames._modal_iframe_modal_window.fieldDrop();">적용하기</button>
<?php endif?>
</div>
<?php if($NUM>1&&$album>0):?>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/core.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/events.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/css.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/coordinates.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/drag.js"></script>
<script src="<?php echo $g['s']?>/_core/opensrc/tool-man/dragsort.js"></script>
<script>
var dragsort = ToolMan.dragsort();
dragsort.makeListSortable(getId("photoorder"));
</script>
<?php endif?>
<script>
var isGetVod = false;
function getVodPreview()
{
if (getId('_vod_embed_code_').value.indexOf('<iframe') == -1)
{
alert('유투브 iframe 소스를 입력해주세요. ');
getId('_vod_embed_code_').focus();
return false;
}
var gx1 = getId('_vod_embed_code_').value.split('src="');
var gx2 = gx1[1].split('"');
getId('_vod_play_layer_').innerHTML = '<iframe width="90%" src="'+gx2[0]+'" frameborder="0" allowfullscreen style="margin:15px;"></iframe>';
isGetVod = true;
}
function getVodSave()
{
if (isGetVod == false)
{
alert('동영상을 불러온 후 저장해 주세요. ');
return false;
}
//if (confirm('정말로 저장하시겠습니까? '))
//{
var f = document._upload_form1_;
f.submit();
//}
return false;
}
function vodAdd()
{
location.href = '<?php echo $g['base_href']?>&outlink=Y&album=<?php echo $album?>';
}
function getFiles()
{
for (var i = 0; i < parent.getId('_modal_footer_modal_window').children.length; i++)
{
parent.getId('_modal_footer_modal_window').children[i].disabled = true;
}
getId('progressBar').style.display = 'block';
var f = document._upload_form_;
f.submit();
}
function gridProgress()
{
setTimeout("location.reload();",1000);
}
function fieldDrop()
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
var s = '';
var x;
for (i = 0; i < n; i++)
{
if (l[i].checked == true)
{
j++;
x = l[i].value.split('|');
s += '['+x[0]+']';
}
}
if (!j)
{
alert('동영상을 선택해 주세요. ');
return false;
}
parent.getId('<?php echo $dropfield?>').value <?php if(!$dfiles):?>+<?php endif?>= s;
parent.$('#modal_window').modal('hide');
}
function AddAlbumRcheck(f)
{
if (f.name.value == '')
{
alert('분류명을 입력해 주세요. ');
f.name.focus();
return false;
}
return true;
}
function catDelete()
{
if (confirm('정말로 삭제하시겠습니까? '))
{
var f = document._upload_form_;
f.a.value = 'mediaset/category_delete';
f.submit();
}
return false;
}
function elementsCheck(members,flag)
{
var l = document.getElementsByName(members);
var n = l.length;
var i;
for (i = 0; i < n; i++)
{
if (flag == 'true')
{
l[i].checked = true;
}
else {
l[i].checked = false;
}
}
return false;
}
function deleteCheck(x,uid)
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
if (x == 3)
{
if (confirm('정말로 휴지통을 비우시겠습니까?'))
{
f.a.value = 'mediaset/files_empty_vod';
f.submit();
}
return false;
}
for (i = 0; i < n; i++)
{
if (x == 0)
{
gx = l[i].value.split('|');
if (uid != parseInt(gx[0])) l[i].checked = false;
else l[i].checked = true;
}
if (x == 2) l[i].checked = true;
if (l[i].checked == true)
{
j++;
}
}
if (x == 'move')
{
if (!j)
{
alert('이동할 동영상을 선택해 주세요.');
return false;
}
if (confirm('정말로 이동하시겠습니까?'))
{
f.a.value = 'mediaset/files_delete_vod';
f.dtype.value = x;
f.mcat.value = uid;
f.submit();
}
}
else if (x == 'delete')
{
if (!j)
{
alert('영구삭제할 동영상을 선택해 주세요.');
return false;
}
if (confirm('정말로 삭제하시겠습니까?'))
{
f.a.value = 'mediaset/files_delete_vod';
f.dtype.value = x;
f.submit();
}
}
else {
if (!j)
{
alert('삭제할 동영상을 선택해 주세요.');
return false;
}
if (confirm('정말로 삭제하시겠습니까?'))
{
f.a.value = 'mediaset/files_delete_vod';
f.submit();
}
}
return false;
}
function orderCheck()
{
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
if (confirm('정말로 변경하시겠습니까?'))
{
for (i = 0; i < n; i++)
{
l[i].checked = true;
}
f.a.value = 'mediaset/files_order';
f.submit();
}
return false;
}
function infoCheck()
{
var f = document.captionForm;
f.submit();
}
function photoCheck(uid)
{
}
function templateCheck()
{
var ifr = frames._template_iframe_;
if(ifr.select_tpl == '')
{
alert('적용할 템플릿을 선택해 주세요. ');
return false;
}
if (ifr.select_tpl == '__tpl__all')
{
var table = '';
var stable = ifr.document.getElementById(ifr.select_tpl).innerHTML;
var _stable = stable;
var _stable1 = '';
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
for (i = 0; i < n; i++)
{
val = l[i].value.split('|');
_stable = stable.replace('[VOD]',getId('vodsrc_'+val[0]).innerHTML).replace('[CAPTION]',getId('caption_'+val[0]).innerHTML);
_stable1 += _stable;
}
table = _stable1;
}
else {
var table = ifr.document.getElementById(ifr.select_tpl).innerHTML;
var f = document.photolistForm;
var l = document.getElementsByName('photomembers[]');
var n = l.length;
var i;
var j = 0;
var val;
for (i = 0; i < n; i++)
{
if(l[i].checked == true)
{
val = l[i].value.split('|');
table = table.replace('[VOD-'+j+']',getId('vodsrc_'+val[0]).innerHTML);
table = table.replace('[CAPTION-'+j+']',getId('caption_'+val[0]).innerHTML);
j++;
}
}
if(!j)
{
alert('적용할 동영상을 선택해 주세요. ');
return false;
}
}
parent.InserHTMLtoEditor(table);
parent.$('#modal_window').modal('hide');
}
function modalSetting()
{
parent.getId('modal_window_dialog_modal_window').style.position = 'absolute';
parent.getId('modal_window_dialog_modal_window').style.display = 'block';
parent.$('#modal_window_dialog_modal_window').css('max-width','100%');
parent.getId('modal_window_dialog_modal_window').style.padding = '0 20px 0 20px';
parent.getId('modal_window_dialog_modal_window').style.top = '0';
parent.getId('modal_window_dialog_modal_window').style.left = '0';
parent.getId('modal_window_dialog_modal_window').style.right = '0';
parent.getId('modal_window_dialog_modal_window').style.bottom = '0';
parent.getId('modal_window_dialog_modal_window').children[0].style.height = '100%';
parent.getId('_modal_header_modal_window').innerHTML = getId('_modal_header').innerHTML;
parent.getId('_modal_footer_modal_window').innerHTML = getId('_modal_footer').innerHTML;
parent.getId('_modal_header_modal_window').className = 'modal-header';
parent.getId('_modal_header_modal_window').style.height = '57px';
parent.getId('_modal_body_modal_window').style.position = 'absolute';
parent.getId('_modal_body_modal_window').style.display = 'block';
parent.getId('_modal_body_modal_window').style.paddingRight = '2px';
parent.getId('_modal_body_modal_window').style.top = '50px';
parent.getId('_modal_body_modal_window').style.left = '0';
parent.getId('_modal_body_modal_window').style.right = '0';
parent.getId('_modal_body_modal_window').style.bottom = '15px';
parent.getId('_modal_footer_modal_window').className = 'modal-footer';
parent.getId('_modal_footer_modal_window').style.position = 'absolute';
parent.getId('_modal_footer_modal_window').style.background = '#fff';
parent.getId('_modal_footer_modal_window').style.width = '100%';
parent.getId('_modal_footer_modal_window').style.bottom = '0';
parent.getId('_modal_iframe_modal_window').style.overflow = 'hidden';
parent.getId('_modal_iframe_modal_window').scrolling = 'no';
}
modalSetting();
$('.selectpicker').selectpicker();
</script>
<!-- 부모레이어를 제어할 수 있도록 모달의 헤더와 풋터를 부모레이어에 출력시킴 -->

View File

@@ -0,0 +1,397 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>미디어삽입 미리보기 -kimsQ Rb 2.0</title>
<style type="text/css">
.hide {display:none;}
.container {padding-top:15px;margin-bottom:15px;}
.preview-box {float:left;width:100px;height:70px;margin:0 11px 20px 0;border:#dfdfdf solid 5px;cursor:pointer;}
.preview-box div {text-align:center;font-size:12px;font-weight:bold;color:#666;padding-top:20px;}
.preview-box div span {display:block;font-size:11px;font-weight:normal;font-family:dotum;padding-top:5px;color:#888;}
.active {border:#428BCA solid 5px;}
</style>
<script>
var select_tpl = '__tpl__1000';
function tplcheck(num,obj)
{
select_tpl = '__tpl__' + num;
var rbody = document.getElementById('rb-body');
var x = rbody.children[0];
var n = rbody.children[0].children.length;
var i;
for (i = 0; i < n; i++)
{
if (x.children[i].className != 'hide')
{
x.children[i].style.border = '#dfdfdf solid 5px';
}
}
obj.style.border = '#428BCA solid 5px';
}
</script>
</head>
<body id="rb-body">
<div class="container">
<!-- 전체사진-->
<div class="preview-box" onclick="tplcheck('all',this);">
<div>전체사진<span>일열출력</span></div>
</div>
<div id="__tpl__all" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[A]<img alt="[ALT]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:1&image=[SRC]">[/A]</div>
</div>
<div class="rb-caption">[CAPTION]</div>
</div>
</div>
<!-- 1장(1000)-->
<div class="preview-box active" onclick="tplcheck('1000',this);">
<div>1장</div>
</div>
<div id="__tpl__1000" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:1&image=[SRC-0]">[/A-0]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 2장(2000)-->
<div class="preview-box" onclick="tplcheck('2000',this);">
<div>2장<span>(상1/하1)</span></div>
</div>
<div id="__tpl__2000" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.3&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-12">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.3&image=[SRC-1]">[/A-1]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 2장(0101)-->
<div class="preview-box" onclick="tplcheck('1010',this);">
<div>2장<span>(좌1/우1)</span></div>
</div>
<div id="__tpl__1010" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:1.3&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-6">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:1.3&image=[SRC-1]">[/A-1]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 3장(0201)-->
<div class="preview-box" onclick="tplcheck('0201',this);">
<div>3장<span>(좌1/우2)</span></div>
</div>
<div id="__tpl__0201" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-8">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:1.2&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-7">
<div class="row">
<div class="col-sm-12">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.85&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-12">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.85&image=[SRC-2]">[/A-2]</div>
</div>
</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 3장(1020)-->
<div class="preview-box" onclick="tplcheck('1020',this);">
<div>3장<span>(상1/하2)</span></div>
</div>
<div id="__tpl__1020" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2.5:1&image=[SRC-0]">[/A-0]</div>
</div>
<div class="row">
<div class="col-sm-6">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2:1&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-6">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2:1&image=[SRC-2]">[/A-2]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 4장(1030)-->
<div class="preview-box" onclick="tplcheck('1030',this);">
<div>4장<span>(상1/하3)</span></div>
</div>
<div id="__tpl__1030" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2.5:1&image=[SRC-0]">[/A-0]</div>
</div>
<div class="row">
<div class="col-sm-5">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2:1&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-5">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2:1&image=[SRC-2]">[/A-2]</div>
<div class="col-sm-5">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2:1&image=[SRC-3]">[/A-3]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 4장(0301)-->
<div class="preview-box" onclick="tplcheck('0301',this);">
<div>4장<span>(좌1/우3)</span></div>
</div>
<div id="__tpl__0301" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-10">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:1.3&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-9">
<div class="row">
<div class="col-sm-12">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-12">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-2]">[/A-2]</div>
<div class="col-sm-12">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-3]">[/A-3]</div>
</div>
</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 4장(1111)-->
<div class="preview-box" onclick="tplcheck('1111',this);">
<div>4장<span>(좌2/우2)</span></div>
</div>
<div id="__tpl__1111" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-6">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-1]">[/A-1]</div>
</div>
<div class="row">
<div class="col-sm-6">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-2]">[/A-2]</div>
<div class="col-sm-6">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-3]">[/A-3]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 4장(121)-->
<div class="preview-box" onclick="tplcheck('121',this);">
<div>4장<span>(상1/중2/하1)</span></div>
</div>
<div id="__tpl__121" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2.5:1&image=[SRC-0]">[/A-0]</div>
</div>
<div class="row">
<div class="col-sm-6">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2:1&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-6">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2:1&image=[SRC-2]">[/A-2]</div>
</div>
<div class="row">
<div class="col-sm-12">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=2.5:1&image=[SRC-3]">[/A-3]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 5장(23)-->
<div class="preview-box" onclick="tplcheck('23',this);">
<div>5장<span>(상2/하3)</span></div>
</div>
<div id="__tpl__23" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-6">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-1]">[/A-1]</div>
</div>
<div class="row">
<div class="col-sm-5">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1.5:1&image=[SRC-2]">[/A-2]</div>
<div class="col-sm-5">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1.5:1&image=[SRC-3]">[/A-3]</div>
<div class="col-sm-5">[A-4]<img alt="[ALT-4]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1.5:1&image=[SRC-4]">[/A-4]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 5장(0302)-->
<div class="preview-box" onclick="tplcheck('0302',this);">
<div>5장<span>(좌2/우3)</span></div>
</div>
<div id="__tpl__0302" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.75&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-12">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.76&image=[SRC-1]">[/A-1]</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-2]">[/A-2]</div>
<div class="col-sm-12">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-3]">[/A-3]</div>
<div class="col-sm-12">[A-4]<img alt="[ALT-4]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.5&image=[SRC-4]">[/A-4]</div>
</div>
</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 6장(3030)-->
<div class="preview-box" onclick="tplcheck('3030',this);">
<div>6장<span>(상3/하3)</span></div>
</div>
<div id="__tpl__3030" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-5">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-5">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-5">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-2]">[/A-2]</div>
</div>
<div class="row">
<div class="col-sm-5">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-3]">[/A-3]</div>
<div class="col-sm-5">[A-4]<img alt="[ALT-4]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-4]">[/A-4]</div>
<div class="col-sm-5">[A-5]<img alt="[ALT-5]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-5]">[/A-5]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 8장(4040)-->
<div class="preview-box" onclick="tplcheck('4040',this);">
<div>8장<span>(상4/하4)</span></div>
</div>
<div id="__tpl__4040" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-4">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-4">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-4">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-2]">[/A-2]</div>
<div class="col-sm-4">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-3]">[/A-3]</div>
</div>
<div class="row">
<div class="col-sm-4">[A-4]<img alt="[ALT-4]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-4]">[/A-4]</div>
<div class="col-sm-4">[A-5]<img alt="[ALT-5]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-5]">[/A-5]</div>
<div class="col-sm-4">[A-6]<img alt="[ALT-6]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-6]">[/A-6]</div>
<div class="col-sm-4">[A-7]<img alt="[ALT-7]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-7]">[/A-7]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 10장(5050)-->
<div class="preview-box" onclick="tplcheck('5050',this);">
<div>10장<span>(상5/하5)</span></div>
</div>
<div id="__tpl__5050" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-3">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-3">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-3">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-2]">[/A-2]</div>
<div class="col-sm-3">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-3]">[/A-3]</div>
<div class="col-sm-3">[A-4]<img alt="[ALT-4]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-4]">[/A-4]</div>
</div>
<div class="row">
<div class="col-sm-3">[A-5]<img alt="[ALT-5]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-5]">[/A-5]</div>
<div class="col-sm-3">[A-6]<img alt="[ALT-6]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-6]">[/A-6]</div>
<div class="col-sm-3">[A-7]<img alt="[ALT-7]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-7]">[/A-7]</div>
<div class="col-sm-3">[A-8]<img alt="[ALT-8]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-8]">[/A-8]</div>
<div class="col-sm-3">[A-9]<img alt="[ALT-9]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-9]">[/A-9]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 12장(6060)-->
<div class="preview-box" onclick="tplcheck('6060',this);">
<div>12장<span>(상6/하6)</span></div>
</div>
<div id="__tpl__6060" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-2">[A-0]<img alt="[ALT-0]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-0]">[/A-0]</div>
<div class="col-sm-2">[A-1]<img alt="[ALT-1]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-1]">[/A-1]</div>
<div class="col-sm-2">[A-2]<img alt="[ALT-2]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-2]">[/A-2]</div>
<div class="col-sm-2">[A-3]<img alt="[ALT-3]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-3]">[/A-3]</div>
<div class="col-sm-2">[A-4]<img alt="[ALT-4]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-4]">[/A-4]</div>
<div class="col-sm-2">[A-5]<img alt="[ALT-5]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-5]">[/A-5]</div>
</div>
<div class="row">
<div class="col-sm-2">[A-6]<img alt="[ALT-6]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-6]">[/A-6]</div>
<div class="col-sm-2">[A-7]<img alt="[ALT-7]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-7]">[/A-7]</div>
<div class="col-sm-2">[A-8]<img alt="[ALT-8]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-8]">[/A-8]</div>
<div class="col-sm-2">[A-9]<img alt="[ALT-9]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-9]">[/A-9]</div>
<div class="col-sm-2">[A-10]<img alt="[ALT-10]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-10]">[/A-10]</div>
<div class="col-sm-2">[A-11]<img alt="[ALT-11]" class="img-responsive" src="[ROOTURL]/_core/opensrc/thumb/image.php?width=800&height=&cropratio=1:0.8&image=[SRC-11]">[/A-11]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,291 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>미디어삽입 미리보기 -kimsQ Rb 2.0</title>
<style type="text/css">
.hide {display:none;}
.container {padding-top:15px;margin-bottom:15px;}
.preview-box {float:left;width:100px;height:70px;margin:0 11px 20px 0;border:#dfdfdf solid 5px;cursor:pointer;}
.preview-box div {text-align:center;font-size:12px;font-weight:bold;color:#666;padding-top:20px;}
.preview-box div span {display:block;font-size:11px;font-weight:normal;font-family:dotum;padding-top:5px;color:#888;}
.active {border:#428BCA solid 5px;}
</style>
<script>
var select_tpl = '__tpl__1000';
function tplcheck(num,obj)
{
select_tpl = '__tpl__' + num;
var rbody = document.getElementById('rb-body');
var x = rbody.children[0];
var n = rbody.children[0].children.length;
var i;
for (i = 0; i < n; i++)
{
if (x.children[i].className != 'hide')
{
x.children[i].style.border = '#dfdfdf solid 5px';
}
}
obj.style.border = '#428BCA solid 5px';
}
</script>
</head>
<body id="rb-body">
<div class="container">
<!-- 전체비디오-->
<div class="preview-box" onclick="tplcheck('all',this);">
<div>전체비디오<span>일열출력</span></div>
</div>
<div id="__tpl__all" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[VOD]</div>
</div>
<div class="rb-caption">[CAPTION]</div>
</div>
</div>
<!-- 1개(1000)-->
<div class="preview-box active" onclick="tplcheck('1000',this);">
<div>1개</div>
</div>
<div id="__tpl__1000" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[VOD-0]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 2개(2000)-->
<div class="preview-box" onclick="tplcheck('2000',this);">
<div>2개<span>(2열)</span></div>
</div>
<div id="__tpl__2000" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[VOD-0]</div>
<div class="col-sm-12">[VOD-1]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 2개(0101)-->
<div class="preview-box" onclick="tplcheck('0101',this);">
<div>2개<span>(2행)</span></div>
</div>
<div id="__tpl__1010" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">[VOD-0]</div>
<div class="col-sm-6">[VOD-1]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 3개(0201)-->
<div class="preview-box" onclick="tplcheck('0201',this);">
<div>3개<span>(좌1/우2)</span></div>
</div>
<div id="__tpl__0201" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-7">[VOD-0]</div>
<div class="col-sm-5">
<div class="row">
<div class="col-sm-12">[VOD-0]</div>
<div class="col-sm-12">[VOD-1]</div>
</div>
</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 3개(2010)-->
<div class="preview-box" onclick="tplcheck('2010',this);">
<div>3개<span>(상2/하1)</span></div>
</div>
<div id="__tpl__2010" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[VOD-0]</div>
</div>
<div class="row">
<div class="col-sm-6">[VOD-1]</div>
<div class="col-sm-6">[VOD-2]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 4개(1030)-->
<div class="preview-box" onclick="tplcheck('1030',this);">
<div>4개<span>(상1/하3)</span></div>
</div>
<div id="__tpl__1030" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[VOD-0]</div>
</div>
<div class="row">
<div class="col-sm-4">[VOD-1]</div>
<div class="col-sm-4">[VOD-2]</div>
<div class="col-sm-4">[VOD-3]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 4개(0301)-->
<div class="preview-box" onclick="tplcheck('0301',this);">
<div>4개<span>(좌1/우3)</span></div>
</div>
<div id="__tpl__0301" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">[VOD-0]</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">[VOD-1]</div>
<div class="col-sm-12">[VOD-2]</div>
<div class="col-sm-12">[VOD-3]</div>
</div>
</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 4개(1111)-->
<div class="preview-box" onclick="tplcheck('1111',this);">
<div>4개<span>(좌2/우2)</span></div>
</div>
<div id="__tpl__1111" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">[VOD-0]</div>
<div class="col-sm-6">[VOD-1]</div>
</div>
<div class="row">
<div class="col-sm-6">[VOD-2]</div>
<div class="col-sm-6">[VOD-3]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 4개(121)-->
<div class="preview-box" onclick="tplcheck('121',this);">
<div>4개<span>(상1/중2/하1)</span></div>
</div>
<div id="__tpl__121" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-12">[VOD-0]</div>
</div>
<div class="row">
<div class="col-sm-6">[VOD-1]</div>
<div class="col-sm-6">[VOD-2]</div>
</div>
<div class="row">
<div class="col-sm-12">[VOD-3]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 5개(23)-->
<div class="preview-box" onclick="tplcheck('23',this);">
<div>5개<span>(상2/하3)</span></div>
</div>
<div id="__tpl__23" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">[VOD-0]</div>
<div class="col-sm-6">[VOD-1]</div>
</div>
<div class="row">
<div class="col-sm-4">[VOD-2]</div>
<div class="col-sm-4">[VOD-3]</div>
<div class="col-sm-4">[VOD-4]</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
<!-- 5개(0302)-->
<div class="preview-box" onclick="tplcheck('0302',this);">
<div>5개<span>(좌2/우3)</span></div>
</div>
<div id="__tpl__0302" class="hide">
<div class="rb-insert-media">
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">[VOD-0]</div>
<div class="col-sm-12">[VOD-1]</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">[VOD-2]</div>
<div class="col-sm-12">[VOD-3]</div>
<div class="col-sm-12">[VOD-4]</div>
</div>
</div>
</div>
<div class="rb-caption">[CAPTION-0]</div>
</div>
</div>
</div>
</body>
</html>