<script src="script/my_lightbox.js" language="javascript"></script>
<script type="text/javascript" src="script/Validator.js"></script>
<script src="<{$config.weburl}>/script/jquery.niceforms.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
	$(".radio").dgStyle();
});
var city='<{$de.city}>';
var province='<{$de.province}>';
function getHTML(v)
{	
	var ob="city";
	var url = '<{$config.weburl}>/ajax_back_end.php';
	var sj = Math.random();
	var pars = 'shuiji=' + sj+'&prov_id='+v;
	$.post(url, pars,showResponse);
	function showResponse(originalRequest)
	{
		var tempStr = 'var MyMe = ' + originalRequest; 
		var i=0;var j=0;
		eval(tempStr);
		for(var s in MyMe)
			++j;
		document.getElementById(ob).options.length =j+1;
		for(var k in MyMe)
		{
			var cityId=MyMe[k][0];
			var ciytName=MyMe[k][1];
			document.getElementById(ob).options[k].value = cityId;
			document.getElementById(ob).options[k].text = ciytName;
			if(city!=''&&city==ciytName)
				document.getElementById(ob).options[k].selected = true;
	　	}
	 }
　}
<{if $de.city}>
	getHTML('<{$de.province}>');
<{/if}>
</script>
<{$slogin}>
<div class="admin_right_top"><{$lang.profile}></div>
<form action="" method="post" enctype="multipart/form-data" onSubmit="return Validator.Validate(this,3)">
<table class="admin_table">
    <tr>
        <td class="td" width="16%"><{$lang.userid}></td>
        <td><{$smarty.cookies.USER}></td>
    </tr>
    <tr>
        <td class="td"><{$lang.fullname}><em>*</em> </td>
        <td><input name='name' type='text' id="name" value="<{$de.name}>" dataType="Require" msg="<{$lang.ar_con_user}>">
        </td>
    </tr>
    <tr>
        <td class="td"><{$lang.xingbie}><em>*</em></td>
        <td>
        <label class="radio"><input name="sex" type="radio" value="1" <{if $de.sex==1}>checked="checked"<{/if}>/><{$lang.boy}></label>
        <label class="radio"><input name="sex" type="radio"  value="2" <{if $de.sex==2}>checked="checked"<{/if}>/><{$lang.gilr}></label>
        </td>
    </tr>
    <tr>
        <td class="td">Email<em>*</em></td>
        <td><input name='email' type='text' value="<{$de.email}>" dataType="Require" msg="<{$lang.ar_email}>"></td>
    </tr>
    <tr>
        <td class="td"><{$lang.mobile}><em>*</em></td>
        <td><input name="mobile" type="text" id="mobile" dataType="Require" msg="<{$lang.ar_tel}>" value="<{$de.mobile}>"></td>
    </tr>
    <tr>
        <td class="td"><{$lang.tel}></td>
        <td><input name='tel' type='text' value="<{$de.tel}>" ></td>
    </tr>
    <tr>
        <td class="td"><{$lang.position}></td>
        <td><input name='position' type='text' id="position" value="<{$de.position}>" dataType="Require" msg="<{$lang.ar_position}>"></td>
    </tr>
    <tr>
        <td class="td">Q Q</td>
        <td><input name="qq" type="text" value="<{$de.qq}>" maxlength="13"></td>
    </tr>
    <tr>
        <td class="td">MSN</td>
        <td><input name="msn" type="text" value="<{$de.msn}>" maxlength="30"></td>
    </tr>
    <tr>
        <td class="td">skype</td>
        <td><input name="skype" type="text" value="<{$de.skype}>" ></td>
    </tr>
    <tr>
        <td class="td"><{$lang.province}>/<{$lang.city}><em>*</em> </td>
        <td><{if $de.country=='china' or $de.country=='China' or $de.country=='中国'}>
        <select  name="province" id="province" onChange="getHTML(this.value)" style="width:123px;" />
        <option value=""><{$lang.ar_province}></option>
        <{$prov}>
        </select>
        <select name="city" id="city" />
        <option value=""><{$lang.ar_city}></option>
        </select>
        <{else}>
        <input id="province1" class="w150" name="province1" type="text" value="<{$de.province}>"/>
        <input id="city1" class="w150" name="city1" type="text" value="<{$de.city}>"/>
        <{/if}>
        </td>
    </tr>
    <tr>
        <td class="td"><{$lang.picture}></td>
        <td><input name="logo" type="text" id="logo" value="<{$de.logo}>">
        [<a href="javascript:uploadfile('LOGO','logo',300,300)"><{$lang.upload}></a>] 
        [<a href="javascript:preview('logo');"><{$lang.preview}></a>]
        [<a href="javascript:delet_pic('logo');"><{$lang.delete}></a>] </td>
    </tr>
    <tr>
        <td colspan="2">
        <input type='submit' name='Submit' value='<{$lang.submit}>' class="btn" />
        <input name="action" type="hidden" id="action" value="update" />
        </td>
    </tr>
</table>
</form>