Server : Apache
System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 5.6.40
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/saimikebio.com/js/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/saimikebio.com/js/sms.js
function trim(str) {
	return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1');
}

function check_yzm()
{
	var yzm  = document.getElementById('yzm').value;
    if ( yzm.length == '' || yzm.length !==4 )
    {
        document.getElementById('errortit').innerHTML = '请填写验证码';
   }else{
		Ajax.call( 'user.php?act=captchauser', 'captcha=' + yzm, yzm_callback , 'POST', 'JSON');
   }
}

function yzm_callback(result)
{
	var mobile = trim(document.getElementById("extend_field5").value);
	var captcha = trim(document.getElementById("yzm").value);
	if (result.error==0)
	{
        document.getElementById('errortit').innerHTML = '';
		jQuery('#dialogBg').fadeOut(100,function(){
			jQuery('#dialog').addClass('bounceOutUp').fadeOut();
		});
	}
	else
	{
        document.getElementById('errortit').innerHTML = '验证码错误';
		return;
	}
	Ajax.call('sms.php?step=getverifycode1&r=' + Math.random(), 'mobile=' + mobile + '&captcha=' + captcha, getverifycode1Response, 'POST', 'JSON');
}

function getverifycode1(field_id, field_name) {
	var mobile = trim(document.getElementById(field_id).value);
    if (!(Utils.isMobile(mobile))){
		alert(field_name+"不正确");
		$(field_id).focus();
		return;
	}else{
		getSrceenWH();
		//显示弹框
		jQuery('#dialogBg').fadeIn(300);
		jQuery('#dialog').removeAttr('class').addClass('animated bounceIn').fadeIn();
		//关闭弹窗
		jQuery('.claseDialogBtn').click(function(){
			jQuery('#dialogBg').fadeOut(300,function(){
				jQuery('#dialog').addClass('bounceOutUp').fadeOut();
			});
		});
	}
}

function getverifycode2() {
	var mobile = trim(document.getElementById("mobile").value);
	//var mobile = trim($("mobile").value);
	if(mobile == '') {
		alert("手机号不能为空!");
		$("mobile").focus();
		return;
	}
	Ajax.call('sms.php?step=getverifycode2&r=' + Math.random(), 'mobile=' + mobile, getverifycode2Response, 'POST', 'JSON');
}

function getverifycode1Response(result) {
	if (result.error==0){
		RemainTime();		
	}
	alert(result.message);
}

function getverifycode2Response(result) {
	if (result.error==0){
		RemainTime();		
	}
	alert(result.message);
}

var iTime = parseInt(ztime)-1;
var Account;
function RemainTime(){
	document.getElementById('zphone').disabled = true;
	var iSecond,sSecond="",sTime="";
	if (iTime >= 0){
		iSecond = parseInt(iTime%60);
		iMinute = parseInt(iTime/60)
		if (iSecond >= 0){
			if(iMinute>0){
				sSecond = iMinute + "分" + iSecond + "秒";
			}else{
				sSecond = iSecond + "秒";
			}
		}
		sTime=sSecond;
		if(iTime==0){
			clearTimeout(Account);
			sTime='获取验证码';
			iTime = parseInt(ztime)-1;
			document.getElementById('zphone').disabled = false;
		}else{
			Account = setTimeout("RemainTime()",1000);
			iTime=iTime-1;
		}
	}else{
		sTime='没有倒计时';
	}
	document.getElementById('zphone').value = sTime;
}