Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
cts.eemo.co.kr
/
public_html
/
src
/
web
/
view
/
contents
/
edu
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/cts.eemo.co.kr/public_html/src/web/view/contents/edu/view.php
<?php $tableName = $_REQUEST['tableName']; $index = $_REQUEST['idx']; $result = \Mobile::get_contents ($tableName, $index); ?> <div class='text-right'> <button type="button" onClick="btnEdite('<?php echo $tableName;?>', '<?php echo $index; ?>');" class="btn btn-success">수정</button> <button type="button" onClick="btnDelete('<?php echo $tableName;?>', '<?php echo $index; ?>');" class="btn btn-danger">삭제</button> <button type="button" onClick="btnList();" class="btn btn-info">목록</button> </div> <div class="card mb-4"> <div class="card-body"> <div class="form-group"> <label class="form-label form-label-lg font-weight-bold" >제 목</label> <input type="text" id="inp_title" value="<?php echo $result[0]["info_title"];?>" name="inp_title" class="form-control form-control-lg" readonly> </div> <label class="form-label form-label-lg font-weight-bold" >내 용</label> <div class="card shadow-none bg-transparent border-warning mb-3"> <div class='card-body'> <?php echo base64_decode($result[0]["info_contents"]); ?> </div> <div class="text-right mr-3"> <?php echo $result[0]["info_writer"]; echo "<br />"; echo substr($result[0]["info_date"], 0 , 10); ?> </div> </div> </div> </div> <script> $(function() { //원인을 잡기 힘든 박스 숨김 document.getElementsByClassName("ql-hidden")[0].style.display='none'; }); function btnDelete(tableName, index) { var obj = { "types" : "confirm", "title" : "MessageBox", "content" : "삭제하시겠습니까? 삭제된 내용은 복구할 수 없습니다.", "lbFunction" : "goDelProcess(true,'"+tableName+"',"+index+")", "rbFunction" : "goDelProcess(false,'"+tableName+"',"+index+")" }; alertModals(obj); } // 삭제 버튼 이벤트 function goDelProcess(bool, tableName, index) { if(bool) { var data = new FormData(); data.append('system', 'delete'); data.append('tableName', tableName); data.append('index', index); $.ajax({ data: data, type: 'post', url: '/contents/info/process.php', cache: false, contentType: false, processData: false, dataType: 'json', success: function(data) { switch(data['msg']) { case 'success': location.href = "/contents/info/list.php?page=1&tableName="+tableName; break; } }, error: function(error, request) { console.log('code:' + request.status+'\n'+'message: '+request.responseText+'\n'+'error: '+error); } }); } } // 수정 버튼 이벤트 function btnEdite(tableName, index) { location.href = "/contents/info/edite.php?idx="+index+"&tableName="+tableName; } // 목록 버튼 이벤트 function btnList() { location.href = "/contents/info/list.php?page=1&tableName=info"; } </script>