<!--<?php
# MetInfo Enterprise Content Management System 
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.d.
require_once template('head'); 
echo <<<EOT
-->
</head>
<body>
<!--
EOT;
$listclass[3]='class="now"';
require_once template('app/sms/top');
echo <<<EOT
-->
<div class="v52fmbx_tbmax">
<div class="v52fmbx_tbbox">
<div class="v52fmbx">	
		<span class="xtips" id="msgtable"><span class="red" id='msg'></span></span>
<form method="POST" name="myform" action="http://{$met_host}/sms/alipay/alipayto.php" target="_blank">
	<input type="hidden" name="total_title" value="{$lang_smstips5}" />
	<input type="hidden" name="total_email" value="{$admin_list[admin_email]}" />
	<input type="hidden" name="total_weburl" value="{$met_weburl}" />
	<input type="hidden" name="total_pass" value="{$total_passok[authpass]}" />
		<h3 class="v52fmbx_hr metsliding">
			{$lang_smstips12}{$lang_marks}
			<ol>
				<li>{$lang_smstips13}{$met_weburl}</li>
				<li class="red">{$lang_smstips14}</li>
<!--
EOT;
if($met_agents_type<=1){
echo <<<EOT
-->	
				<li><a href="http://www.metinfo.cn/faq/sms_costs.htm" target="_blank">{$lang_smstips15}</a></li>
<!--
EOT;
}
echo <<<EOT
-->					
			</ol>
		</h3>
		<div class="v52fmbx_dlbox">
		<dl>
			<dt>{$lang_smstips6}{$lang_marks}</dt>
			<dd>
				<span class="red" id='balance'></span> {$lang_smstips9}
			</dd>
		</dl>
		</div>
		<div class="v52fmbx_dlbox">
		<dl>
			<dt>{$lang_smstips7}{$lang_marks}</dt>
			<dd>
				<img src="http://{$met_host}/sms/alipay/images/alipay.gif" />
			</dd>
		</dl>
		</div>
		<div class="v52fmbx_dlbox">
		<dl>
			<dt>{$lang_smstips8}{$lang_marks}</dt>
			<dd>
				<input type="text" name="total_fee" class="text nonull" style="width:60px;" /> {$lang_smstips9}
			</dd>
		</dl>
		</div>
		<div class="v52fmbx_dlbox none" name="total_email_tr">
		<dl>
			<dt>{$lang_memberEmail}{$lang_marks}</dt>
			<dd>
			<input type="text" name="total_email" class="text nonull" style="width:120px;" value="{$admin_list[admin_email]}" />
			<span class="tips">{$lang_smstips10}</span>
			</dd>
		</dl>
		</div>
		<div class="v52fmbx_submit">
			<input type="submit" name="submit" class="submit" value="{$lang_smstips11}" onclick="return Smit($(this),'myform')" {$disable} />{$fstr}
		</div>
</form>
<h3 class="v52fmbx_hr metsliding">{$lang_smstips78}
<!--
EOT;
if($met_agents_type<=1){
echo <<<EOT
-->					
				<span class="tips" style="float:right;"><a href="http://www.metinfo.cn/faq/sms_costs.htm" target="_blank">{$lang_smstips83}</a></span>
<!--
EOT;
}
echo <<<EOT
-->	
</h3>
<form method="POST" name="myform1" action="index.php?lang=$lang&anyid=$anyid&cs=$cs">
	<input type="hidden" name="action" value="code" />
	<input type="hidden" name="total_title" value="{$lang_smstips5}" />
	<input type="hidden" name="total_weburl" value="{$met_weburl}" />
	<input type="hidden" name="total_pass" value="{$total_passok[authpass]}" />
		<div class="v52fmbx_dlbox">
		<dl>
			<dt>{$lang_smstips78}{$lang_marks}</dt>
			<dd>
			<input type="text" name="total_code" class="text nonull" style="width:120px;" value="" />
			<span class="tips"></span>
			</dd>
		</dl>
		</div>
		<div class="v52fmbx_dlbox none" name="total_email_tr">
		<dl>
			<dt>{$lang_memberEmail}{$lang_marks}</dt>
			<dd>
			<input type="text" name="total_email" class="text nonull" style="width:120px;" value="{$admin_list[admin_email]}" />
			<span class="tips">{$lang_smstips10}</span>
			</dd>
		</dl>
		</div>
		<div class="v52fmbx_submit">
				<input type="submit" name="submit" class="submit" value="{$lang_smstips84}" onclick="return Smit($(this),'myform1')" $disable/>$fstr
		</div>
</form>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	if('$total_passok[authpass]'==''){
		$("[name='total_email_tr']").show();
		$('#balance').html('0.00');
		$('#msg').html('$lang_smstips87');
		$('#msgtable').show();
		$("[name='submit']").attr('disabled','disabled');
		ifreme_methei();
		$.ajax({
			url: 'http://{$met_host}/sms/remain.php?action=json&total_pass=',
			type: 'GET',
			dataType: 'jsonp',
			jsonp: 'jsoncallback',
			success: function(data) {
				if(data.total_pass){
						$.ajax({
							url: 'index.php?action=savedata&total_pass='+data.total_pass,
							type: 'GET',
							success: function(info){
								if(info=='ok'){
									$('#msg').html('$lang_smstips88');
									$("[name='total_pass']").val(data.total_pass);
									$("[name='submit']").removeAttr('disabled');
									$('#msgtable').hide();
								}
							}
						});
				}
			}
		});
		setTimeout(function() {
			if($(msg).html()=='$lang_smstips87'){
				$(msg).empty();
				$(msg).append('$lang_smstips89');
			}
		},
		30000);
	}else{
		$("[name='submit']").attr('disabled','disabled');
		$('#balance').html('$lang_jsx1');
		$.ajax({
			url: 'http://{$met_host}/sms/remain.php?action=json&total_pass=$total_passok[authpass]&metcms_v=$metcms_v',
			type: 'GET',
			dataType: 'jsonp',
			jsonp: 'jsoncallback',
			success: function(data) {
				if(data.msg=='no_user'){
					$('#balance').html('0.00');
					$("[name='total_email_tr']").show();
				}else{
					$('#balance').html(data.msg);
				}
				$("[name='submit']").removeAttr('disabled');
				ifreme_methei();
			}
		});
	}
	
});
</script>
<div class="footer">$foot</div>
</body>
</html>
<!--
EOT;
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved..
?>-->