<!-- $Id: sms_send_ui.htm 16697 2009-09-24 03:57:47Z liuhui $ -->
{include file="pageheader.htm"}

<div class="main-div" id="sms-send">
<form method="POST" action="sms.php?act=send_sms" name="sms-send-form" onsubmit="return validate();">
<table >
  <tr>
    <td class="label">{$lang.phone}:</td>
    <td><textarea name="send_num" rows="6" cols="50"></textarea>
        {$lang.phone_notice}
    </td>
  </tr>
    <tr>
    <td class="label">{$lang.user_rand}:</td>
    <td><select name="send_rank" onchange="show_city(this.value)">
        <option value='0'>{$lang.please_select}</option>
          {html_options options=$send_rank}
        </select></td>
  </tr>
    <tr style="display:none" id="city">
    <td class="label">{$lang.please_city}:</td>
    <td><select name="city_id">
        <option value='0'>{$lang.all_city}</option>
        <!--{foreach from=$city_list item=city}-->
        <option value="{$city.city_id}">{$city.city_name}</option>
        <!--{/foreach}-->
        </select></td>
  </tr>

  <tr>
    <td class="label">{$lang.msg}:</td>
    <td><textarea name="msg" rows="8" cols="50"></textarea>{$lang.require_field} {$lang.msg_notice}</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>

<script type="text/javascript" language="JavaScript">
<!--
{literal}
function  validate() {
  var f = document['sms-send-form'];
  var phone = f.elements['send_num'].value;
  var msg = f.elements['send_rank'].value;

  if(phone==''&&msg==0)
	{
		alert(send_empty_error);
		return false;
	}
	else
	{
	  return true;
	}
}
function show_city(val)
{
  if (val != '0')
  {	
    document.getElementById('city').style.display='block';
  }
  else
  {
    document.getElementById('city').style.display='none';  
  }
}
{/literal}
//-->
</script>
{include file="pagefooter.htm"}