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

📄 editquestions.tpl

📁 太烦了
💻 TPL
字号:
{strip}
<form name="{$frmname}" method="post" action="modifyquestion.php">
<input type="hidden" name="sectionid" value="{$sectionid}" />
<input type="hidden" id="reqsectionid" name='reqsectionid' value="" />
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
  <tbody>
	<tr>
		<td width="100%" valign="top">
			{assign var="page_hdr01_text" value=$head}
			{include file="page_hdr01.tpl"}
			<table width="100%" border="0" cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}" >
				<tr>
					<td width="100%" class="module_detail" >
						<table width="100%" border="0" cellpadding="3" cellspacing="1" >
							<tr >
								<td align="center" class='edituserlink' height="26">
									<a href="edituser.php">{lang mkey='section_signup_title'}</a>
								</td>
							{foreach key=key item=item from=$sections}
								<td align="center" class='edituserlink' height="26">
									{if $key !=$smarty.get.sectionid}
										<a href="#" onclick="document.getElementById('reqsectionid').value={$key}; document.forms['{$frmname}'].submit();"  class='edituserlink'>
									{/if}
									<span>{$item|replace:' ':'<br />'}</span>
									{if $key !=$smarty.get.sectionid}
										</a>
									{/if}
								</td>
							{/foreach}
							</tr>
						</table>
						<table width="100%" border="0" cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}">
							<tr>
								<td width="100%">
				{*Outer Loop to traverse outer dimension data array*}
						{foreach item=questionrow from=$data}
							{if $questionrow.control_type == "select"}
									<table class="table" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
									<tbody>
										<tr>
											 <td width="200" valign="top">
												<table width="200" border="0">
												<tbody>
													<tr>
														<td width="200">
															<b>{$questionrow.question|stripslashes}</b>
														{if $questionrow.mandatory == 'Y'}
															<font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font>
														{/if}
															<br/>
														{if $questionrow.description != NULL}
															{$questionrow.description|stripslashes}
														{/if}
														</td>
													</tr>
												</tbody>
												</table>
											</td>
											<td width="290" valign="top">
												<table class="table" width="290" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
												<tbody>
													<tr>
														<td  width="290">
															<input type=hidden name="selected_questions[]" value="{$questionrow.id}" />
															<select name="{$questionrow.id}{$questionrow.mandatory}">
																{if $questionrow.mandatory != 'Y'}																<option value="0">{lang mkey='tell_later'}</option>
																{/if}
																{html_options options=$questionrow.options selected=$questionrow.userpref}
															</select>
														</td>
													</tr>
												</tbody>
												</table>
											</td>
										</tr>
									</tbody>
									</table>
							{elseif $questionrow.control_type == "radio"}
									<table class="table" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
									<tbody>
										<tr>
											<td width="200" valign="top">
												<table class="table" width="200" border="0" cellspacing="{$config.cellspacing}"  cellpadding="{$config.cellpadding}">
												<tbody>
													<tr>
														<td  align="left" valign="top">
															<b>{$questionrow.question|stripslashes}</b>
														{if $questionrow.mandatory == 'Y'}
															<font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font>
														{/if}
															<br/>
														{if $questionrow.description != NULL}
															{$questionrow.description|stripslashes}
														{/if}
														</td>
													</tr>
												</tbody>
												</table>
											</td>
											<td width="290" valign="top">
												<table class="table" width="290" border="0" cellspacing="{$config.cellspacing}"  cellpadding="{$config.cellpadding}" >
												<tbody>
													<tr>
														<td valign="top">
														<input type=hidden name="selected_questions[]" value="{$questionrow.id}" />
														{foreach name="iterator"  key=key  item=curropt from=$questionrow.options}
															<table cellspacing=0 cellpadding=0 border=0 width="100%">
																<tr>
																	<td width="8" valign="top">
																	{if $key == $questionrow.userpref[0]}
																		<input type="radio" name="{$questionrow.id}{$questionrow.mandatory}"  value="{$key}" checked />
																	{else}
																		<input  type="radio" name="{$questionrow.id}{$questionrow.mandatory}" value="{$key}" />
																	{/if}
																	</td>
																	<td width="100%" valign="bottom">
																	{$curropt|stripslashes}
																	</td>
																</tr>
															</table>
															{* if $smarty.foreach.iterator.iteration%2 == 0 }
																</td></tr><tr><td>
															{else}
																</td><td>
															{/if *}
															</td></tr><tr><td>
														{/foreach}
														</td>
													</tr>
												</tbody>
												</table>
											</td>
										</tr>
									</tbody>
									</table>
							{elseif $questionrow.control_type == "checkbox"}
									<table class="table" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
									<tbody>
										<tr>
											<td width="200" valign="top">
												<table class="table" width="200" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
												<tbody>
													<tr>
														<td  align="left" valign="top">
															<b>{$questionrow.question|stripslashes}</b>
															{if $questionrow.mandatory == 'Y'}
																<font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font>
															{/if}
															<br/>
															{if $questionrow.description != NULL}
																{$questionrow.description|stripslashes}
															{/if}
														</td>
													</tr>
												</tbody>
												</table>
											</td>
											<td width="290" valign="top">
												<table class="table" width="290" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
												<tbody>
													<tr>
														<td align="left" valign="top">
														{if $questionrow.userpref|@count > 0}
															<input type=hidden name="selected_questions[]" value="{$questionrow.id}" />
														{/if}

															{* html_checkboxes options=$questionrow.options selected=$questionrow.userpref separator=<br/>  name=$questionrow.id|cat:$questionrow.mandatory *}
														{* Following code replaces this code *}
														{foreach name="iterator1"  key=key  item=curropt from=$questionrow.options}
															<table cellspacing=0 cellpadding=0 border=0 width="100%">
																<tr>
																	<td width="8" valign="middle">
																		<input type="checkbox" name="{$questionrow.id}{$questionrow.mandatory}[]"  value="{$key}" 																	{foreach from=$questionrow.userpref key=ky item=itm}
																		{if $key == $itm}
																		    checked=true
																		{/if}
																		{/foreach}
																		  />
																	</td>
																	<td width="100%" valign="middle">
																	{$curropt|stripslashes}
																	</td>
																</tr>
															</table>
															{* if $smarty.foreach.iterator.iteration%2 == 0 }
																</td></tr><tr><td>
															{else}
																</td><td>
															{/if *}
															</td></tr><tr><td>
														{/foreach}

														</td>
													</tr>
												</tbody>
												</table>
											</td>
										</tr>
									</tbody>
									</table>
							{elseif $questionrow.control_type == "textarea"}
									<table width="100%">
									<tbody>
										<tr>
											<td>
												<table class="table" width="440" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
												<tbody>
													<tr>
														<td  align="left" valign="top">
															<b>{$questionrow.question|stripslashes}</b>
														{if $questionrow.mandatory == 'Y'}
															<font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font>
														{/if}
															<br/>
														{if $questionrow.description != NULL}
															{$questionrow.description|nl2br|stripslashes}
														{/if}
														</td>
													</tr>
												</tbody>
												</table>
											<td>
										</tr>
										<tr>
											<td>
												<table class="table" width="290" border="0" cellspacing="{$config.cellspacing}" cellpadding="{$config.cellpadding}">
												<tbody>
													<tr>
														<td>
														{if count_chars($questionrow.userpref[0]) > 0}
															<input type=hidden name="selected_questions[]" value="{$questionrow.id}" />
														{/if}
															<textarea name="{$questionrow.id}{$questionrow.mandatory}" rows="7" cols="50" >{$questionrow.userpref[0]|stripslashes}</textarea>
														</td>
													</tr>
												</tbody>
												</table>
											</td>
										</tr>
									</tbody>
									</table>
							{/if}
									<br />
						{/foreach}
								</td>
							</tr>
						</table>
						<table width="100%">
							<tr>
								<td align="center">
									<input type="submit" class="formbutton" value="{lang mkey='submit'}" /> <input type="reset" class="formbutton" value="{lang mkey='reset'}" />
								</td>
							</tr>
						</table>
						<br /><br />
					</td>
				</tr>
			</table>
		</td>
	</tr>
  </tbody>
</table>
</form>
<br />

{/strip}

⌨️ 快捷键说明

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