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,29 @@
<?php
$license_local = $g['path_module'].$module.'/LICENSE';
$license_global = $g['path_root'].'LICENSE';
if (file_exists($license_local)) $license = $license_local;
else $license = $license_global;
?>
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
<?php @include $g['path_module'].$module.'/var/var.moduleinfo.php' ?>
<article class="rb-docs markdown-body px-5 pt-3">
<h1><?php echo sprintf('%s 모듈정보',ucfirst($MD['name']))?></h1>
<div class="pb-5 readme">
<?php readfile($g['path_module'].$module.'/README.md')?>
</div>
<div class="pb-5">
<h2>라이센스</h2>
<textarea class="form-control" rows="10"><?php readfile($license)?></textarea>
</div>
</article>
<script type="text/javascript">
$(".markdown-body .readme").markdown();
</script>

View File

View File

@@ -0,0 +1,278 @@
<?php
$g['mediasetVarForSite'] = $g['path_var'].'site/'.$r.'/'.$module.'.var.php';
include_once file_exists($g['mediasetVarForSite']) ? $g['mediasetVarForSite'] : $g['path_module'].$module.'/var/var.php';
?>
<div id="configbox" class="p-4">
<form name="procForm" action="<?php echo $g['s']?>/" method="post" onsubmit="return saveCheck(this);">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="config">
<input type="hidden" name="ftp_connect" value="<?php echo $d['mediaset']['use_fileserver']?>">
<input type="hidden" name="maxsize_file" value="<?php echo $d['mediaset']['maxsize_file']?>">
<h4>파일첨부 설정</h4>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">파일 첨부</label>
<div class="col-sm-10">
<div class="row">
<div class="col-sm-3">
<div class="input-group">
<input type="number" name="maxnum_file" value="<?php echo $d['mediaset']['maxnum_file']?>" class="form-control">
<div class="input-group-append">
<span class="input-group-text">개</span>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="input-group">
<input type="number" name="maxsize_mb" value="" class="form-control" onChange="mbConverter()">
<div class="input-group-append">
<span class="input-group-text">MB이내</span>
</div>
</div>
</div>
</div>
<small class="form-text text-muted"><?php echo sprintf('현재 서버에서 허용하고 있는 1회 최대 첨부용량은 <code>%sMB</code>입니다.',str_replace('M','',ini_get('upload_max_filesize')))?></small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">최대 사진 사이즈</label>
<div class="col-sm-10">
<div class="row">
<div class="col-sm-3">
<div class="input-group">
<input type="number" name="thumbsize" value="<?php echo $d['mediaset']['thumbsize']?>" class="form-control">
<div class="input-group-append">
<span class="input-group-text">픽셀</span>
</div>
</div>
</div>
</div>
<small class="form-text text-muted">
사진파일 업로드시 사진의 사이즈가 기준점을 초과할 경우 자동으로 리사이징 됩니다.
</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">파일 저장소</label>
<div class="col-sm-10">
<div class="row">
<div class="col-sm-3">
<select name="use_fileserver" class="form-control custom-select" onchange="serverChange(this);">
<option value=""<?php if(!$d['mediaset']['use_fileserver']):?> selected<?php endif?>>현재서버</option>
<option value="2"<?php if($d['mediaset']['use_fileserver']==2):?> selected<?php endif?>>AWS S3</option>
</select>
</div>
</div>
<small class="form-text text-muted">
첨부물(사진 또는 파일)이 많은 경우, <a href="https://aws.amazon.com/ko/s3/?nc2=h_m1" target="_blank">AWS S3</a> 사용을 권장합니다.
</small>
</div>
</div>
<div id="use_awss3"<?php if($d['mediaset']['use_fileserver']!=2):?> class="d-none"<?php endif?>>
<div class="page-header">
<h4>AWS S3 설정 <small class="text-muted ml-2">Amazon Simple Storage Service</small> </h4>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">액세스 키 ID</label>
<div class="col-sm-8">
<input type="text" name="s3_key" value="<?php echo $d['mediaset']['S3_KEY']?>" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">비밀 액세스 키</label>
<div class="col-sm-8">
<input type="text" name="s3_sec" value="<?php echo $d['mediaset']['S3_SEC']?>" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">리전</label>
<div class="col-sm-8">
<input type="text" name="s3_region" value="<?php echo $d['mediaset']['S3_REGION']?>" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-sm-right">버킷</label>
<div class="col-sm-8">
<input type="text" name="s3_bucket" value="<?php echo $d['mediaset']['S3_BUCKET']?>" class="form-control">
</div>
</div>
<div class="row">
<div class="col-sm-2"></div>
<div class="col-sm-8">
<div class="card f12 text-muted">
<div class="card-body">
<p>Amazon Simple Storage Service(Amazon S3)는 업계 최고의 확장성과 데이터 가용성 및 보안과 성능을 제공하는 객체 스토리지 서비스입니다. 즉, 어떤 규모 어떤 산업의 고객이든 이 서비스를 사용하여 웹 사이트, 모바일 애플리케이션, 백업 및 복원, 아카이브, 엔터프라이즈 애플리케이션, IoT 디바이스, 빅 데이터 분석 등과 같은 다양한 사용 사례에서 원하는 만큼의 데이터를 저장하고 보호할 수 있습니다. Amazon S3는 사용하기 쉬운 관리 기능을 제공하므로 특정 비즈니스, 조직 및 규정 준수 요구 사항에 따라 데이터를 조직화하고 세부적인 액세스 제어를 구성할 수 있습니다. Amazon S3는 99.999999999%의 내구성을 제공하도록 설계되었으며, 전 세계 기업의 수백만 애플리케이션을 위한 데이터를 저장합니다.</p>
<a href="https://s3.console.aws.amazon.com" target="_blank" class="btn btn-light">S3 콘솔접속</a>
<a href="https://aws.amazon.com/ko/s3/?nc2=h_m1" target="_blank" class="btn btn-light">자세히 보기</a>
</div>
</div>
</div>
</div>
</div>
<button type="submit" class="btn btn-outline-primary btn-block btn-lg my-4">저장하기</button>
</form>
</div>
<script>
function mbConverter(){
document.procForm.maxsize_file.value = document.procForm.maxsize_mb.value * 1024 * 1024
}
function byteConverter(){
document.procForm.maxsize_mb.value = document.procForm.maxsize_file.value / (1024*1024)
}
function serverChange(obj)
{
if (obj.value == '1') {
$('#use_ftpserver').removeClass('d-none')
$('#use_awss3').addClass('d-none')
} else if (obj.value == '2') {
$('#use_ftpserver').addClass('d-none')
$('#use_awss3').removeClass('d-none')
} else {
$('#use_ftpserver').addClass('d-none')
$('#use_awss3').addClass('d-none')
}
}
var submitFlag = false;
function sendCheck(id)
{
if (submitFlag == true)
{
alert('응답을 기다리는 중입니다. 잠시 기다려 주세요.');
return false;
}
var f = document.procForm;
if (f.ftp_host.value == '')
{
alert('FTP 서버주소를 입력해 주세요. ');
f.ftp_host.focus();
return false;
}
if (f.ftp_port.value == '')
{
alert('FTP 포트번호를 입력해 주세요. ');
f.ftp_port.focus();
return false;
}
if (f.ftp_user.value == '')
{
alert('FTP 아이디를 입력해 주세요. ');
f.ftp_user.focus();
return false;
}
if (f.ftp_pass.value == '')
{
alert('FTP 암호를 입력해 주세요. ');
f.ftp_pass.focus();
return false;
}
if (f.ftp_folder.value == '')
{
alert('첨부할 폴더경로를 입력해 주세요. ');
f.ftp_folder.focus();
return false;
}
if (f.ftp_urlpath.value == '')
{
alert('URL 접속주소를 입력해 주세요. ');
f.ftp_urlpath.focus();
return false;
}
mbConverter()
f.a.value = 'ftp_check';
getId(id).innerHTML = '<i class="fa fa-spinner fa-spin"></i>';
getIframeForAction(f);
f.submit();
submitFlag = true;
}
function saveCheck(f)
{
if (f.use_fileserver.value == '1')
{
if (f.ftp_host.value == '')
{
alert('FTP 서버주소를 입력해 주세요. ');
f.ftp_host.focus();
return false;
}
if (f.ftp_port.value == '')
{
alert('FTP 포트번호를 입력해 주세요. ');
f.ftp_port.focus();
return false;
}
if (f.ftp_user.value == '')
{
alert('FTP 아이디를 입력해 주세요. ');
f.ftp_user.focus();
return false;
}
if (f.ftp_pass.value == '')
{
alert('FTP 암호를 입력해 주세요. ');
f.ftp_pass.focus();
return false;
}
if (f.ftp_folder.value == '')
{
alert('첨부할 폴더경로를 입력해 주세요. ');
f.ftp_folder.focus();
return false;
}
if (f.ftp_urlpath.value == '')
{
alert('URL 접속주소를 입력해 주세요. ');
f.ftp_urlpath.focus();
return false;
}
}
// if (f.ftp_connect.value == '')
// {
// alert('FTP가 연결되는지 확인해 주세요. ');
// return false;
// }
getIframeForAction(f);
}
function ftp_select(obj)
{
if (obj.value == '') obj.form.ftp_port.value = '21';
else obj.form.ftp_port.value = '22';
}
$('[data-role="siteSelector"]').removeClass('d-none'); //사이트 셀렉터 출력
putCookieAlert('mediaset_config_result'); // 실행결과 알림 메시지 출력
byteConverter();
</script>

View File

@@ -0,0 +1,100 @@
#uplist .table th,
#uplist .table td {
text-align: center;
}
#uplist .table th.rb-left,
#uplist .table td.rb-left {
text-align: left;
}
#uplist .rb-none {
text-align: center;
color: #999
}
#uplist .row {
margin-right: -5px;
margin-left: -5px;
}
#uplist .row [class*="col-"] {
padding-right: 5px !important;
padding-left: 5px !important;
}
@media (max-width: 767px) {
#uplist .row [class*="col-"] {
margin-bottom: 10px
}
}
#uplist .pagination {
margin: 0
}
#uplist .rb-heading .btn {
font-size: 12px;
}
#uplist .rb-heading {
margin-bottom: 20px
}
#uplist .rb-heading > .form-group:last-child {
margin-bottom: 0
}
#uplist .rb-heading .rb-advance.btn.collapsed small:before {
content: "▼";
}
#uplist .rb-heading .rb-advance.btn small:before {
content: "▲";
}
#uplist .rb-footer {
border-top: 1px solid #eee;
margin: 20px 0;
padding: 20px 0
}
@media (max-width: 479px) {
#uplist .rb-footer div {
float: none !important
}
}
@media (min-width: 768px) {
#uplist .rb-year,
#uplist .rb-month,
#uplist .rb-day {
display: block;
}
}
@media (min-width: 768px) {
#uplist .rb-year {
float: left;
width: 100px;
margin-right: 5px
}
#uplist .rb-month {
float: left;
width: 80px;
margin-right: 5px
}
#uplist .rb-day {
float: left;
width: 100px;
margin-right: 5px
}
}

View File

@@ -0,0 +1,406 @@
<?php
include $g['path_module'].$module.'/function.php';
$SITES = getDbArray($table['s_site'],'','*','gid','asc',0,1);
$sort = $sort ? $sort : 'gid';
$orderby= $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 201 ? $recnum : 20;
$account = $SD['uid'];
$sqlque = 'uid';
$sqlque .= ' and site='.$account;
if ($d_start) $sqlque .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
if ($d_finish) $sqlque .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
if ($filekind)
{
if ($filekind == 1)
{
if ($filetype == 2) $sqlque .= ' and type<0';
else $sqlque .= ' and (type=-1 or type=2)';
}
else if ($filekind == 2)
{
if ($filetype == 2) $sqlque .= ' and type=0';
else $sqlque .= ' and (type=0 or type=5)';
}
else
{
if ($filetype) $sqlque .= ' and fileonly=0';
else $sqlque .= ' and fileonly=1';
}
}
else {
if ($filetype)
{
if ($filetype == 1) $sqlque .= ' and type>0';
else $sqlque .= ' and type<1';
}
}
if ($fserver)
{
if ($fserver == 1) $sqlque .= ' and fserver=0';
else $sqlque .= ' and fserver=1';
}
if ($where && $keyw)
{
if (strstr('[mbruid]',$where)) $sqlque .= " and ".$where."='".$keyw."'";
else $sqlque .= getSearchSql($where,$keyw,$ikeyword,'or');
}
$RCD = getDbArray($table['s_upload'],$sqlque,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table['s_upload'],$sqlque);
$TPG = getTotalPage($NUM,$recnum);
?>
<div id="uplist" class="">
<form name="procForm" action="<?php echo $g['s']?>/" method="get" class="form-horizontal">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $m?>">
<input type="hidden" name="module" value="<?php echo $module?>">
<input type="hidden" name="front" value="<?php echo $front?>">
<div class="p-3">
<div class="form-group row">
<label class="col-md-1 col-form-label text-md-center">필터</label>
<div class="col-md-11 col-lg-10">
<div class="form-row">
<div class="col-sm-3">
<select name="filekind" class="form-control custom-select" onchange="this.form.submit();">
<option value="">파일종류(전체)</option>
<option value="1"<?php if($filekind==1):?> selected<?php endif?>>사진</option>
<option value="2"<?php if($filekind==2):?> selected<?php endif?>>동영상</option>
<option value="3"<?php if($filekind==3):?> selected<?php endif?>>기타</option>
</select>
</div>
<div class="col-sm-3">
<select name="filetype" class="form-control custom-select" onchange="this.form.submit();">
<option value="">첨부방식(전체)</option>
<option value="1"<?php if($filetype==1):?> selected<?php endif?>>직접첨부</option>
<option value="2"<?php if($filetype==2):?> selected<?php endif?>>외부링크</option>
</select>
</div>
<div class="col-sm-3">
<select name="fserver" class="form-control custom-select" onchange="this.form.submit();">
<option value="">첨부서버(전체)</option>
<option value="1"<?php if($fserver==1):?> selected<?php endif?>>현재서버</option>
<option value="2"<?php if($fserver==2):?> selected<?php endif?>>원격서버</option>
</select>
</div>
</div>
</div>
</div>
<div id="search-more" class="collapse<?php if($_SESSION['sh_mediaset']):?> show<?php endif?>">
<div class="form-group row">
<label class="col-md-1 col-form-label text-md-center">기간</label>
<div class="col-md-11 col-lg-10">
<div class="form-row">
<div class="col-sm-6">
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="form-control" name="d_start" placeholder="시작일 선택" value="<?php echo $d_start?>">
<span class="input-group-addon px-2 text-muted border-0" style="background-color: transparent">~</span>
<input type="text" class="form-control" name="d_finish" placeholder="종료일 선택" value="<?php echo $d_finish?>">
<span class="input-group-append">
<button class="btn btn-light" type="submit">기간적용</button>
</span>
</div>
</div>
<div class="col-sm-6">
<span class="button-group">
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo date('Y/m/d',mktime(0,0,0,substr($date['today'],4,2),substr($date['today'],6,2)-1,substr($date['today'],0,4)))?>','<?php echo date('Y/m/d',mktime(0,0,0,substr($date['today'],4,2),substr($date['today'],6,2)-1,substr($date['today'],0,4)))?>');">어제</button>
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo getDateFormat($date['today'],'Y/m/d')?>','<?php echo getDateFormat($date['today'],'Y/m/d')?>');">오늘</button>
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo date('Y/m/d',mktime(0,0,0,substr($date['today'],4,2),substr($date['today'],6,2)-7,substr($date['today'],0,4)))?>','<?php echo getDateFormat($date['today'],'Y/m/d')?>');">일주</button>
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo date('Y/m/d',mktime(0,0,0,substr($date['today'],4,2)-1,substr($date['today'],6,2),substr($date['today'],0,4)))?>','<?php echo getDateFormat($date['today'],'Y/m/d')?>');">한달</button>
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo getDateFormat(substr($date['today'],0,6).'01','Y/m/d')?>','<?php echo getDateFormat($date['today'],'Y/m/d')?>');">당월</button>
<button class="btn btn-light" type="button" onclick="dropDate('<?php echo date('Y/m/',mktime(0,0,0,substr($date['today'],4,2)-1,substr($date['today'],6,2),substr($date['today'],0,4)))?>01','<?php echo date('Y/m/',mktime(0,0,0,substr($date['today'],4,2)-1,substr($date['today'],6,2),substr($date['today'],0,4)))?>31');">전월</button>
<button class="btn btn-light" type="button" onclick="dropDate('','');">전체</button>
</span>
</div>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-md-1 col-form-label text-md-center">정렬</label>
<div class="col-md-11 col-lg-10">
<div class="btn-toolbar">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-light<?php if($sort=='gid'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
<input type="radio" value="gid" name="sort"<?php if($sort=='gid'):?> checked<?php endif?>> 등록일
</label>
<label class="btn btn-light<?php if($sort=='down'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
<input type="radio" value="down" name="sort"<?php if($sort=='down'):?> checked<?php endif?>> 다운로드
</label>
<label class="btn btn-light<?php if($sort=='size'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
<input type="radio" value="size" name="sort"<?php if($sort=='size'):?> checked<?php endif?>> 사이즈
</label>
<label class="btn btn-light<?php if($sort=='width'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
<input type="radio" value="width" name="sort"<?php if($sort=='width'):?> checked<?php endif?>> 가로
</label>
<label class="btn btn-light<?php if($sort=='height'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
<input type="radio" value="height" name="sort"<?php if($sort=='height'):?> checked<?php endif?>> 세로
</label>
</div>
<div class="btn-group btn-group-toggle ml-2" data-toggle="buttons">
<label class="btn btn-light<?php if($orderby=='desc'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
<input type="radio" value="desc" name="orderby"<?php if($orderby=='desc'):?> checked<?php endif?>> <i class="fa fa-sort-amount-desc"></i> 역순
</label>
<label class="btn btn-light<?php if($orderby=='asc'):?> active<?php endif?>" onclick="btnFormSubmit(this);">
<input type="radio" value="asc" name="orderby"<?php if($orderby=='asc'):?> checked<?php endif?>> <i class="fa fa-sort-amount-asc"></i> 정순
</label>
</div>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-md-1 col-form-label text-md-center">검색</label>
<div class="col-md-10 col-lg-10">
<div class="input-group">
<span class="input-group-prepend">
<select name="where" class="form-control custom-select">
<option value="name"<?php if($where=='name'):?> selected="selected"<?php endif?>>파일명</option>
<option value="caption"<?php if($where=='caption'):?> selected="selected"<?php endif?>>캡션</option>
<option value="ext"<?php if($where=='ext'):?> selected="selected"<?php endif?>>확장자</option>
<option value="mbruid"<?php if($where=='mbruid'):?> selected="selected"<?php endif?>>회원UID</option>
</select>
</span>
<input type="text" name="keyw" value="<?php echo stripslashes($keyw)?>" class="form-control">
<span class="input-group-append">
<button class="btn btn-light" type="submit">검색</button>
</span>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-md-1 col-form-label text-md-center">출력</label>
<div class="col-md-11 col-lg-10">
<div class="row">
<div class="col-sm-2">
<select name="recnum" onchange="this.form.submit();" class="form-control custom-select">
<option value="20"<?php if($recnum==20):?> selected="selected"<?php endif?>><?php echo sprintf('%d개',20)?></option>
<option value="35"<?php if($recnum==35):?> selected="selected"<?php endif?>><?php echo sprintf('%d개',35)?></option>
<option value="50"<?php if($recnum==50):?> selected="selected"<?php endif?>><?php echo sprintf('%d개',50)?></option>
<option value="75"<?php if($recnum==75):?> selected="selected"<?php endif?>><?php echo sprintf('%d개',75)?></option>
<option value="90"<?php if($recnum==90):?> selected="selected"<?php endif?>><?php echo sprintf('%d개',90)?></option>
</select>
</div>
<div class="col-sm-2">
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="offset-sm-1 col-sm-10">
<button type="button" class="btn btn-link muted-link rb-advance<?php if(!$_SESSION['sh_mediaset']):?> collapsed<?php endif?>" data-toggle="collapse" data-target="#search-more" onclick="sessionSetting('sh_mediaset','1','','1');">고급검색 <small></small></button>
<a href="<?php echo $g['adm_href']?>" class="btn btn-link muted-link">초기화</a>
</div>
</div>
</div>
</form>
<div class="mb-2 px-3">
<small><?php echo number_format($NUM)?> 개</small>
<span class="badge badge-dark"><?php echo $p?>/<?php echo $TPG.($TPG>1?'pages':'page')?></span>
</div>
<form name="listForm" action="<?php echo $g['s']?>/" method="post">
<input type="hidden" name="r" value="<?php echo $r?>">
<input type="hidden" name="m" value="<?php echo $module?>">
<input type="hidden" name="a" value="">
<div class="">
<table class="table table-striped f13">
<thead class="text-muted">
<tr>
<th><label data-tooltip="tooltip" title="선택"><input type="checkbox" class="checkAll-file-user"></label></th>
<th>번호</th>
<th class="rb-left">파일명</th>
<th>소유자</th>
<th>서버</th>
<th>폴더</th>
<th>사이즈</th>
<th>다운</th>
<th>날짜</th>
</tr>
</thead>
<tbody>
<?php $_i=0;while($R=db_fetch_array($RCD)):?>
<?php $file_ext=$R['ext']?>
<tr>
<td><input type="checkbox" name="upfile_members[]" value="<?php echo $R['uid']?>" class="rb-file-user" onclick="checkboxCheck();"></td>
<td>
<?php echo $NUM-((($p-1)*$recnum)+$_rec++)?>
</td>
<td class="rb-left">
<i class="fa fa-file-image-o fa-fw" data-tooltip="tooltip" title="<?php echo $file_ext?>"></i>
<a href="<?php echo $R['src']?>" target="_blank"><?php echo $R['name']?></a>
</td>
<?php if($R['mbruid']):?>
<?php $M=getDbData($table['s_mbrdata'],'memberuid='.$R['mbruid'],'memberuid,name,nic')?>
<td>
<a href="#" data-toggle="modal" data-target="#modal_window" class="rb-modal-mbrinfo muted-link" onmousedown="mbrIdDrop('<?php echo $R['mbruid']?>','profile');">
<?php echo $M[$_HS['nametype']]?>
</a>
</td>
<?php else:?>
<td>비회원</td>
<?php endif?>
<td><span class="badge badge-dark"><?php echo getDomain($R['url'])?></span></td>
<td><span class="badge badge-dark"><?php echo $R['folder']?></span></td>
<td><span class="badge badge-dark"><?php echo $R['size']?getSizeFormat($R['size'],1):''?></span></td>
<td>
<a class="badge badge-dark" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=download&amp;uid=<?php echo $R['uid']?>" target="_action_frame_<?php echo $m?>" title="다운로드" data-tooltip="tooltip">
<?php echo $R['size']?$R['down']:''?>
</a>
</td>
<td class="rb-update">
<time class="timeago text-muted" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>"></time>
</td>
</tr>
<?php $_i++;endwhile?>
</tbody>
</table>
</div>
<?php if(!$NUM):?>
<div class="rb-none">첨부파일이 없습니다.</div>
<?php endif?>
<div class="d-flex justify-content-between p-3">
<div>
<button type="button" onclick="chkFlag('upfile_members[]');checkboxCheck();" class="btn btn-light">선택/해제</button>
<button type="button" onclick="actCheck('multi_delete');" class="btn btn-light" id="rb-action-btn" disabled>삭제</button>
</div>
<ul class="pagination">
<script>getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
</ul>
</div>
</form>
</div>
<!-- bootstrap-datepicker, http://eternicode.github.io/bootstrap-datepicker/ -->
<?php getImport('bootstrap-datepicker','css/datepicker3',false,'css')?>
<?php getImport('bootstrap-datepicker','js/bootstrap-datepicker',false,'js')?>
<?php getImport('bootstrap-datepicker','js/locales/bootstrap-datepicker.kr',false,'js')?>
<?php include $g['path_module'].'member/admin/_modal.php';?>
<style type="text/css">
.datepicker {z-index: 1151 !important;}
</style>
<script>
$('.input-daterange').datepicker({
format: "yyyy/mm/dd",
todayBtn: "linked",
language: "kr",
calendarWeeks: true,
todayHighlight: true,
autoclose: true
});
</script>
<!-- timeago -->
<?php getImport('jquery-timeago','jquery.timeago',false,'js')?>
<?php getImport('jquery-timeago','locales/jquery.timeago.ko',false,'js')?>
<script>
jQuery(document).ready(function() {
$(".rb-update time").timeago();
});
//사이트 셀렉터 출력
$('[data-role="siteSelector"]').removeClass('d-none')
$(".checkAll-file-user").click(function(){
$(".rb-file-user").prop("checked",$(".checkAll-file-user").prop("checked"));
checkboxCheck();
});
function checkboxCheck()
{
var f = document.listForm;
var l = document.getElementsByName('upfile_members[]');
var n = l.length;
var i;
var j=0;
for (i = 0; i < n; i++)
{
if (l[i].checked == true) j++;
}
if (j) getId('rb-action-btn').disabled = false;
else getId('rb-action-btn').disabled = true;
}
function memberSelect(uid)
{
var f = document.procForm;
f.where.value = 'mbruid';
f.keyw.value = uid;
f.submit();
}
function dropDate(date1,date2)
{
var f = document.procForm;
f.d_start.value = date1;
f.d_finish.value = date2;
f.submit();
}
function actCheck(act)
{
var f = document.listForm;
var l = document.getElementsByName('upfile_members[]');
var n = l.length;
var j = 0;
var i;
for (i = 0; i < n; i++)
{
if(l[i].checked == true)
{
j++;
}
}
if (!j)
{
alert('선택된 파일이 없습니다. ');
return false;
}
if (act == 'multi_delete')
{
if (confirm('정말로 삭제 하시겠습니까? '))
{
getIframeForAction(f);
f.a.value = act;
f.submit();
}
}
return false;
}
// 회원 이름,닉네임 클릭시 uid & mod( 탭 정보 : info, main, post 등) 지정하는 함수
var _mbrModalUid;
var _mbrModalMod;
function mbrIdDrop(uid,mod)
{
_mbrModalUid = uid;
_mbrModalMod = mod;
}
// 회원정보 modal 호출하는 함수 : 위에서 지정한 회원 uid & mod 로 호출한다 .
$('.rb-modal-mbrinfo').on('click',function() {
modalSetting('modal_window','<?php echo getModalLink('&amp;m=admin&amp;module=member&amp;front=modal.mbrinfo&amp;uid=')?>'+_mbrModalUid+'&amp;tab='+_mbrModalMod);
});
</script>

View File

@@ -0,0 +1,236 @@
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
<div class="row no-gutters">
<div class="col-sm-4 col-md-4 col-lg-3 d-none d-sm-block sidebar"><!-- 좌측영역 시작 -->
<div class="card">
<div class="card-header">
테마 리스트
</div>
<div class="list-group list-group-flush">
<?php $i=0?>
<?php $xdir = $g['path_module'].$module.'/themes/'?>
<?php $tdir = $xdir.'_desktop/'?>
<?php $dirs = opendir($tdir)?>
<?php while(false !== ($skin = readdir($dirs))):?>
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
<?php $i++?>
<a href="<?php echo $g['adm_href']?>&amp;theme=_desktop/<?php echo $skin?>" class="list-group-item list-group-item-action d-flex align-items-center<?php if($theme=='_desktop/'.$skin):?> border border-primary<?php endif?>">
<i class="fa fa-desktop fa-lg fa-fw mr-2" aria-hidden="true"></i><span><?php echo getFolderName($tdir.$skin)?></span>
<span class="badge badge-<?php echo $theme=='_desktop/'.$skin?'primary':'dark' ?> badge-pill ml-auto"><?php echo $skin?></span>
</a>
<?php endwhile?>
<?php closedir($dirs)?>
<?php $tdir = $xdir.'_mobile/'?>
<?php $dirs = opendir($tdir)?>
<?php while(false !== ($skin = readdir($dirs))):?>
<?php if($skin=='.' || $skin == '..' || is_file($tdir.$skin))continue?>
<?php $i++?>
<a href="<?php echo $g['adm_href']?>&amp;theme=_mobile/<?php echo $skin?>" class="list-group-item list-group-item-action d-flex align-items-center<?php if($theme=='_mobile/'.$skin):?> border border-primary<?php endif?>">
<i class="fa fa-mobile fa-2x mr-2" aria-hidden="true"></i> <span><?php echo getFolderName($tdir.$skin)?></span>
<span class="badge badge-<?php echo $theme=='_mobile/'.$skin?'primary':'dark' ?> badge-pill ml-auto"><?php echo $skin?></span>
</a>
<?php endwhile?>
<?php closedir($dirs)?>
</div>
<?php if(!$i):?>
<div class="none">등록된 테마가 없습니다.</div>
<?php endif?>
</div> <!-- 좌측 card 끝 -->
</div> <!-- 좌측 영역 끝 -->
<div class="col-sm-8 col-md-8 col-lg-9 ml-sm-auto ">
<?php if($theme):?>
<form class="card rounded-0 border-0" name="procForm" action="<?php echo $g['s']?>/" method="post" target="_action_frame_<?php echo $m?>" onsubmit="return saveCheck(this);">
<input type="hidden" name="r" value="<?php echo $r?>" />
<input type="hidden" name="m" value="<?php echo $module?>" />
<input type="hidden" name="a" value="theme_config" />
<input type="hidden" name="theme" value="<?php echo $theme?>" />
<div class="card-header p-0">
<ol class="breadcrumb rounded-0 mb-0 bg-transparent text-muted">
<?php $_theme =explode('/' , $theme); ?>
<li class="breadcrumb-item">root</li>
<li class="breadcrumb-item">modules</li>
<li class="breadcrumb-item"><?php echo $module?></li>
<li class="breadcrumb-item">themes</li>
<li class="breadcrumb-item"><?php echo $_theme[0]?></li>
<li class="breadcrumb-item"><?php echo $_theme[1]?></li>
</ol>
</div>
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link js-tooltip<?php if(!$_COOKIE['moduleBbsThemeTab']||$_COOKIE['moduleBbsThemeTab']=='readme'):?> active<?php endif?>" href="#readme" data-toggle="tab" onclick="setCookie('moduleBbsThemeTab','readme',1);" title="README.md" data-placement="bottom">
<i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i>
안내문서
</a>
</li>
<li class="nav-item editor">
<a class="nav-link js-tooltip<?php if($_COOKIE['moduleBbsThemeTab']=='editor'):?> active<?php endif?>" href="#var" data-toggle="tab" onclick="setCookie('moduleBbsThemeTab','editor','1');" title="_var.php" data-placement="bottom">
<i class="fa fa-code fa-fw" aria-hidden="true"></i>
설정 변수
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane <?php if(!$_COOKIE['moduleBbsThemeTab']||$_COOKIE['moduleBbsThemeTab']=='readme'):?> show active<?php endif?>" id="readme" role="tabpanel" aria-labelledby="readme-tab">
<?php if (is_file($g['path_module'].$module.'/themes/'.$theme.'/README.md')): ?>
<div class="markdown-body px-4 py-0 readme">
<?php readfile($g['path_module'].$module.'/themes/'.$theme.'/README.md')?>
</div>
<?php else: ?>
<div class="text-center text-muted d-flex align-items-center justify-content-center" style="height: calc(100vh - 10rem);">
<div><i class="fa fa-exclamation-circle fa-3x mb-3" aria-hidden="true"></i>
<p>테마 안내문서가 없습니다.</p>
</div>
</div>
<?php endif; ?>
<?php if (is_file($g['path_module'].$module.'/themes/'.$theme.'/LICENSE')): ?>
<div class="py-5 px-4">
<h5>라이센스</h5>
<textarea class="form-control" rows="10"><?php readfile($g['path_module'].$module.'/themes/'.$theme.'/LICENSE')?></textarea>
</div>
<?php endif; ?>
</div>
<div class="tab-pane pr-2<?php if($_COOKIE['moduleBbsThemeTab']=='editor'):?> show active<?php endif?>" id="var" role="tabpanel" aria-labelledby="var-tab">
<div class="">
<div class="rb-codeview">
<div class="rb-codeview-body">
<textarea name="theme_var" id="__code__" class="form-control" rows="30"><?php echo implode('',file($g['path_module'].$module.'/themes/'.$theme.'/_var.php'))?></textarea>
</div>
<div class="rb-codeview-footer p-2">
<div class="form-row mb-2">
<div class="col">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">테마명</span>
</div>
<input type="text" class="form-control" name="name" value="<?php echo getFolderName($g['path_module'].$module.'/themes/'.$theme)?>">
</div>
</div>
<div class="col">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">테마 폴더</span>
</div>
<input type="text" class="form-control" name="newLayout" value="<?php echo $theme?>">
</div>
</div>
<div class="col text-right pt-2 text-muted">
<small><?php echo count(file($g['path_module'].$module.'/themes/'.$theme.'/_var.php')).' lines'?></small></li>
<small class="ml-3"><?php echo getSizeFormat(@filesize($g['path_module'].$module.'/themes/'.$theme.'/_var.php'),2)?></small>
</div>
</div>
</div>
</div> <!--.rb-codeview -->
</div> <!--.rb-files -->
<div class="card-footer">
<button type="submit" class="btn btn-outline-primary">저장하기</button>
<span class="ml-3 text-muted">이 테마를 사용하는 모든 게시판에 위의 설정값이 적용됩니다.</span>
<?php if($theme):?>
<div class="pull-right">
<a class="btn btn-outline-danger" href="<?php echo $g['s']?>/?r=<?php echo $r?>&amp;m=<?php echo $module?>&amp;a=theme_delete&amp;theme=<?php echo $theme?>" target="_action_frame_<?php echo $m?>" onclick="return confirm('정말로 이 테마를 삭제하시겠습니까? ');">테마삭제</a>
</div>
<?php endif?>
</div>
</div><!-- /.tab-pane -->
</div><!-- /.tab-content -->
<?php else:?>
<div class="text-center text-muted d-flex align-items-center justify-content-center" style="height: calc(100vh - 10rem);">
<div class="">
<i class="fa fa fa-picture-o fa-3x mb-3" aria-hidden="true"></i>
<p>테마를 선택해 주세요.</p>
<p class="small">테마설정은 해당 테마를 사용하는 모든 게시판에 적용됩니다.</p>
<ul class="list list-unstyled small">
<li>테마는 게시판의 외형을 변경할 수 있는 요소입니다.</li>
<li>테마설정은 게시판의 외형만 제어하며 게시판의 내부시스템에는 영향을 주지 않습니다.</li>
<li>테마의 속성을 변경하면 해당테마를 사용하는 모든 게시판에 적용됩니다.</li>
</ul>
</div>
</div>
<?php endif?>
</form>
</div> <!-- 우측영역 끝 -->
</div> <!--.row -->
<?php if($d['admin']['codeeidt']):?>
<!-- codemirror -->
<style>
.CodeMirror {
font-size: 13px;
font-weight: normal;
font-family: Menlo,Monaco,Consolas,"Courier New",monospace !important;
}
</style>
<?php getImport('codemirror','codemirror',false,'css')?>
<?php getImport('codemirror','codemirror',false,'js')?>
<?php getImport('codemirror','theme/'.$d['admin']['codeeidt'],false,'css')?>
<?php getImport('codemirror','addon/display/fullscreen',false,'css')?>
<?php getImport('codemirror','addon/display/fullscreen',false,'js')?>
<?php getImport('codemirror','mode/htmlmixed/htmlmixed',false,'js')?>
<?php getImport('codemirror','mode/xml/xml',false,'js')?>
<?php getImport('codemirror','mode/javascript/javascript',false,'js')?>
<?php getImport('codemirror','mode/clike/clike',false,'js')?>
<?php getImport('codemirror','mode/php/php',false,'js')?>
<?php getImport('codemirror','mode/css/css',false,'js')?>
<script>
(function() {
$(".markdown-body").markdown();
var editor = CodeMirror.fromTextArea(getId('__code__'), {
mode: "<?php echo $codeset[$codeext]?$codeset[$codeext]:'application/x-httpd-php'?>",
indentUnit: 2,
lineNumbers: true,
matchBrackets: true,
indentWithTabs: true,
theme: '<?php echo $d['admin']['codeeidt']?>'
});
editor.setSize('100%','500px');
_isCodeEdit = true;
})();
</script>
<!-- @codemirror -->
<?php endif?>
<script type="text/javascript">
//<![CDATA[
function saveCheck(f)
{
return confirm('정말로 실행하시겠습니까? ');
}
//]]>
</script>

View File

@@ -0,0 +1,5 @@
<?php
$d['amenu']['config'] = '환경설정';
$d['amenu']['main'] = '파일관리';
$d['amenu']['theme'] = '테마';
?>