tui-editor와 새 게시판 준비

This commit is contained in:
Hide_D committed 2019-04-07 21:31:28 +09:00
1 parent 95a0b1d77e
commit 2ac53142b5
10 files changed
+142 -5

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

+13
View File
@@ -0,0 +1,13 @@
/*!
* tui-editor
* @version 1.3.0
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com> (https://nhnent.github.io/tui.editor/)
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery"),require("tui-code-snippet"),require("codemirror"),require("to-mark"),require("tui-chart"),require("squire-rte"),require("markdown-it"),require("highlight.js"),require("tui-color-picker"),require("plantuml-encoder")):"function"==typeof define&&define.amd?define(["jquery","tui-code-snippet","codemirror","to-mark","tui-chart","squire-rte","markdown-it","highlight.js","tui-color-picker","plantuml-encoder"],t):"object"==typeof exports?exports.Editor=t(require("jquery"),require("tui-code-snippet"),require("codemirror"),require("to-mark"),require("tui-chart"),require("squire-rte"),require("markdown-it"),require("highlight.js"),require("tui-color-picker"),require("plantuml-encoder")):(e.tui=e.tui||{},e.tui.Editor=t(e.$,e.tui&&e.tui.util,e.CodeMirror,e.toMark,e.tui&&e.tui.chart,e.Squire,e.markdownit,e.hljs,e.tui&&e.tui.colorPicker,e.plantumlEncoder))}("undefined"!=typeof self?self:this,function(e,t,n,r,i,o,a,l,s,u){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="dist/",t(t.s=55)}(Line truncated
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var X=n(166),J=n(167),Z=n(49);t.Buffer=o,t.SlowBuffer=p,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return a(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return s(null,e,t,n)},o.allocUnsafe=function(e){return u(null,e)},o.allocUnsafeSlow=function(e){return u(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.lengLine truncated
+13
View File
@@ -0,0 +1,13 @@
/*!
* tui-editor
* @version 1.3.0
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com> (https://nhnent.github.io/tui.editor/)
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery"),require("tui-code-snippet"),require("to-mark"),require("tui-chart"),require("markdown-it"),require("highlight.js"),require("tui-color-picker"),require("plantuml-encoder")):"function"==typeof define&&define.amd?define(["jquery","tui-code-snippet","to-mark","tui-chart","markdown-it","highlight.js","tui-color-picker","plantuml-encoder"],t):"object"==typeof exports?exports.Editor=t(require("jquery"),require("tui-code-snippet"),require("to-mark"),require("tui-chart"),require("markdown-it"),require("highlight.js"),require("tui-color-picker"),require("plantuml-encoder")):(e.tui=e.tui||{},e.tui.Editor=t(e.$,e.tui&&e.tui.util,e.toMark,e.tui&&e.tui.chart,e.markdownit,e.hljs,e.tui&&e.tui.colorPicker,e.plantumlEncoder))}("undefined"!=typeof self?self:this,function(e,t,n,r,o,a,i,u){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="dist/",t(t.s=27)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=vLine truncated
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var J=n(51),Z=n(52),K=n(21);t.Buffer=a,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return i(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return l(null,e,t,n)},a.allocUnsafe=function(e){return s(null,e)},a.allocUnsafeSlow=function(e){return s(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!K(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.lengthLine truncated
+1
View File
@@ -0,0 +1 @@
@charset "UTF-8";.CodeMirror{font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif}.tui-editor-contents :not(table){line-height:160%;box-sizing:content-box}.tui-editor-contents address,.tui-editor-contents cite,.tui-editor-contents dfn,.tui-editor-contents em,.tui-editor-contents i,.tui-editor-contents var{font-style:italic}.tui-editor-contents strong{font-weight:700}.tui-editor-contents p{margin:10px 0;color:#555}.tui-editor-contents>div>div:first-of-type h1,.tui-editor-contents>h1:first-of-type{margin-top:14px}.tui-editor-contents h1,.tui-editor-contents h2,.tui-editor-contents h3,.tui-editor-contents h5{font-weight:700}.tui-editor-contents h1{font-size:1.6rem;line-height:28px;border-bottom:3px double #999;margin:52px 0 15px 0;padding-bottom:7px;color:#000}.tui-editor-contents h2{font-size:1.3rem;line-height:23px;border-bottom:1px solid #dbdbdb;margin:30px 0 13px 0;padding-bottom:7px;color:#333}.tui-editor-contents h3,.tui-editor-contents h4{font-size:1.2rem;line-height:18px;margin:20px 0 2px;color:#333}.tui-editor-contents h5,.tui-editor-contents h6{font-size:1rem;line-height:17px;margin:10px 0 -4px;color:#333}.tui-editor-contents blockquote{margin:15px 0}.tui-editor-contents blockquote{border-left:4px solid #ddd;padding:0 15px;color:#777}.tui-editor-contents blockquote>:first-child{margin-top:0}.tui-editor-contents blockquote>:last-child{margin-bottom:0}.tui-editor-contents code,.tui-editor-contents pre{font-family:Consolas,Courier,"Apple SD 산돌고딕 NeLine truncated
+1
View File
@@ -0,0 +1 @@
@charset "UTF-8";.auto-height,.auto-height .tui-editor-defaultUI{height:auto}.auto-height .tui-editor{position:relative}:not(.auto-height)>.tui-editor-defaultUI,:not(.auto-height)>.tui-editor-defaultUI>.te-editor-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:not(.auto-height)>.tui-editor-defaultUI>.te-editor-section{-ms-flex:1;flex:1}.tui-editor-defaultUI-toolbar:after,.tui-editor:after{content:"";display:block;height:0;clear:both}.tui-editor{position:absolute;line-height:1;color:#181818;width:100%;height:inherit}.te-editor-section{min-height:0;position:relative;height:inherit}.te-md-container{display:none;overflow:hidden;height:100%}.te-md-container .te-editor{line-height:1.5}.te-md-container .te-editor,.te-md-container .te-preview{box-sizing:border-box;padding:0;height:inherit}.te-md-container .CodeMirror{font-size:13px;height:inherit}.te-md-container .te-preview{overflow:auto;padding:0 25px;height:100%}.te-md-container .te-preview>p:first-child{margin-top:0!important}.te-md-container .te-preview .tui-editor-contents{padding-top:11px}.tui-editor .te-preview-style-tab>.te-editor,.tui-editor .te-preview-style-tab>.te-preview{float:left;width:100%;display:none}.tui-editor .te-preview-style-tab>.te-tab-active{display:block}.tui-editor .te-preview-style-vertical>.te-tab-section{display:none}.tui-editor .te-preview-style-tab>.te-tab-section{display:block}.tui-editor .te-preview-style-vertical .te-editor{float:left;width:50%}.tui-editorLine truncated
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+2 -2
View File
@@ -403,11 +403,11 @@ function checkSecretPermission($me){
$permission = $me['permission'];
if(!$me['nation']){
return 0;
return -1;
}
if($me['level'] == 0){
return 0;
return -1;
}
$secretLimit = $db->queryFirstField('SELECT secretlimit FROM nation WHERE nation = %i', $me['nation']);
View File
Whitespace-only changes.
+107
View File
@@ -0,0 +1,107 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$isSecretBoard = Util::getReq('isSecret', 'bool', false);
//increaseRefresh("회의실", 1);
$me = $db->queryFirstRow('SELECT no, nation, level, permission, con, turntime, belong, penalty FROM general WHERE owner=%i', $userID);
$con = checkLimit($me['con']);
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
$permission = checkSecretPermission($me);
if($permission < 0){
echo '국가에 소속되어있지 않습니다.';
die();
}
else if ($isSecretBoard && $permission < 2) {
echo "권한이 부족합니다. 수뇌부가 아닙니다.";
die();
}
$boardName = $isSecretBoard?'회의실':'기밀실';
?>
<!DOCTYPE html>
<html>
<head>
<title><?=UniqueConst::$serverName?>: <?=$boardName?></title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/tui.editor/tui-editor.min.css')?>
<?=WebUtil::printCSS('../e_lib/tui.editor/tui-editor-contents.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('../css/config.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/select_npc.css')?>
<script>
var isSecretBoard = <?=($isSecretBoard?'true':'false')?>; //
</script>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
<?=WebUtil::printJS('../e_lib/tui.editor/tui-editor-Editor-all.min.js')?>
<?=WebUtil::printJS('js/common.js')?>
<?=WebUtil::printJS('js/board.js')?>
</head>
<body>
<div id='newArticle'>
<div><span class='articleTitle'>제목</span><input class='commentText' type='text' maxlength='250'></input></div>
<div class='boardArticle'>
</div>
<button type='button' class='submitArticle'>등록</button>
</div>
<template id='articleTemplate'>
<div class='articleFrame'>
<div><span class='articleTitle'></span></div>
<div class='authorPlate'><span class='authorIcon'></span><span class='authorName'><span><span class='date'></span></div>
<div class='boardArticle'>
</div>
</div>
<div class='commentFrame'>
<ul class='commentList'>
</ul>
<div>
<input class='commentText' type='textarea' maxlength='250'></input>
<button type='button' class='submitComment'>등록</button>
</div>
</div>
</div>
</template>
<template id='commentTemplate'>
<li class='comment'>
<span class='author'></span>
<span class='text'></span>
<span class='date'></span>
</li>
</template>
<div style='width=1000px;' class='tb_layout bg0'>
<?=backButton()?><br>
<?=banner()?>
</div>
</body>
</html>
+5 -3
View File
@@ -13,7 +13,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("내무부", 1);
$me = $db->queryFirstRow('SELECT no, nation, level, permission, con, turntime, belong, penalty FROM general WHERE owner=%i', $userID);
$nation = $db->queryFirstRow('SELECT secretlimit, msg, scoutmsg FROM nation WHERE nation = %i', $me['nation']);
$con = checkLimit($me['con']);
if ($con >= 2) {
@@ -22,7 +22,9 @@ if ($con >= 2) {
}
$permission = checkSecretPermission($me);
if ($permission == 0) {
if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
exit();
}
}
$nation = $db->queryFirstRow('SELECT secretlimit, msg, scoutmsg FROM nation WHERE nation = %i', $me['nation']);