INDEX.jsp 2.1 KB
Newer Older
Thitichaipun Wutthisak committed
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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<jsp:useBean id="main" class="com.csc.library.system.Task" scope="page"/>
<%
        main.setChannel(request,response);
        main.checkProfile();
        UProfile uprofile=main.getUProfile();
        String data="";  
        if( uprofile == null ){
                response.sendRedirect("../hr/EMPVIEW/INDEX.jsp");
        }else{
                DbRecord rec=new InitialRecord(uprofile).getDbRecord("mfckeditor");
                rec.setColumn("*");
                rec.set("FCKID",(String)uprofile.get("companyid"));
                rec.search();
                data = rec.getString("fckdata");
        }
%>

<head>	
    <meta http-equiv="Content-Type" content="text/html; charset=window-874" />
    <meta name="robots" content="noindex, nofollow" />
    <link href="sample.css" rel="stylesheet" type="text/css" />
    <link rel="shortcut icon" href="fckeditor.gif"
          type="image/x-icon" />
    <script language="JavaScript" type="text/javascript">
        function save(){
            with(document.cscform){
                __cmd.value="save";
                submit();
            }
        }
    </script>
</head>

<body>

    <form name="cscform" action="data.jsp" method="post" target="_blank">
        <input type="hidden" name="__cmd"  value="">
        <FCK:editor instanceName="EditorDefault" height="600" width="100%">
            <jsp:attribute name="value"><%=data%></jsp:attribute>
            <jsp:body>
                <FCK:config AutoDetectLanguage="${empty param.code ? true : false}"
                            DefaultLanguage="${empty param.code ? 'en' : param.code}"  />						
            </jsp:body>
        </FCK:editor>
        <br />
        <input type="submit" value="Privew" /> 		<input type="Button" value="Submit" onClick="javascript:save()"/>
    </form>
</body>
</html>