<%@page contentType="text/html; charset=UTF-8"%> <%@page import="com.csc.library.utilities.CheckNull,com.csc.library.mail.SendMail,com.csc.library.utilities.*"%> <%request.setCharacterEncoding("UTF-8");%> <% CheckNull chk = new CheckNull(); String cmd = chk.chkNullString(request.getParameter("__cmd")); ThaiUtilities th = new ThaiUtilities(); int result; if(cmd.equalsIgnoreCase("send")){ String from = chk.chkNullString(request.getParameter("__mail_from")); String to = chk.chkNullString(request.getParameter("__mail_to")); String cc = chk.chkNullString(request.getParameter("__mail_cc")); String subject = chk.chkNullString(request.getParameter("__mail_subject")); String message = chk.chkNullString(request.getParameter("__mail_message")); SendMail mail = new SendMail( "", from, to, cc, subject, message); result = mail.send(); } UProfile UPro= (UProfile) session.getAttribute("userprofile"); //out.print(UPro.toString()); %> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="../CSS/TISCO.css" rel="stylesheet" type="text/css"> <script type='text/javascript' src='../JS/SCREEN.js'></script> <script type='text/javascript' src='../JS/DATEINPUT.js'></script> <script type='text/javascript' src='../JS/VIEWCALENDAR.js'></script> <script type='text/javascript' src='../JS/ICONSMENU.js'></script> <script language='javascript'>setLang('tha');</script> <script language="javascript">getTitleName();</script> <script language='javascript' src='../JS/HOTKEY.js'></script> <script language="JavaScript" type="text/JavaScript"> function GoSave(){} function GoUpdate(){} function GoDelete(){} function GoSearch(){} function goHelp(helpName,inputName){ var helpReturn; if(inputName=="__mail_from" ) helpReturn="__mail_from:"; linkHelp_Return(helpName,helpReturn); } function sendMail(){ with(document.cscform){ if (__mail_from.value == "" ) { alert("กรุณากรอกเมล์ผู้รับ"); __mail_from.focus(); } else if (__mail_to.value == "" ) { alert("กรุณากรอกเมล์ผู้ส่ง"); __mail_to.focus(); } else if (__mail_message.value == "") { alert("กรุณาใส่เนื้อหาในการส่งเมล์ครั้งนี้"); __mail_message.focus(); } else { __cmd.value = "send"; submit(); } } } function goBack(){ close(); } function sendMailComp() { alert("ส่งเมล์เรียบร้อยแล้ว"); //window.close(); } function template(type){ with(document.cscform){ //alert(type); var text =""; if(type == "accept"){ //Job Offering Email to candidate / เมล์แจ้งผ่านการสัมภาษณ์และแจ้งข้อมูลการจ้างงาน text="Dear "+aname.value+"\n\n"+com_ename.value+" is pleased to offer you posision of "+position.value+". We \ntust that you khowledge , skill and experience will be among our most valuable \n\nAs we discussed, you starting date will be . The starting \nsalary is 42,000 per with 1,500 Baht per month for cost of cost of living allowance after \npassing probation and is paid a weekly basis .Direct deposit is available.\n\nMedical coverage ,dental and insurance will be provided through our company's \nemployee benefit plan and will be effective on your stating date "+com_ename.value+" \noffers a fiexible paid-time off plan which inciudes vacation,personal,and sick leave.\n\nWe are looking forward to welcome you to "+com_ename.value+"\n\nPlease let me khow if you have any questions or l can provide any additional\ninformation\n\nBest Regards,\n\nHuman Resources - Recruitment\nPhatra Securities Public Company Limited\nTel. (02) 305-9249\nFax (02) 305-9511\nE-mail : "+email.value+"\n\n"; }else if(type == "reject" || type == "reserve" ){ //Rejection Email to candidate / เมล์แจ้งไม่ผ่านการสัมภาษณ์ สำรองและปฎิเสธ text ="Dear "+aname.value+"\n\n"+com_ename.value+" would like to thank you for taking your time to participate in our \nhiring process. This letter is to inform you that we have selected another candidate.\n\nYou were an exceptional candidate for our job and we hope that you apply for openings\nat "+com_ename.value+" for which you qualify in the future. While you were not selected for \nthe current opening, the interview team did not make this decision lightly. Your future \napplications will receive thorough review.\n\nAgain, thank you for taking the time to meet our interview team. We enjoyed meeting \nyou and our discussions indicated that you have much to offer your next employer.\n\nWe wish you both personal and professional success in your job search and in the \nfuture. We appreciate your interest in our organization.\n\nBest Regards,\n\nHuman Resources - Recruitment\nPhatra Securities Public Company Limited\nTel. (02) 305-9249\nFax (02) 305-9511\nE-mail : "+email.value+"\n\n "; } __mail_message.value=text; } } </script> </head> <body leftmargin="0" topmargin="0"> <div id="toolTipLayer" style="position:absolute; visibility: hidden"></div> <form name="cscform" method="post" action="REC604.jsp"> <!----------BEGIN CSC INITIAL ZONE ------------------------> <%//=screen.InitialVariable()%> <!----------END CSC INITIAL ZONE --------------------------> <!---------------- HIDDEN FIELD ZONE ----------------------> <!-- All Use --> <input type="hidden" name="__screen" value="REC604"> <input type="hidden" name="__cmd" value=""> <input type="hidden" name="__help" value=""> <input type="hidden" name="__goPage" value=""> <input type="hidden" name="__orderBy" value=""> <input type="hidden" name="__helpReturn" value=""> <input type="hidden" name="__helpName" value=""> <input type="hidden" name="__pageCall" value=""> <input type="hidden" name="__fixCon" value=""> <input type="hidden" name="__fixFilter" value=""> <input type="hidden" name="__language" value="<%//=screen.getUProfile().get("lang")%>"> <input type="hidden" name="__companyid" value="<%//=screen.getUProfile().get("companyid")%>"> <input name="aname" type="hidden" value="<%=th.ASCII2Unicode(request.getParameter("aname"))%>"> <input name="position" type="hidden" value="<%=th.ASCII2Unicode(request.getParameter("position"))%>"> <input name="place" type="hidden" value="<%=th.ASCII2Unicode(request.getParameter("place"))%>"> <input name="room" type="hidden" value="<%=th.ASCII2Unicode(request.getParameter("room"))%>"> <input name="date" type="hidden" value="<%=th.ASCII2Unicode(request.getParameter("date"))%>"> <input name="time" type="hidden" value="<%=th.ASCII2Unicode(request.getParameter("time"))%>"> <input name="com_ename" type="hidden" value="<%=UPro.get("com_ename")%>"> <input name="email" type="hidden" value="<%=UPro.get("email")%>"> <script language="javascript">getInputFormatDate();</script> <script language="javascript">initToolTips();</script> <br> <table width="814" height="" border="0" align="center" cellpadding="0" cellspacing="0" class="large"> <tr> <td height="20" class="header">REC604,<script language="javascript">swapLang("Send Mail");</script> </td> </tr> <tr> <td class="blankspace"></td> </tr> <td><table align="center" border="0" cellpadding="0" cellspacing="0" class="largest"> <tr> <td><table border="0" cellpadding="0" cellspacing="1" class="inframe"> <tr> <td width="150" nowrap class="columnlabel"><script language="javascript">swapLang("To ");</script> </td> <td width="717"><input name="__mail_to" type="text" size="80" maxlength="80" onkeypress = "chkNotThaiChaOnly()" value="<%=chk.chkNullString(request.getParameter("__mail_to"))%>"></td> </tr> <tr> <td nowrap class="columnlabel"><script language="javascript">swapLang("From");</script> </td> <td><input name="__mail_from" type="text" size="80" maxlength="80" onblur = "chkEmail(this)" onkeypress = "chkNotThaiChaOnly()" value="<%=chk.chkNullString(request.getParameter("__mail_from"))%>"></td> </tr> <tr> <td nowrap class="columnlabel"><script language="javascript">swapLang("Subject");</script> </td> <td><input name="__mail_subject" type="text" size="80" maxlength="80" value="<%= chk.chkNullString(request.getParameter("subject"),"นัดหมายสัมภาษณ์งาน")%>"></td> </tr> <tr> <td valign="top" nowrap class="columnlabel"><script language="javascript">swapLang("Message");</script> </td> <td><textarea name="__mail_message" cols="125" rows="20"><%= chk.chkNullString(request.getParameter("__mail_message"),"")%></textarea> <script language="javascript">//template('<%//=chk.chkNullString(request.getParameter("type"))%>');</script></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td class="blankspace"> </td> </tr> <tr> <td class="blankspace"> <div align="center" > <a href="javascript:sendMail();"><img src="../IMAGES/BUTTON/SEND.gif" border="0"></a> <a href="javascript:goBack();"><img src="../IMAGES/BUTTON/BACK.gif" border="0"></a> </div> </td> </tr> <tr> <td class="blankspace"></td> </tr> <td height="28" class="bottom"></td> </tr> </table> <% if (request.getParameter("__cmd") != null && request.getParameter("__cmd").equals("send")) { %> <script language="javascript">sendMailComp()</script> <% }else{ %> <script language="javascript">template('<%=chk.chkNullString(request.getParameter("type"))%>');</script> <% }%> </form> </body> </html>