<!--{if $item == "sex"}-->
<!-- 性别选择 -->
<div class="varpop-label">
  <ul>
	<li>
	  <i>性别：</i>
	  <span>
	  <select name="item_sex" id="item_sex">
		<option value="0"><!--{$text}--></option>
		<option value="2"<!--{if $value1 == "2"}--> selected<!--{/if}-->>女会员</option>
		<option value="1"<!--{if $value1 == "1"}--> selected<!--{/if}-->>男会员</option>
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
  </ul>
  <div class="clear"></div>
</div>
<!--//varpop-label End-->
<div class="varpop-button">
  <div class="btn-comfirm" id="range-btn-comfirm">确定</div>
  <div class="btn-cancel" id="range-btn-cancel">取消</div>
  <div class="clear"></div>
</div>
<!--//varpop-button End-->
<script type="text/javascript">
$(function(){
	$("#range-btn-comfirm").click(function(){
		$("#<!--{$input1}-->").val($("#item_sex").find("option:selected").val());
		$("#<!--{$input1}-->_text").html($("#item_sex").find("option:selected").text());
		varRangePopClose();
	});
	//关闭取消
	$("#range-btn-cancel").click(function(){
		varRangePopClose();
	});
});
</script>


<!--{elseif $item == 'avatar'}-->
<!-- 头像选择 -->
<div class="varpop-label">
  <ul>
	<li>
	  <i>头像：</i>
	  <span>
	  <select name="item_avatar" id="item_avatar">
		<option value="0"><!--{$text}--></option>
		<option value="1"<!--{if $value1 == "1"}--> selected<!--{/if}-->>有头像</option>
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
  </ul>
  <div class="clear"></div>
</div>
<!--//varpop-label End-->
<div class="varpop-button">
  <div class="btn-comfirm" id="range-btn-comfirm">确定</div>
  <div class="btn-cancel" id="range-btn-cancel">取消</div>
  <div class="clear"></div>
</div>
<!--//varpop-button End-->
<script type="text/javascript">
$(function(){
	$("#range-btn-comfirm").click(function(){
		$("#<!--{$input1}-->").val($("#item_avatar").find("option:selected").val());
		$("#<!--{$input1}-->_text").html($("#item_avatar").find("option:selected").text());
		varRangePopClose();
	});
	//关闭取消
	$("#range-btn-cancel").click(function(){
		varRangePopClose();
	});
});
</script>

<!--{elseif $item == 'age'}-->
<!--{assign var="agelist" value=vo_list("mod={volistage}")}-->
<!-- 年龄 -->
<div class="varpop-label">
  <ul>
	<li>
	  <i>起始年龄：</i>
	  <span>
	  <select name="item_sage" id="item_sage">
		<option value="0"><!--{$text}--></option>
		<!--{foreach $agelist as $val}-->
		<option value="<!--{$val.value}-->"<!--{if $value1 == $val.value}--> selected<!--{/if}-->><!--{$val.value}-->岁</option>
		<!--{/foreach}-->
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
	<li>
	  <i>结束年龄：</i>
	  <span>
	  <select name="item_eage" id="item_eage">
		<option value="0"><!--{$text}--></option>
		<!--{foreach $agelist as $val}-->
		<option value="<!--{$val.value}-->"<!--{if $value2 == $val.value}--> selected<!--{/if}-->><!--{$val.value}-->岁</option>
		<!--{/foreach}-->
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
  </ul>
  <div class="clear"></div>
</div>
<!--//varpop-label End-->
<div class="varpop-button">
  <div class="btn-comfirm" id="range-btn-comfirm">确定</div>
  <div class="btn-cancel" id="range-btn-cancel">取消</div>
  <div class="clear"></div>
</div>
<!--//varpop-button End-->
<script type="text/javascript">
$(function(){
	$("#range-btn-comfirm").click(function(){
		var item_value1 = $("#item_sage").find("option:selected").val();
		var item_text1 = $("#item_sage").find("option:selected").text();
		var item_value2 = $("#item_eage").find("option:selected").val();
		var item_text2 = $("#item_eage").find("option:selected").text();
		if (item_value1 > 0) {
			if (item_value2 < 1) {
				ToastShow("请选择结束年龄");
				return false;
			}
			else {
				if (item_value2 < item_value1) {
					ToastShow("结束范围不对，请重新选择。");
					return false;
				}
			}
		}
		var text = "";
		if (item_text1 == "选择" || item_text1 == "不限") {
			text = item_text1;
		}
		else {
			text = item_text1+"~"+item_text2;
		}
		$("#<!--{$input1}-->").val(item_value1);
		$("#<!--{$input2}-->").val(item_value2);
		$("#<!--{$item}-->_text").html(text);
		varRangePopClose();
	});
	//关闭取消
	$("#range-btn-cancel").click(function(){
		varRangePopClose();
	});
});
</script>

<!--{elseif $item == 'height'}-->
<!--{assign var="heightlist" value=vo_list("mod={volistheight}")}-->
<!-- 身高 -->
<div class="varpop-label">
  <ul>
	<li>
	  <i>起始身高：</i>
	  <span>
	  <select name="item_sheight" id="item_sheight">
		<option value="0"><!--{$text}--></option>
		<!--{foreach $heightlist as $val}-->
		<option value="<!--{$val.value}-->"<!--{if $value1 == $val.value}--> selected<!--{/if}-->><!--{$val.value}-->CM</option>
		<!--{/foreach}-->
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
	<li>
	  <i>结束身高：</i>
	  <span>
	  <select name="item_eheight" id="item_eheight">
		<option value="0"><!--{$text}--></option>
		<!--{foreach $heightlist as $val}-->
		<option value="<!--{$val.value}-->"<!--{if $value2 == $val.value}--> selected<!--{/if}-->><!--{$val.value}-->CM</option>
		<!--{/foreach}-->
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
  </ul>
  <div class="clear"></div>
</div>
<!--//varpop-label End-->
<div class="varpop-button">
  <div class="btn-comfirm" id="range-btn-comfirm">确定</div>
  <div class="btn-cancel" id="range-btn-cancel">取消</div>
  <div class="clear"></div>
</div>
<!--//varpop-button End-->
<script type="text/javascript">
$(function(){
	$("#range-btn-comfirm").click(function(){
		var item_value1 = $("#item_sheight").find("option:selected").val();
		var item_text1 = $("#item_sheight").find("option:selected").text();
		var item_value2 = $("#item_eheight").find("option:selected").val();
		var item_text2 = $("#item_eheight").find("option:selected").text();
		if (item_value1 > 0) {
			if (item_value2 < 1) {
				ToastShow("请选择结束身高");
				return false;
			}
			else {
				if (item_value2 < item_value1) {
					ToastShow("结束范围不对，请重新选择。");
					return false;
				}
			}
		}
		var text = "";
		if (item_text1 == "选择" || item_text1 == "不限") {
			text = item_text1;
		}
		else {
			text = item_text1+"~"+item_text2;
		}
		$("#<!--{$input1}-->").val(item_value1);
		$("#<!--{$input2}-->").val(item_value2);
		$("#<!--{$item}-->_text").html(text);
		varRangePopClose();
	});
	//关闭取消
	$("#range-btn-cancel").click(function(){
		varRangePopClose();
	});
});
</script>


<!--{elseif $item == 'weight'}-->
<!--{assign var="weightlist" value=vo_list("mod={volistweight}")}-->
<!-- 体重 -->
<div class="varpop-label">
  <ul>
	<li>
	  <i>起始体重：</i>
	  <span>
	  <select name="item_sweight" id="item_sweight">
		<option value="0"><!--{$text}--></option>
		<!--{foreach $weightlist as $val}-->
		<option value="<!--{$val.value}-->"<!--{if $value1 == $val.value}--> selected<!--{/if}-->><!--{$val.value}-->KG</option>
		<!--{/foreach}-->
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
	<li>
	  <i>结束体重：</i>
	  <span>
	  <select name="item_eweight" id="item_eweight">
		<option value="0"><!--{$text}--></option>
		<!--{foreach $weightlist as $val}-->
		<option value="<!--{$val.value}-->"<!--{if $value2 == $val.value}--> selected<!--{/if}-->><!--{$val.value}-->KG</option>
		<!--{/foreach}-->
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
  </ul>
  <div class="clear"></div>
</div>
<!--//varpop-label End-->
<div class="varpop-button">
  <div class="btn-comfirm" id="range-btn-comfirm">确定</div>
  <div class="btn-cancel" id="range-btn-cancel">取消</div>
  <div class="clear"></div>
</div>
<!--//varpop-button End-->
<script type="text/javascript">
$(function(){
	$("#range-btn-comfirm").click(function(){
		var item_value1 = $("#item_sweight").find("option:selected").val();
		var item_text1 = $("#item_sweight").find("option:selected").text();
		var item_value2 = $("#item_eweight").find("option:selected").val();
		var item_text2 = $("#item_eweight").find("option:selected").text();
		if (item_value1 > 0) {
			if (item_value2 < 1) {
				ToastShow("请选择结束体重");
				return false;
			}
			else {
				if (item_value2 < item_value1) {
					ToastShow("结束范围不对，请重新选择。");
					return false;
				}
			}
		}
		var text = "";
		if (item_text1 == "选择" || item_text1 == "不限") {
			text = item_text1;
		}
		else {
			text = item_text1+"~"+item_text2;
		}
		$("#<!--{$input1}-->").val(item_value1);
		$("#<!--{$input2}-->").val(item_value2);
		$("#<!--{$item}-->_text").html(text);
		varRangePopClose();
	});
	//关闭取消
	$("#range-btn-cancel").click(function(){
		varRangePopClose();
	});
});
</script>


<!--{elseif $item == 'star'}-->
<!-- 诚信星级 -->
<div class="varpop-label">
  <ul>
	<li>
	  <i>星级：</i>
	  <span>
	  <select name="item_star" id="item_star">
		<option value="0"><!--{$text}--></option>
		<option value="1"<!--{if $value1 == 1}--> selected<!--{/if}-->>1星</option>
		<option value="2"<!--{if $value1 == 2}--> selected<!--{/if}-->>2星</option>
		<option value="3"<!--{if $value1 == 3}--> selected<!--{/if}-->>3星</option>
		<option value="4"<!--{if $value1 == 4}--> selected<!--{/if}-->>4星</option>
		<option value="5"<!--{if $value1 == 5}--> selected<!--{/if}-->>5星</option>
		<option value="6"<!--{if $value1 == 6}--> selected<!--{/if}-->>6星</option>
		<option value="7"<!--{if $value1 == 7}--> selected<!--{/if}-->>7星</option>
		<option value="8"<!--{if $value1 == 8}--> selected<!--{/if}-->>8星</option>
		<option value="9"<!--{if $value1 == 9}--> selected<!--{/if}-->>8星</option>
		<option value="10"<!--{if $value1 == 10}--> selected<!--{/if}-->>10星</option>
		<option value="11"<!--{if $value1 == 11}--> selected<!--{/if}-->>11星</option>
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
	<li>
	  <i>范围：</i>
	  <span>
	  <select name="item_starup" id="item_starup">
		<option value="0"><!--{$text}--></option>
		<option value="1"<!--{if $value2 == 1}--> selected<!--{/if}-->>以上</option>
		<option value="2"<!--{if $value2 == 2}--> selected<!--{/if}-->>以下</option>
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
  </ul>
  <div class="clear"></div>
</div>
<!--//varpop-label End-->
<div class="varpop-button">
  <div class="btn-comfirm" id="range-btn-comfirm">确定</div>
  <div class="btn-cancel" id="range-btn-cancel">取消</div>
  <div class="clear"></div>
</div>
<!--//varpop-button End-->
<script type="text/javascript">
$(function(){
	$("#range-btn-comfirm").click(function(){
		var item_value1 = $("#item_star").find("option:selected").val();
		var item_text1 = $("#item_star").find("option:selected").text();
		var item_value2 = $("#item_starup").find("option:selected").val();
		var item_text2 = $("#item_starup").find("option:selected").text();
		var text = "";
		if (item_text1 == "选择" || item_text1 == "不限") {
			text = item_text1;
		}
		else {
			text = item_text1+" "+item_text2;
		}
		$("#<!--{$input1}-->").val(item_value1);
		$("#<!--{$input2}-->").val(item_value2);
		$("#<!--{$item}-->_text").html(text);
		varRangePopClose();
	});
	//关闭取消
	$("#range-btn-cancel").click(function(){
		varRangePopClose();
	});
});
</script>


<!--{else}-->
<!-- 交友参数 -->
<!--{assign var="volistvar" value=vo_list("mod={volistvar} where={<!--{$item}-->}")}-->
<div class="varpop-label">
  <ul>
	<li>
	  <i>起始：</i>
	  <span>
	  <select name="item_start" id="item_start">
		<option value="0"><!--{$text}--></option>
		<!--{foreach $volistvar as $val}-->
		<option value="<!--{$val.value}-->"<!--{if $value1 == $val.value}--> selected<!--{/if}-->><!--{$val.text}--></option>
		<!--{/foreach}-->
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
	<li>
	  <i>结束：</i>
	  <span>
	  <select name="item_end" id="item_end">
		<option value="0"><!--{$text}--></option>
		<!--{foreach $volistvar as $val}-->
		<option value="<!--{$val.value}-->"<!--{if $value2 == $val.value}--> selected<!--{/if}-->><!--{$val.text}--></option>
		<!--{/foreach}-->
	  </select>
	  </span>
	  <div class="clear"></div>
	</li>
  </ul>
  <div class="clear"></div>
</div>
<!--//varpop-label End-->
<div class="varpop-button">
  <div class="btn-comfirm" id="range-btn-comfirm">确定</div>
  <div class="btn-cancel" id="range-btn-cancel">取消</div>
  <div class="clear"></div>
</div>
<!--//varpop-button End-->
<script type="text/javascript">
$(function(){
	$("#range-btn-comfirm").click(function(){
		var item_value1 = $("#item_start").find("option:selected").val();
		var item_text1 = $("#item_start").find("option:selected").text();
		var item_value2 = $("#item_end").find("option:selected").val();
		var item_text2 = $("#item_end").find("option:selected").text();
		if (item_value1 > 0) {
			if (item_value2 < 1) {
				ToastShow("请选择结束范围");
				return false;
			}
			else {
				if (item_value2 < item_value1) {
					ToastShow("结束范围不对，请重新选择。");
					return false;
				}
			}
		}
		var text = "";
		if (item_text1 == "选择" || item_text1 == "不限") {
			text = item_text1;
		}
		else {
			text = item_text1+" ~ "+item_text2;
		}
		$("#<!--{$input1}-->").val(item_value1);
		$("#<!--{$input2}-->").val(item_value2);
		$("#<!--{$item}-->_text").html(text);
		varRangePopClose();
	});
	//关闭取消
	$("#range-btn-cancel").click(function(){
		varRangePopClose();
	});
});
</script>

<!--{/if}-->