ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/admin/setting/ |
Upload File : |
<? include "../include/top.html"; include "_common.php"; if($idx){ $rows = db_fetch("select * from TB_TRANSLATE where idx='$idx'"); $rows[ko] = stripslashes($rows[ko]); $rows[en] = stripslashes($rows[en]); $rows[cn] = stripslashes($rows[cn]); $rows[hk] = stripslashes($rows[hk]); } if(!$SqlType) $SqlType = "trans_ins"; ?> <style> #papagoImg{float: right;width: 187px;margin-right: 6px;margin-top:18px} .translatePapagoBtn{float: right;background: #21dc6d;color:#fff;padding: 25px 30px;cursor: pointer;margin-top:13px;font-size:20px;margin-right:5px} .papagoIziToast{border-radius:5px;position:relative;top:-1px} textarea:nth-child(1),textarea:nth-child(2),textarea:nth-child(3){background:#fff;border:1px solid #21dc6d;border-radius:5px; padding: 10px;} </style> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title">일반설정<span class="arrow">></span><strong>번역</strong></div> <div class="contents_detail"> <div class="setting_wrap"> <!-- 폼 --> <form name="frm_edit" id="frm_edit" method="post" enctype="multipart/form-data"> <input type="hidden" name="SqlType" value="<?=$SqlType?>" /> <input type="hidden" name="idx" value="<?=$idx?>" /> <h2 class="mt30">번역</h2> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_setting" summary="사이트 기본정보를 설정하실 수 있습니다."> <caption>번역</caption> <colgroup> <col width="180px" /> <col /> </colgroup> <tbody> <tr> <th scope="row"><label for="ko">한글</label></th> <td> <textarea name="ko" style="width:80%;min-height:70px" hname="한글" placeholder="번역할 내용을 입력하세요." required><?=$rows[ko]?></textarea> <img id="papagoImg" src="/admin/image/papago.png" /> </td> </tr> <tr> <th scope="row"><label for="en">영어</label></th> <td> <textarea name="en" style="width:80%;min-height:70px"><?=$rows[en]?></textarea> <span class="translatePapagoBtn" targetLang="en">영어 자동번역</span> </td> </tr> <tr> <tr> <th scope="row"><label for="hk">번체</label></th> <td> <textarea name="hk" style="width:80%;min-height:70px"><?=$rows[hk]?></textarea> <span class="translatePapagoBtn" targetLang="zh-TW">번체 자동번역</span> </td> </tr> <tr> <th scope="row"><label for="location">파일위치</label></th> <td> <textarea name="location" style="width:80%;min-height:70px"><?=$rows[location]?></textarea> </td> </tr> </tbody> </table> <div class="btn_wrap_C mt30" style="background:#edf0f5"> <a href="javascript:;" onClick="check_frm();" class="Bbtn red">등록</a> <a href="site_translate.html" class="Bbtn">목록</a> </div> </form> <!-- /폼 --> </div> </div> </div> </div> <script type="text/javascript"> function check_frm() { var f=document.frm_edit; // 폼체크 var result = to_validation(f); if (result == false) return false; if(!confirm("저장하시겠습니까?")) return false; $("form#frm_edit").attr("action","site_setting_proc.php"); $("form#frm_edit").submit(); //ajax_post("ajax_proc","site_setting_proc.php","frm_edit"); } $('.translatePapagoBtn').click(function(){ korKeyword = $('textarea[name="ko"]').val(); if(!korKeyword){ iziToast.show({ timeout:2000, color: 'red', title: '<img width="20" class="papagoIziToast" src="/admin/image/papago_og.png"> 파파고 번역', message: '한국어를 입력하세요.', }); $('textarea[name="ko"]').focus(); return false; } targetLang = $(this).attr('targetlang'); papago(korKeyword, targetLang); }) function papago(korKeyword, targetLang){ $.ajax({ type: "POST", url: "/admin/ajaxData/", data: {mode:'translatePapago',korKeyword,targetLang}, dataType: 'json', async:false, success: function (data) { if(data.result == true){ if(targetLang == 'en'){ $('textarea[name="en"]').val(data.translateWord); }else if(targetLang == 'zh-CN'){ $('textarea[name="cn"]').val(data.translateWord); }else if(targetLang == 'zh-TW'){ $('textarea[name="hk"]').val(data.translateWord); } iziToast.show({ timeout:2000, color: 'green', title: '<img width="20" class="papagoIziToast" style="border-radius:5px" src="/admin/image/papago_og.png"> 파파고 번역', message: '번역완료', }); }else{ iziToast.show({ timeout:2000, color: 'red', title: '<img width="20" class="papagoIziToast" style="border-radius:5px" src="/admin/image/papago_og.png"> 파파고 번역', message: '번역을 할 수 없습니다.', }); } }, error: function (e) { } }); } </script> <? include "../include/footer.html" ?>