<!-- $Id: sms_register_ui.htm 4761 2007-01-30 09:06:55Z paulgao $ -->
{include file="pageheader.htm"}

<div id="main-div">
<ul style="padding:0; margin: 0; list-style-type:none; color: #CC0000;">
  <li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px;" >点击这里立即<a href="http://agent.99bill.com/agent/jsp/agent/onlineprotocol/agentProtocol.do?act=check&agentno=bjcx13" target="_blank" style="color:#CC0000; font-weight:bold;">注册快钱账号</a>，您即可获得 <b>1500</b> 条免费发放的短信。</li>
</ul>
<div class="main-div">
<form name="sms-register-form" action="sms.php?act=register" method="POST" onsubmit="return validate_register();">
<table>
  <tr>
    <th colspan="2">{$lang.register_new}</th>
  </tr>
  <tr>
    <td colspan="2" style="padding: 0 10%; color: #CC0000">如果您是通过 ECSHOP 快钱版申请的快钱帐号。您必须使用和快钱帐号相同的 Email 地址来注册短信帐号，您才能得到获得的 1500 条短信</td>
  </tr>
  <tr>
    <td class="label">{$lang.email}:</td>
    <td><input type="text" name="email" maxlength="60" size="20" value="{$sms_site_info.email}" />{$lang.require_field}</td>
  </tr>
  <tr>
    <td class="label">{$lang.password}:</td>
    <td><input type="password" name="password" maxlength="20" size="20" value="" />{$lang.require_field}</td>
  </tr>
  <tr>
    <td class="label">{$lang.domain}:</td>
    <td><input type="text" name="domain" maxlength="60" size="40" value="{$sms_site_info.domain}" />{$lang.require_field}</td>
  </tr>
  <tr>
    <td class="label">{$lang.phone}:</td>
    <td><input type="text" name="phone" maxlength="60" size="20" value="" /></td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <input type="submit" name="submit" value="{$lang.button_submit}" class="button" />
      <input type="reset" value="{$lang.button_reset}" class="button" />
    </td>
  </tr>
</table>
</form>
</div>
<div class="main-div">
<form name="sms-enable-form" action="sms.php?act=enable" method="POST" onsubmit="return validate_enable();">
<table>
  <tr>
    <th colspan="2">{$lang.enable_old}</th>
  </tr>
  <tr>
    <td class="label">{$lang.email}:</td>
    <td><input type="text" name="email" maxlength="60" size="20" value="{$sms_site_info.email}" />{$lang.require_field}</td>
  </tr>
  <tr>
    <td class="label">{$lang.password}:</td>
    <td><input type="password" name="password" maxlength="20" size="20" value="" />{$lang.require_field}</td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <input type="submit" name="submit" value="{$lang.button_submit}" class="button" />
      <input type="reset" value="{$lang.button_reset}" class="button" />
    </td>
  </tr>
</table>
</form>
</div>
</div>

<script type="text/javascript" language="JavaScript">
<!--
{literal}
function validate(formName) {
  var f = document[formName],
      email = f.email.value,
      password = f.password.value;

  var reEmpty = /^\s*$/,
      reEmailFormat = /^[^@]+@.+$/,
      errorStr = '';

  if (reEmpty.test(email)) {
    errorStr += username_empty_error + "\n";
  }

  if (!reEmailFormat.test(email)) {
    errorStr += username_format_error + "\n";
  }

  if (reEmpty.test(password)) {
    errorStr +=  password_empty_error + "\n";
  }

  return errorStr;
}

function validate_register() {
  var errorStr = validate("sms-register-form"),
    domain = document["sms-register-form"].domain.value,
    reEmpty = /^\s*$/,
    reDomainFormat = /^(?:[^.]+\.)*\w+\/?$/;

  if (reEmpty.test(domain)) {
    errorStr += domain_empty_error + "\n";
  }
  if (!reDomainFormat.test(domain)) {
    errorStr += domain_format_error + "\n";
  }

  if (errorStr === '') {
    return true;
  } else {
    alert(errorStr);
    return false;
  }
}

function validate_enable() {
  var errorStr = validate("sms-enable-form");

  if (errorStr === '') {
    return true;
  } else {
    alert(errorStr);
    return false;
  }
}
{/literal}
//-->
</script>
{include file="pagefooter.htm"}