GetPinyin.php 712 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../class/connect.php");
  4. require("../class/db_sql.php");
  5. require("../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. //验证用户
  9. $lur=is_login();
  10. $logininid=$lur['userid'];
  11. $loginin=$lur['username'];
  12. $loginrnd=$lur['rnd'];
  13. $loginlevel=$lur['groupid'];
  14. $loginadminstyleid=$lur['adminstyleid'];
  15. hCheckEcmsRHash();
  16. db_close();
  17. $empire=null;
  18. //取得汉字
  19. $hz=ehtmlspecialchars($_GET['hz']);
  20. $returnform=RepPostVar($_GET['returnform']);
  21. if(empty($hz)||empty($returnform))
  22. {
  23. echo"<script>alert('没输入汉字!');window.close();</script>";
  24. exit();
  25. }
  26. $py=ReturnPinyinFun($hz);
  27. ?>
  28. <script>
  29. <?=$returnform?>="<?=$py?>";
  30. window.close();
  31. </script>