⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 info_poll.tpl

📁 渣渣网络商店系统ZZShop v1.0完整运行程序,MYSQL数据库,APACHE服务器
💻 TPL
字号:
<link rel='stylesheet' href='js/calendar/calendar-mos.css'>
<script language='javascript' src=js/calendar/calendar.js></script>
<script type="text/javascript" src="js/calendar/lang/calendar-en.js"></script>
<script language='javascript'>
<!--
	var calendar = null;
	
	function selected(cal, date)
	{
		cal.sel.value = date; // just update the value of the input field
	}
	
	function closeHandler(cal)
	{
		cal.hide();			// hide the calendar
	
		// don't check mousedown on document anymore (used to be able to hide the
		// calendar when someone clicks outside it, see the showCalendar function).
		Calendar.removeEvent(document, "mousedown", checkCalendar);
	}

	function checkCalendar(ev)
	{
		var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
		for (; el != null; el = el.parentNode)
		// FIXME: allow end-user to click some link without closing the
		// calendar.  Good to see real-time stylesheet change :)
		if (el == calendar.element || el.tagName == "A") break;
		if (el == null) {
			// calls closeHandler which should hide the calendar.
			calendar.callCloseHandler(); Calendar.stopEvent(ev);
		}
	}
	
	function showCalendar(id)
	{
		var el = document.getElementById(id);
		
		var cal = new Calendar(true, null, selected, closeHandler);

		calendar = cal;		// remember the calendar in the global
		cal.setRange(1900, 2070);	// min/max year allowed
		calendar.create();		// create a popup calendar
		
		calendar.sel = el;		// inform it about the input field in use
		calendar.showAtElement(el);	// show the calendar next to the input field

		Calendar.addEvent(document, "mousedown", checkCalendar);
	}
//-->	
</script>
<script language='javascript'>
<!--
	function checkValue()
	{
		var Obj = document.all.frmInfo;
		
		if(!Obj.Name.value)
		{
			alert('请输入投票名称?');
			
			Obj.Name.focus();
			
			return false;
		}

		if(!Obj.Question.value)
		{
			alert('请输入投票问题?');
			
			Obj.Question.focus();
			
			return false;
		}
		
		if(!Obj.Expire.value)
		{
			alert('请选择投票过期时间');
			
			Obj.Expire.focus();

			return false;
		}
		
		return true;
	}
	
	function RedrawValue(Num)
	{
		var str = '';

		for(var i = 0; i < Num; i++)
		{
			str += '投票选项 ' + (i + 1) + ': <input type=text size=50 name="OptionValue_' + (i + 1) + '"><br>';
		}
		
		document.all.Collecter.innerHTML = str;
		
		document.all.frmInfo.OptionValue_1.focus();
	}
	
	function changePollValue()
	{
		var Obj = document.all.frmInfo;
		var len	= 0;
		
		len = parseInt(Obj.ValueCount.value);
		
		if(len < 1 || len > 100)
		{
			alert('悠着点, 投票初始选项范围为: 1~100');
			
			Obj.ValueCount.value = 1;
			
			RedrawValue(1);
			
			return false;
		}
		
		RedrawValue(len);
	}

//-->
</script>
<form action='{ACTION}' method='POST' enctype="multipart/form-data" name='frmInfo' onSubmit='return checkValue();'>
<table width="100%"  border="0"  style='word-break:break-all' cellspacing=0 cellpadding=5 class=adminform>
  <tr>
    <td colspan="3" class='info_title'><strong>添加/修改 投票</strong></td>
  </tr>
  <tr class='info_content'>
      <td>名称:</td>
      <td>
          <input name="Name" type="text" value="{Name}" size=20>
      </td>
      <td>投票名称(*)</td>
  </tr>
  <tr class='info_content'>
      <td width=100>问题:</td>
      <td>
          <input name="Question" type="text" value="{Question}" size=50>
      </td>
      <td width=150>关于什么问题的投票(*)</td>
  </tr>
  <tr class='info_content'>
    <td>截止时间:</td>
    <td>
    	<input name="Expire" type="text" value="{strExpire}" size=12 readonly>
    	<input type=button value='..' onClick='showCalendar("Expire");'> 
    </td>
    <td>
    	投票截止时间(*)<br>
    	格式: yyyy-mm-dd hh:ii<br>
	不能小于当前时间
    </td>
  </tr>
  <!-- beginRow ValueList -->
  <tr class='info_content'>
    <th colspan=3>初始投票选项: <input type=text size=4 value='5' {Disabled} name='ValueCount' onBlur='changePollValue();'></th>
  </tr>
  <tr class='info_content'>
    <td colspan=3>
    	<table width=100% border=0 cellspacing=0 cellpadding=5>
    		<tr>
    			<td id='Collecter'>
    			{OptionList}
    			</td>
    		</tr>
    	</table>
    </td>
  </tr>
  <!-- endRow ValueList -->
  <tr class='info_bottom'>
    <td colspan="3" align="center" class="info_bottom">
		<input name="btnSubmit" type="submit" id="btnSubmit" value="{Caption}">
    	<input name="btnSubmit" type="hidden" id="btnSubmit" value="1">
    	<input type="button" accesskey='c' value="取消(C)" onClick='doCancle();'></td>
    </tr>
</table>
</form>
<script language='javascript'>
<!--
	if(!document.all.ValueCount.disabled) RedrawValue(parseInt(document.all.ValueCount.value));

	document.all.Name.focus();
//-->
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -