This commit is contained in:
ksjihd163 2022-07-08 00:43:25 +00:00
parent eacd0755c7
commit ebcbc0ac7f
18 changed files with 59 additions and 44 deletions

View File

@ -10,6 +10,7 @@ namespace NP.BO.Controllers
{
public class ccController : BOBaseController
{
private int jkBoardNo = 13; // // ST :21, LIVE : 13
public ActionResult bms(NP.Model.VMCC vm)
{
vm.BMs = InitM<BoardMaster>(); var ht = SetHash(vm);
@ -89,11 +90,8 @@ namespace NP.BO.Controllers
}
vm.BMs = Dao.Get<BoardMaster>("board.bms", new System.Collections.Hashtable() { { "asno", vm.stringval }, { "bmposition", 0 }, { "isdefaults", string.IsNullOrEmpty(vm.stringval) ? "0,2" : "3" } });
vm.BMOs = new List<BoardMasterOpening>() { };
if (!string.IsNullOrEmpty(vm.stringval2))
{
vm.BMOs = Dao.Get<BoardMasterOpening>("board.bmos", GetInt(vm.stringval2));
}
ht.Add("bmno", "13"); // ST :21, LIVE : 13
ht.Add("bmno", jkBoardNo.ToString()); // ST :21, LIVE : 13
vm.BMOs = Dao.Get<BoardMasterOpening>("board.bmos", 13);
//ht.Add("opno", vm.stringval3);
//ht.Add("scc", vm.stringval4);
vm.Boards = Dao.Get<Board>("board.bs", ht);
@ -131,7 +129,10 @@ namespace NP.BO.Controllers
ht.Add("bmno", vm.stringval2);
ht.Add("opno", vm.stringval3);
ht.Add("scc", vm.stringval4);
ht.Add("bmposition", "0");
vm.Boards = Dao.Get<Board>("board.bs", ht);
vm.pagetotalcount = GetCount(vm.Boards.FirstOrDefault());
if (vm.Boards.Count() > 0)
{
@ -183,16 +184,13 @@ namespace NP.BO.Controllers
{
vm.FileList = GetFiles(fgnos.Substring(1));
}
if (vm.Board.isuseopening == 1)
{
vm.BMOs = Dao.Get<BoardMasterOpening>("board.bmos", vm.Board.bmno);
}
vm.BoardCMTs = Dao.Get<BoardCMT>("board.boardcmts", vm.Board.bno);
}
else
{
vm.BMs = Dao.Get<BoardMaster>("board.bms", new System.Collections.Hashtable() { { "asno", vm.stringval }, { "bmposition", 0 }, { "isdefaults", "0,2,3" } });
}
vm.BMOs = Dao.Get<BoardMasterOpening>("board.bmos", jkBoardNo);
if (vm.Board.pbno != null)
{
vm.BoardP = Dao.Get<Board>("board.get", vm.Board.pbno.Value).First();
@ -202,6 +200,8 @@ namespace NP.BO.Controllers
}
}
vm.SCUserName = SUserInfo.UserName;
ViewBag.bmno = jkBoardNo;
return View(vm);
}

View File

@ -33,7 +33,7 @@
</form>
<div style="position: fixed; display: none; border-radius: 10px; background-color: #fff; text-align: center; padding: 5px 10px;" class="draggable ui-widget-content" id="popbox">
<div id="popboxtop" style="height: 30px; line-height: 30px; cursor: pointer;">
<span id="poptitle" style="display: block; margin-right: 50px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;"></span>
<span id="poptitle" style="display: block; margin-right: 50px; overflow: auto; white-space: nowrap; text-overflow: ellipsis;"></span>
<a href="#" class="btn btn-xxs btn-default f-r" style="margin-top: -25px;" onclick="bglayer(false); $('#popbox').hide();">x</a>
</div>
<iframe id="ifr01" style="border: 0 none;"></iframe>

View File

@ -36,7 +36,7 @@
<option data-bmtype="@bm.bmtype" data-disptype="@bm.disptype" value="@bm.bmno">@bm.bmname@(bm.asname == null ? "" : string.Format(" ({0})", bm.asname)) (@bm.bmcode)</option>
}
</select>*@
<input type="hidden" id="Board_bmno" name="Board.bmno" value="21">
<input type="hidden" id="Board_bmno" name="Board.bmno" value="@(ViewBag.bmno)">
}
else
{

View File

@ -47,19 +47,23 @@
</tr>
</thead>
<tbody class="data" id="tbody1">
@foreach (var item in Model.Boards)
{
@foreach (var item in Model.Boards)
{
<tr>
<td>@item.rnorvt</td>
<td>@item.bmname</td>
<td>@item.asname</td>
<td>@item.opname</td>
<td class="link" style="@(item.pbno == null ? "":"padding-left: 30px;")"><a href="#" onclick="reg(@item.bno)">@Html.Raw(item.pbno == null ? "" : "<i class=\"fa fa-mail-forward\"></i>")@Html.Raw(item.istop == 1 ? "<i class=\"fa fa-bullhorn\"></i>" : "")@(item.subject)@(item.ccount > 0 ? string.Format("({0})", item.ccount.ToString("#,0")) : "")@Html.Raw(item.issecr == 1 ? "<i class=\"fa fa-lock\"></i>" : "")</a></td>
<td class="link" style="@(item.pbno == null ? "" : "padding-left: 30px;")"><a href="#" onclick="reg(@item.bno)">@Html.Raw(item.pbno == null ? "" : "<i class=\"fa fa-mail-forward\"></i>")@Html.Raw(item.istop == 1 ? "<i class=\"fa fa-bullhorn\"></i>" : "")@(item.subject)@(item.ccount > 0 ? string.Format("({0})", item.ccount.ToString("#,0")) : "")@Html.Raw(item.issecr == 1 ? "<i class=\"fa fa-lock\"></i>" : "")</a></td>
<td>@item.cdtymd</td>
<td>@(string.Format("{0}({1})",item.cnoname,item.cnoid))</td>
<td>@(string.Format("{0}({1})", item.cnoname, item.cnoid))</td>
<td>@item.rcount.ToString("#,0")</td>
</tr>
}
}
</tbody>
</table>
</div>

View File

@ -71,7 +71,13 @@ else
<label class="col-sm-4 col-md-2 control-label req">제목</label>
<div class="col-sm-8 col-md-10">
@Html.TextBoxFor(m => m.Board.subject, new { @class = "form-control ff", @maxlength = "100" })<br />
@if (Model.Board.bno == Model.Board.issecr)
{
<label><input type="checkbox" name="Board.issecr" value="1" @(Model.Board.issecr == 0 ? "checked" : "") /> 비밀글</label>
}
else {
<label><input type="checkbox" name="Board.issecr" value="1" @(Model.Board.issecr == 1 ? "checked" : "") /> 비밀글</label>
}
@if (Model.Board.pbno == null)
{
<label><input type="checkbox" name="Board.istop" value="1" @(Model.Board.istop == 1 ? "checked" : "") /> 상단고정</label>

View File

@ -66,7 +66,7 @@
<td>@item.bmname</td>
<td class="link" style="@(item.pbno == null ? "":"padding-left: 30px;")"><a href="#" onclick="reg(@item.bno)">@Html.Raw(item.pbno == null ? "" : "<i class=\"fa fa-mail-forward\"></i>")@Html.Raw(item.istop == 1 ? "<i class=\"fa fa-bullhorn\"></i>" : "")@(item.subject)@(item.ccount > 0 ? string.Format("({0})", item.ccount.ToString("#,0")) : "")@Html.Raw(item.issecr == 1 ? "<i class=\"fa fa-lock\"></i>" : "")</a></td>
<td>@item.cdtymd</td>
<td>@item.cnoname</td>
<td>@(string.Format("{0}({1})",item.cnoname,item.cnoid))</td>
<td>@item.tyear / @item.tseq</td>
</tr>
}

View File

@ -468,7 +468,7 @@
}
}, 50);
}
} else if (capResult.code == 1) {
} else if (capResult.code == -1) {
msg("회차가 1개라도 생성되어 있어야 강좌를 생성하실 수 있습니다.");
$("#thisbox").hide();
}

View File

@ -30,7 +30,7 @@
</section>
<div class="tar buttonbox">
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
<a href="#" onclick="javascript:exceldown('mform', '/data/learns', 'tbody1', 'CourseLearns');" class="btn btn-s-xs btn-success" style="margin-left: 5px;">엑셀다운로드</a>
<a href="#" onclick="javascript:exceldown2('mform', '/data/learns', 'tbody1', 'CourseLearns');" class="btn btn-s-xs btn-success" style="margin-left: 5px;">엑셀다운로드</a>
</div>
<section class="panel panel-default">
<div class="table-responsive" id="excel1">
@ -110,6 +110,7 @@
@Html.HiddenFor(m => m.tabidx)
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
</form>
@Html.Partial("./Partial/ExcelCommentBox")
<script>
var terms = '@(string.Join(";", Model.Terms.Select(s=>string.Format("{0}:{1}:{2}", s.tmno, s.tyear, s.tseq))))';
var _cgs = '@(string.Join(";", Model.CGs.Select(s=>string.Format("{0}:{1}:{2}", s.pcgno??0, s.cgno, s.cgname))))';

View File

@ -697,7 +697,7 @@ namespace NP.Base.Controllers
int uno = SUserInfo.UserNo;
String uip = GetUserIP();
//해당 강좌가 회차정보가 존재하는지 확인
if (nomaster && Dao.Get<CMInning>("cm.cminnings", new System.Collections.Hashtable() { { "cmno", cmno } }).Count < 1 )
if (nomaster && Dao.Get<CMInning>("cm.cminnings", new System.Collections.Hashtable() { { "cmno", cmno } }).Count < -1 )
{
return JsonBack(new JsonRtn() { code = 1 });
}

View File

@ -486,6 +486,7 @@ namespace NP.Base.Controllers
{
lectnos = string.Join(",", Lects1.Select(s => s.lectno));
var data1 = new Lect() { lectnos = lectnos, uno = SUserInfo.UserNo, uip = GetUserIP() };
//return JsonOK(Dao.Save("grade.lectcomplete.abs", new Hashtable() { { "lectnos", lectnos }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }));
return JsonOK(Dao.Save("grade.lectcomplete.abs2", data1));
}
else

View File

@ -720,7 +720,7 @@ namespace NP.Base
{
if (Dao.Save("sys.file.del", new System.Collections.Hashtable() { { "fileno", fileNo }, { "uip", GetUserIP() }, { "uno", uno } }) > 0)
{
//System.IO.File.Delete(Server.MapPath(NP.Model.Base.Files + file.fileurl));
System.IO.File.Delete(Server.MapPath(NP.Model.Base.Files + file.fileurl));
return 1;
}
return 0;

View File

@ -390,7 +390,7 @@
) t1
left outer join (
select date_format(l.cdt, '%Y') cyear
,replace(max(substring(l.completeno, -6)), ' 호','') seqNo
,max(substring(replace(replace(l.completeno, ' - N105 - ','N'), '호',''), -6)) seqNo
from lect l
group by date_format(l.cdt, '%Y')
) t2 on t2.cyear = t1.cyear
@ -443,7 +443,7 @@
) t1
left outer join (
select date_format(l.cdt, '%Y') cyear
,replace(max(substring(l.completeno, -6)), ' 호','') seqNo
,max(substring(replace(replace(l.completeno, ' - N105 - ','N'), '호',''), -6)) seqNo
from lect l
group by date_format(l.cdt, '%Y')
) t2 on t2.cyear = t1.cyear

View File

@ -151,6 +151,7 @@
<isNotNull property="isbase" prepend="and">b.pbno is null</isNotNull>
<isNotNull property="cno" prepend="and">b.cno=#cno#</isNotNull>
<isNotNull property="cmno" prepend="and">b.cmno=#cmno#</isNotNull>
<isNotNull property="bmposition" prepend="and">a.bmposition=#bmposition#</isNotNull>
left outer join board b2 on b.pbno is not null and b2.bno=b.pbno
inner join users c on c.userno=b.cno
<dynamic prepend="where">

View File

@ -111,7 +111,7 @@ namespace NP.FO.Controllers
ViewBag.croombmno = cvm.croombmno.ToString();
if (SUserInfo.UserNo < 1) { return Redirect("/Account/Index"); }
cvm.Board = Dao.Get<Board>("board.bs", new System.Collections.Hashtable() { { "bno", cvm.BNo }, { "getcontents", 1 } }).First();
if (cvm.Board.issecr == 1 && cvm.Board.cno != SUserInfo.UserNo) { return Redirect("/"); }
if (cvm.Board.issecr == 1 && !(cvm.Board.cno == SUserInfo.UserNo || cvm.Board.pcno == SUserInfo.UserNo)) { return Redirect("/"); }
if (cvm.Board.cno != SUserInfo.UserNo)
{
Dao.Save("board.bd.read", cvm.BNo);

View File

@ -59,7 +59,7 @@ else
{
<tr class="@(b.istop == 1 ? "visit" : "") @(b.pbno == null ? "" : "reply")">
<th>
<a href="#" onclick="gov(@b.bno, @b.cno, @b.issecr)">
<a href="#" onclick="gov(@b.bno, @b.cno, @b.issecr,@b.pcno )">
<p>
<h5><span>@b.opname2</span> @b.subject <em>@b.rpcountname</em> @Html.Raw(b.issecr == 0 ? "" : "<img src=\"/img/customer/notice_ico.png\" alt=\"\" />")</h5>
<p>@Html.Raw(b.issecr == 1 && b.cno != ViewBag.SSUserNo ? "-" : System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(b.contents, @"<[^>]*>", String.Empty), @"<.*?>", String.Empty))</p>
@ -123,11 +123,11 @@ else
$("#mform #pagenum").val(pno || @Model.pagenum);
$("#mform").submit();
}
function gov(bno, cno, issecr) {
function gov(bno, cno, issecr, pcno) {
if (@ViewBag.SSUserNo < 1) {
gologin(null, location.pathname.replace(/#/gi, '') + location.search.replace(/#/gi,''));
gologin(null, location.pathname.replace(/#/gi, '') + location.search.replace(/#/gi, ''));
}
else if (issecr == 1 && cno != @ViewBag.SSUserNo) {
else if (issecr == 1 && !(cno == @ViewBag.SSUserNo || pcno == @ViewBag.SSUserNO)) {
msg("비밀글입니다.");
} else {
setv("BNo", bno);

View File

@ -406,7 +406,8 @@
var cnt = capResult.obj;
if (cnt > 0) {
// 강좌를 만들 수 있지만 이미 생성된 조건?
msg("이미 수강/수료한 과정입니다.");
@* msg("이미 수강/수료한 과정입니다.");*@
msg("<sapn style='font-size: 15pt;'>현재 신청 하여 수강 중인 과정 또는 이미 수료한 과정입니다.</span>");
return;
}
else {

View File

@ -30,7 +30,7 @@
<link rel="stylesheet" type="text/css" href="/css/mainpopup.css">
<script>function pf() { parent.hppopclick('@(Model.purl??"")'); }</script>
</head>
<body style="padding: 0; margin: 0;" onclick="javascript: pf();">
<body style="padding: 0; margin: 0; overflow: auto !important; " onclick="javascript: pf();">
@Html.Raw(Server.UrlDecode(Model.pcontents ?? ""))
</body>
</html>

View File

@ -10,11 +10,12 @@
/*.req:after{color: red;content:'*'}*/
@media (max-width:1000px) {
.popupitem{
top: 10% !important; left: 10% !important; max-width: 80% !important; max-height: 80% !important}
top: 10% !important; left: 10% !important; max-width: 80% !important; /*max-height: 80% !important*/}
.popupitem .inner .iframebox{position:absolute;top:50px;right:10px;bottom: 50px;left: 10px;}
.popupitem .inner .iframebox iframe{width: 100% !important; height: 100% !important;}
.popupitem .inner .iframebox iframe{width: 100% !important; /*height: 100% !important;*/}
.iframeclosebox{position: absolute; bottom: 10px; text-align: center; left: 10px; right: 10px;}
}
#layermessage, #layermessage2 {overflow-y:auto; max-height:60%}
}
#bglayer, #bglayer2, #findlayerbglayer {
background-color: #000;