test

C code posted
created at 29 Jan 05:07

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.dreamsecurity.relaycert.db.*"%>
<%@ page import="com.dreamsecurity.relaycert.object.objFAQ" %>


<%

  
  int idx = Integer.parseInt(request.getParameter("idx"));
  int pg = Integer.parseInt(request.getParameter("pg"));
  String fType = request.getParameter("ftype");
  
  //================================================ DB setting - S ================================================
  DBProcessManager dbObj = null;  
  String confBaseDir = application.getInitParameter( "relaycert.base.conf.directory" );
  
  if( confBaseDir=="" || confBaseDir==null )
    confBaseDir = "./conf";
  
  dbObj = new DBProcessManager( confBaseDir + "/db.properties");    
  //================================================ DB setting - E ================================================
  
  
  objFAQ vo = dbObj.viewFAQ(idx);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title> </title>

  <meta http-equiv="X-UA-Compatible" content ="IE=Edge"/>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Cache-Control" content="no-cache" />
  <meta http-equiv="Expires" content="0" />
  <meta http-equiv="Pragma" content="no-cache" />       

  <link rel="stylesheet" href="../css/layout.css" />
  <link rel="stylesheet" href="../css/sub.css" />
  <link rel="stylesheet" type="text/css" href="../css/tab.css" />
  <link rel="stylesheet" type="text/css" href="../css/sumoselect.css"/>
  
  <script language="javascript" src="../js/GPKICommon_CMP.js"> </script>
  <script language="javascript" src="../js/var.js" > </script>
  <script language="javascript" src="../js/spin.js" > </script>
  <script language="javascript" src="../js/jquery-1.11.3.min.js"> </script>
  <script language="javascript" src="../js/jquery.sumoselect.js"> </script>
  <script src="../js/jquery.accordion.js"></script>
  <script language="javascript" src="../js/Base64.js"> </script>
  <jsp:include page="common.jsp" flush="false"/>
  <%
  String sValue = (String)session.getAttribute("suname");
  if( sValue == "" || sValue == null )
  { 
  %>
    <script type='text/javascript'>
    self.window.alert("로그인을 먼저 수행하세요.");
    location.href="adminLogin.jsp";
    </script>
  <%    
  }
  %>
  <script>
  
  //mod by leegy
  function modifyCheck()
  {
    var form = document.modifyform;
   
    var slValue = form.faqtype.options[form.faqtype.selectedIndex].value;
     if( slValue == null || slValue == 00 )
       {
        alert( "FAQ 구분을 선택하세요." );
        form.faqtype.focus();
        return;
       }
     form.ftype.value = slValue;
     
     if( !form.opername.value )
       {
        alert( "운영자 이름을 입력하세요." );
        form.opername.focus();
        return;
       }
     
      if( !form.title.value )
       {
        alert( "FAQ 제목을 입력하세요." );
        form.title.focus();
        return;
       }    
   
      if( !form.memo.value )
       {
        alert( "FAQ 내용을 입력하세요." );
        form.memo.focus();
        return;
       }    
   
      form.submit();
  }
  
  // add by leegy
  function limitCharacters(textid, limit)
  {
    // 잆력 값 저장
    var text = $('#'+textid).val();
    // 입력값 길이 저장
    var textlength = text.length;
    stringByteLength = (function(s,b,i,c){
      for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1);
      return b;
    })(text);
    
    if(stringByteLength > limit){
        alert(limit+'자   !');
        // 제한 글자 길이만큼 값 재 저장
        $('#'+textid).val(text.substr(0,limit));
        $('#'+textid).focus();
        return false;
    }else{
        return true;
    }
  }
  
  // add by leegy
  $(function(){
        $('#opername').keyup(function(){
                limitCharacters('opername', 16);
        })
        $('#title').keyup(function(){
                limitCharacters('title', 1024);
        })
        $('#memo').keyup(function(){
                limitCharacters('memo', 4000);
        })        
  });  

      //m_navi
  function hd(){
        $("#nav-mobile ul.expanded").removeClass("expanded").slideUp(250);
                $(this).removeClass("open");
    }
    

    $(document).ready(function(){
        $("#nav-mobile").html($("#nav-main").html());
        $("#nav-trigger span").click(function(){
            if (!$("#nav-mobile ul").hasClass("expanded")) {
                $("#nav-mobile ul").addClass("expanded").slideDown(250);
                $(this).addClass("open");
            } else {
        $("#nav-mobile ul.expanded").removeClass("expanded").slideUp(250);
                $(this).removeClass("open");
                
            }
        });
    });
    
   //Document Click
   var ctrmenu = 0;
    $(document).mouseup(function(){
    if(ctrmenu==0){
          $("#nav-mobile ul.expanded").removeClass("expanded").slideUp(250);
          $("#nv-trigger span").removeClass("open");
     }
    });

/*! Dropdown List*/
        $(document).ready(function () {
            window.asd = $('.SlectBox').SumoSelect({ csvDispCount: 3 });
            window.test = $('.testsel').SumoSelect({okCancelInMulti:true });
            window.testSelAll = $('.testSelAll').SumoSelect({okCancelInMulti:true, selectAll:true });
            window.testSelAll2 = $('.testSelAll2').SumoSelect({selectAll:true });
        });
    
   // 저장하기 탭 메뉴 
  function tab_menu(num){  
  var f = $('.faq_title_btn').find('li');
  for ( var i = 0; i < f.length; i++ ) {      
    if ( i == num) {      
      f.eq(i).addClass('active');  
      $('.menu_tab0' + i ).show();
    } else {
      f.eq(i).removeClass('active');          
      $('.menu_tab0' + i ).hide();
    }
  }
  }
  
//탭메뉴
    $(function() {
      $('.faq_tab').accordion({ multiOpen: false });
    });
    
  </script>
  
</head>

<body>
  <iframe id = "MagicCMPNpIframe" style="display:none"></iframe>
  <div id="wrapper">
      <div id="top_gnb">
          <div class="contents">
        <div class="top_bord">
                <h1><a href="./gotoCertMgmt.jsp"><img src="../images/layout/top_logo.gif" alt="한국도로공사" /></a></h1>
                <!-- mod by leegy -->
                <div class="top_info">
            <span class="top_info1"><a href="./gotoCertMgmt.jsp"></a></span>
            <span class="top_info2"><a href="./adminLogout_ok.jsp"><span class="btn_dkblu"></span></a></span>
            <span class="top_info3">[<%=sValue %>]   .</span>
          </div>
        </div>
      </div>
        </div><!--//top_gnb-->
        <div class="contents">
          <div id="left_lnb">
              <a href="./gotoCertMgmt.jsp"><h2></h2></a>
            <ul class="lnb">
          <li><a href="statisticspage.jsp"> </a></li>
          <li><a href="deptCertStatistic.jsp"> </a></li>
          <li><a href="issuedStatus.jsp"> </a></li>          
          <li><a href="userRequest.jsp"> </a></li>          
          <li><a href="exuserRequest.jsp"> </a></li>
          <li><a href="userRegister.jsp"> /</a></li>
          <li><a href="approval.jsp"> /</a></li>          
          <li><a href="login_option.jsp">  </a></li>              
          <li><a href="adminList.jsp"> </a></li>          
          <li class="last on"><a href="faqList.jsp">  </a></li>
                </ul>
            </div><!--//left_lnb-->
            <div id="right_contents">
             <!-- add by leegy -->
      <div class="con_tit_area">
        <div class="con_tit_navi"><img src="../images/icon_home.png" alt="home"/> &gt;  &gt; FAQ  &gt; <b>FAQ </b></div>
      </div>            
      <h3 class="cont_h3">FAQ </h3>
      <!-- add by leegy -->
      <h4 class="cont_h4"> FAQ  .</h4>      
  <!--content-->
  <div id="content">

<!-- Content : S -->
    <form name=modifyform method=post action="faqModify_ok.jsp?idx=<%=idx%>&pg=<%=pg%>&ftype=<%=fType%>">
    <div class="con_box_area">
      <div class="con_box_full">
        <!-- del by leegy -->
        <!-- span class="con_sub_tit"><span class="blu_bullet">+</span> FAQ  </span-->
        <div class="info_tbl_area">
          <table class="info_tbl">
            <caption>FAQ </caption>
            <!-- mod by leegy -->
            <colgroup>
              <col width="120px"/>
              <col width="200px"/>
              <col width="120px"/>
              <col width="200px"/>
            </colgroup>
            <tr>
              <th></th>
              <td>
                <select class="SlectBox" name="faqtype">
            <%if( "01".equals(vo.getFaqtype()) ) { %>  
                <option value="01" selected="selected"> </option>
                <option value="02"> </option>
            <% } else { %>
                <option value="01"> </option>
                <option value="02" selected="selected"> </option>
            <% } %>
                </select>
              </td>
            
              <th></th>
              <td><input type="text" name="opername" id="opername" class="input" value="<%=sValue%>" /></td>
            </tr>              
            
            <tr>
              <th></th>
              <td colspan="3"><input type="text" name="title" ide="title" class="input" value='<%=vo.getTitle()%>'/></td>
            </tr>
          </table>
        </div>
      </div>
        
      <div class="con_box_full">
        <div class="info_tbl_area">
          <textarea name="memo" id="memo" class="textarea" style="height:300px;"><%=vo.getMemo()%></textarea>
        </div>
      </div>        
    </div>
    
    <input type="hidden" name="ftype"/>
    </form>
<!-- Content : E -->
          
    <div class="con_box_clear"></div>

<!-- Searching : S -->
    <div class="confirm_area">
      <div class="con_btn_area_C">
        <a href="javascript:modifyCheck();"><span class="btn_blu"></span></a>
        <a href="javascript:history.back(-1);"><span class="btn_nor"></span></a>
      </div>
    </div>
<!-- Searching : S -->

  </div>
  <!--//content-->
        
      
            </div><!--//right_contents-->
        </div><!--//contents-->
        
    </div><!--//wrapper-->
</body>
</html>
9.72 KB in 63 ms with coderay