$(function(){ $("body").append('
'); $("#w").inputLabel('输入文字查询,即可听到潮州音发音',{force:true,color:"#CCD"}); }); function play(file, type) { if(file!=''){ if(type == 2) { file = '/common/upload/sentencesound/'+file; } else { file = '/common/upload/sound/'+file; } if(CheckFlashInstall()){ code = ''; $('#player').html(code); } else { window.open(file); } }else{ alert('对不起,暂未录制该读音'); } } function openWindow(url,title,width,height,params) { $('#window').html('
'); }}); } function closeWindow(){ $("#window").dialog('close'); } function updateMenu() { $('#menu').load("/index.php/html-menu-l-cn"+'-t-'+Date.parse(new Date())); } function updateTopMenu() { updateMenu(); $('#top-menu').load("/index.php/html-topmenu-l-cn"+'-t-'+Date.parse(new Date())); } function moorSound() { $("#more-sound-window").dialog({width: 400,height: 500,modal: true,resizable: false,position:'center'}); } function regedit() { openWindow("/index.php/member-regedit-l-cn","会员注册",600,410,""); } function login() { openWindow("/index.php/member-login-l-cn","会员登录",600,300,""); } function changePassword() { openWindow("/index.php/member-changepassword-l-cn","修改密码",600,350,""); } function editInfo() { openWindow("/index.php/member-editinfo-l-cn","修改个人资料",600,600,""); } function getPassword() { openWindow("/index.php/member-getpassword-l-cn","找回密码",600,300,""); } function myRecords() { $("#window").html(''); $("#window").dialog({title:'我的录音记录',width: 700,height: 500,modal: true,resizable: false,position:'center', close:function(){ $(this).html('
'); }}); } function logout() { $.get("/index.php/member-logout-l-cn"+'-t-'+Date.parse(new Date()), function(result){ alert('您已成功退出'); updateTopMenu(); }); } function addVoter(id) { $.get("/index.php/dict-addvoter-l-cn"+'-id-'+id, function(result){ if(result==1){ var count = parseInt($('#vote-count-'+id).text()) + 1; $('.vote-count-'+id).text(count); }else if(result==2){ alert('您已经赞同过该读音'); }else{ alert('操作失败'); } }); } this.CheckFlashInstall = function() { var PlayerVersion =[]; if(navigator.plugins && navigator.mimeTypes.length){ var x = navigator.plugins["Shockwave Flash"]; if(x && x.description) { PlayerVersion =x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."); } }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE var axo = 1; var counter = 3; while(axo) { try { counter++; axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter); PlayerVersion = [counter,0,0]; } catch (e) { axo = null; } } } else { /// Win IE (non mobile) /// do minor version lookup in IE, but avoid fp6 crashing issues try{ var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); }catch(e){ try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); PlayerVersion =[6,0,21]; axo.AllowScriptAccess = "always"; } catch(e) { if (PlayerVersion[0] == 6) return PlayerVersion; } try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch(e) {} } if (axo != null) { PlayerVersion = axo.GetVariable("$version").split(" ")[1].split(","); } } if(PlayerVersion.length>0){ return true; }else{ return false; } }