first
This commit is contained in:
4
modules/device/README.md
Normal file
4
modules/device/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
## Copyright and license
|
||||
Copyright 2020 Redblock, Inc.
|
||||
|
||||
Licensed under the [RBL](https://kimsq.com/p/rbl) License
|
||||
21
modules/device/action/a.mobile.php
Normal file
21
modules/device/action/a.mobile.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$agentlist = trim($agentlist);
|
||||
|
||||
$QKEY = "usemobile,startsite,startdomain";
|
||||
$QVAL = "'$usemobile','$startsite','$startdomain'";
|
||||
|
||||
getDbDelete($table['s_mobile'],'');
|
||||
getDbInsert($table['s_mobile'],$QKEY,$QVAL);
|
||||
|
||||
$mfile = $g['path_var'].'mobile.agent.txt';
|
||||
$fp = fopen($mfile,'w');
|
||||
fwrite($fp,stripslashes($agentlist));
|
||||
fclose($fp);
|
||||
@chmod($mfile,0707);
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
4
modules/device/admin.php
Normal file
4
modules/device/admin.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
include $g['path_module'].$module.'/admin/'.$front.'.php';
|
||||
?>
|
||||
29
modules/device/admin/_info.php
Normal file
29
modules/device/admin/_info.php
Normal 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>
|
||||
20
modules/device/admin/main.css
Normal file
20
modules/device/admin/main.css
Normal file
@@ -0,0 +1,20 @@
|
||||
#mobilebox .tab-content {
|
||||
|
||||
border: none;
|
||||
|
||||
padding: 20px 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#mobilebox .btn-default.active {
|
||||
|
||||
background-color: #2d6ca2;
|
||||
|
||||
border-color: #2b669a;
|
||||
|
||||
color: #fff;
|
||||
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,.2);
|
||||
|
||||
123
modules/device/admin/main.php
Normal file
123
modules/device/admin/main.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
$R = getDbData($table['s_mobile'],'','*');
|
||||
?>
|
||||
|
||||
<div class="container-fluid" id="mobilebox">
|
||||
|
||||
<form class="row" 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="mobile">
|
||||
<input type="hidden" name="checkm" value="<?php echo $R['usemobile']?$R['usemobile']:0?>">
|
||||
|
||||
<div class="col-md-6">
|
||||
<ul class="list-inline">
|
||||
<li class="list-inline-item"><i class="fa fa-tablet fa-5x"></i></li>
|
||||
<li class="list-inline-item"><i class="fa fa-mobile fa-4x"></i></li>
|
||||
<li class="list-inline-item"><h2>모바일 기기로 접속 시</h2></li>
|
||||
</ul>
|
||||
<div class="nav btn-group btn-group-toggle w-100" data-toggle="buttons">
|
||||
<a href="#usemobile-00" class="btn btn-light<?php if(!$R['usemobile']):?> active<?php endif?>" style="width: 33.3%;" data-toggle="tab">
|
||||
<input type="radio" name="usemobile" value="0"<?php if(!$R['usemobile']):?> checked="checked"<?php endif?>> 사이트별 적용
|
||||
</a>
|
||||
<a href="#usemobile-02" class="btn btn-light<?php if($R['usemobile']==2):?> active<?php endif?>" style="width: 33.3%;" data-toggle="tab">
|
||||
<input type="radio" name="usemobile" value="2"<?php if($R['usemobile']==2):?> checked="checked"<?php endif?>> 특정 도메인 으로 이동
|
||||
</a>
|
||||
<a href="#usemobile-01" class="btn btn-light<?php if($R['usemobile']==1):?> active<?php endif?>" style="width: 33.3%;" data-toggle="tab">
|
||||
<input type="radio" name="usemobile" value="1"<?php if($R['usemobile']==1):?> checked="checked"<?php endif?>> 특정 사이트로 연결
|
||||
</a>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane bg-light rounded p-4 text-muted fade<?php if(!$R['usemobile']):?> show active<?php endif?>" id="usemobile-00">
|
||||
모바일 기기로 접속 시 사이트별로 모바일 모드를 적용할 수 있습니다.
|
||||
</div>
|
||||
<div class="tab-pane text-muted fade<?php if($R['usemobile']==2):?> show active<?php endif?>" id="usemobile-02">
|
||||
<div class="input-group input-group-lg">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-fw kf kf-domain"></i></span>
|
||||
</div>
|
||||
<select name="startdomain" class="form-control custom-select">
|
||||
<option value="">연결할 도메인을 선택 하세요</option>
|
||||
<?php $SITES = getDbArray($table['s_domain'],'','*','gid','asc',0,$p)?>
|
||||
<?php while($S = db_fetch_array($SITES)):?>
|
||||
<option value="http://<?php echo $S['name']?>"<?php if('http://'.$S['name']==$R['startdomain']):?> selected<?php endif?>>ㆍ<?php echo $S['name']?></option>
|
||||
<?php endwhile?>
|
||||
<?php if(!db_num_rows($SITES)):?>
|
||||
<option value="">등록된 도메인이 없습니다.</option>
|
||||
<?php endif?>
|
||||
</select>
|
||||
</div>
|
||||
<small class="form-text text-muted">
|
||||
모바일 기기로 접속 시 특정 도메인을 연결할 수 있습니다.
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&module=domain&type=makedomain">도메인 추가</a>
|
||||
</small>
|
||||
</div>
|
||||
<div class="tab-pane text-muted fade<?php if($R['usemobile']==1):?> show active<?php endif?>" id="usemobile-01">
|
||||
<div class="input-group input-group-lg">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lg fa-fw kf kf-home"></i></span>
|
||||
</div>
|
||||
<select name="startsite" class="form-control custom-select">
|
||||
<option value="">연결할 사이트를 선택하세요.</option>
|
||||
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p)?>
|
||||
<?php while($S = db_fetch_array($SITES)):?>
|
||||
<option value="<?php echo $S['uid']?>"<?php if($S['uid']==$R['startsite']):?> selected<?php endif?>>ㆍ<?php echo $S['label']?></option>
|
||||
<?php endwhile?>
|
||||
<?php if(!db_num_rows($SITES)):?>
|
||||
<option value="">등록된 사이트가 없습니다.</option>
|
||||
<?php endif?>
|
||||
</select>
|
||||
</div>
|
||||
<small class="form-text text-muted">
|
||||
모바일 기기로 접속 시 특정 사이트로 연결할 수 있습니다. 도메인은 유지 됩니다.
|
||||
<a href="<?php echo $g['s']?>/?r=<?php echo $r?>&m=<?php echo $m?>&module=site&type=makesite">사이트 추가</a>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-lg-5">
|
||||
<div class="form-group mt-4">
|
||||
<label>디바이스 목록</label>
|
||||
<textarea name="agentlist" rows="11" class="form-control"><?php echo trim(implode('',file($g['path_var'].'mobile.agent.txt')))?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<button type="submit" class="btn btn-outline-primary btn-block btn-lg my-4">저장하기</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function saveCheck(f)
|
||||
{
|
||||
if (f.checkm.value == '1')
|
||||
{
|
||||
if (f.startsite.value == '')
|
||||
{
|
||||
alert('시작사이트를 지정해 주세요. ');
|
||||
f.startsite.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (f.checkm.value == '2')
|
||||
{
|
||||
if (f.startdomain.value == '')
|
||||
{
|
||||
alert('시작도메인을 지정해 주세요. ');
|
||||
f.startdomain.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (confirm('정말로 실행하시겠습니까? '))
|
||||
{
|
||||
getIframeForAction(f);
|
||||
$(".btn-primary").addClass("disabled");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
23
modules/device/language/DEFAULT/lang.admin.php
Normal file
23
modules/device/language/DEFAULT/lang.admin.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
// main.php
|
||||
$lang['device']['a1001'] = '모바일 접속처리';
|
||||
$lang['device']['a1002'] = '모바일 기기로 접속 시';
|
||||
$lang['device']['a1003'] = '사이트별 모바일모드 적용';
|
||||
$lang['device']['a1004'] = '특정 도메인 으로 이동';
|
||||
$lang['device']['a1005'] = '특정 사이트로 연결';
|
||||
$lang['device']['a1006'] = '모바일 기기로 접속 시 사이트별로 모바일 모드를 적용할 수 있습니다.';
|
||||
$lang['device']['a1007'] = '모바일 기기로 접속 시 연결할 도메인을 선택 하세요';
|
||||
$lang['device']['a1008'] = '등록된 도메인이 없습니다.';
|
||||
$lang['device']['a1009'] = '모바일 기기로 접속 시 특정 도메인을 연결할 수 있습니다.';
|
||||
$lang['device']['a1010'] = '도메인 추가';
|
||||
$lang['device']['a1011'] = '모바일 기기로 접속 시 연결할 사이트를 선택하세요.';
|
||||
$lang['device']['a1012'] = '등록된 사이트가 없습니다.';
|
||||
$lang['device']['a1013'] = '모바일 기기로 접속 시 특정 사이트로 연결할 수 있습니다. 도메인은 유지 됩니다.';
|
||||
$lang['device']['a1014'] = '사이트 추가';
|
||||
$lang['device']['a1015'] = '디바이스 목록';
|
||||
$lang['device']['a1016'] = '등록 도움말..';
|
||||
$lang['device']['a1017'] = '저장하기';
|
||||
$lang['device']['a1018'] = '시작사이트를 지정해 주세요.';
|
||||
$lang['device']['a1019'] = '시작도메인을 지정해 주세요.';
|
||||
$lang['device']['a1020'] = '정말로 실행하시겠습니까?';
|
||||
?>
|
||||
1
modules/device/language/DEFAULT/name.module.txt
Normal file
1
modules/device/language/DEFAULT/name.module.txt
Normal file
@@ -0,0 +1 @@
|
||||
디바이스
|
||||
1
modules/device/language/DEFAULT/name.txt
Normal file
1
modules/device/language/DEFAULT/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
한국어
|
||||
23
modules/device/language/english/lang.admin.php
Normal file
23
modules/device/language/english/lang.admin.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
// main.php
|
||||
$lang['device']['a1001'] = 'Mobile device connection'; //모바일 접속처리
|
||||
$lang['device']['a1002'] = 'Settings for mobile devices'; //모바일 기기로 접속 시
|
||||
$lang['device']['a1003'] = 'Mobile mode of each sites'; //사이트별 모바일모드 적용
|
||||
$lang['device']['a1004'] = 'Move to selected domain'; //특정 도메인 으로 이동
|
||||
$lang['device']['a1005'] = 'Connect to selected site'; //특정 사이트로 연결
|
||||
$lang['device']['a1006'] = 'You can apply to mobile mode of each sites when you connect to website using mobile devices.'; //모바일 기기로 접속 시 사이트별로 모바일 모드를 적용할 수 있습니다.
|
||||
$lang['device']['a1007'] = 'Please select one to connect if you use mobile devices.'; //모바일 기기로 접속 시 연결할 도메인을 선택 하세요
|
||||
$lang['device']['a1008'] = 'No registered domains.'; //등록된 도메인이 없습니다.
|
||||
$lang['device']['a1009'] = 'You can connect to selected domain when you use mobile devices.'; //모바일 기기로 접속 시 특정 도메인을 연결할 수 있습니다.
|
||||
$lang['device']['a1010'] = 'Add domain'; //도메인 추가
|
||||
$lang['device']['a1011'] = 'Please select one to connect if you use mobile devices.'; //모바일 기기로 접속 시 연결할 사이트를 선택하세요.
|
||||
$lang['device']['a1012'] = 'No registered sites.'; //등록된 사이트가 없습니다.
|
||||
$lang['device']['a1013'] = 'You can connect to selected site if you use mobile devices. Domain will be kept going.'; //모바일 기기로 접속 시 특정 사이트로 연결할 수 있습니다. 도메인은 유지 됩니다.
|
||||
$lang['device']['a1014'] = 'Add site'; //사이트 추가
|
||||
$lang['device']['a1015'] = 'Devices List'; //디바이스 목록
|
||||
$lang['device']['a1016'] = 'Help..'; //등록 도움말..
|
||||
$lang['device']['a1017'] = 'Save changes'; //저장하기
|
||||
$lang['device']['a1018'] = 'Please select starting site.'; //시작사이트를 지정해 주세요.
|
||||
$lang['device']['a1019'] = 'Please select starting domain.'; //시작도메인을 지정해 주세요.
|
||||
$lang['device']['a1020'] = 'Are you sure to change?'; //정말로 실행하시겠습니까?
|
||||
?>
|
||||
1
modules/device/language/english/name.module.txt
Normal file
1
modules/device/language/english/name.module.txt
Normal file
@@ -0,0 +1 @@
|
||||
Devices
|
||||
1
modules/device/language/english/name.txt
Normal file
1
modules/device/language/english/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
English
|
||||
3
modules/device/main.php
Normal file
3
modules/device/main.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
?>
|
||||
1
modules/device/name.txt
Normal file
1
modules/device/name.txt
Normal file
@@ -0,0 +1 @@
|
||||
디바이스
|
||||
11
modules/device/var/var.moduleinfo.php
Normal file
11
modules/device/var/var.moduleinfo.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/*
|
||||
각각의 링크를 제공하려면 다음과 같은 형식으로 지정해 주세요.
|
||||
이 링크는 관리자모드 모듈정보 링크에 사용됩니다.
|
||||
*/
|
||||
$d['moduleinfo']['market'] = 'http://www.kimsq.co.kr/market'; // 마켓
|
||||
$d['moduleinfo']['github'] = 'https://github.com/kimsQ/rb'; // 저장소
|
||||
$d['moduleinfo']['issue'] = 'https://github.com/kimsQ/rb/issues'; // 이슈접수
|
||||
$d['moduleinfo']['website'] = 'http://www.kimsq.co.kr/'; // 웹사이트
|
||||
$d['moduleinfo']['help'] = 'http://docs.kimsq.com/rb2/docs/c/Users/modules/device'; // 도움말
|
||||
?>
|
||||
Reference in New Issue
Block a user