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

📄 sectionquestiondetail.tpl

📁 太烦了
💻 TPL
字号:
{strip}
<script type="text/javascript" src="../javascript/check.js"></script>
<script language="JavaScript" type="text/javascript">
/* <![CDATA[ */
{literal}

function confirmDelete(section,questionid,optid,conmsg)
{
	if (confirm(conmsg))
		document.location='?sectionid=' + section + '&questionid=' + questionid + '&delete=' + optid;
}
function confdel(errmsg){
	for(i=0;i < document.frmQuestionDetail.length;i++){
		if(document.frmQuestionDetail.elements[i].type=='checkbox' && document.frmQuestionDetail.elements[i].checked == true){
			selected = true;
			break;
		}
		else {
			selected = false;
		}
	}
	if(!selected) {
		alert(errmsg);
		return false;
	}else{
		document.frmQuestionDetail.submit();
		return true;
	}
}
function addOption(form)
{
	ErrorCount=0;
	ErrorMsg = new Array();
	ErrorMsg[0]="------------------------- The Following Errors Occured -------------------------" + String.fromCharCode(13)+ String.fromCharCode(10);
{/literal}
	CheckFieldString("noblank",document.frmQuestionDetail.txtanswer,"{lang mkey='admin_error_msgs' skey='2'}");
	CheckFieldString("full",document.frmQuestionDetail.txtanswer,"{lang mkey='admin_error' skey='10'}");
{literal}
	result="";
	if( ErrorCount > 0)
	{
		for( c in ErrorMsg)
			result += ErrorMsg[c];
		alert(result);
		return false;
	}
	document.frmAddOption.txtanswer.value=form.txtanswer.value;
	document.frmAddOption.txtenabled.value=form.txtenabled.value;
	document.frmAddOption.submit();

}
{/literal}
/* ]]> */
</script>
<form name="frmQuestionDetail" method="post"  action="modifyoption.php" onSubmit="javascript: return confdel('{lang mkey='admin_js_error_msgs' skey=1}');">
	<input type="hidden" name="frm" value="frmQuestionDetail" />
	<input type="hidden" name="txtsectionid" value=	"{$smarty.get.sectionid}" />
	<input type="hidden" name="txtquestionid" value="{$smarty.get.questionid}" />
{assign var="page_hdr01_text" value='<a href="section.php" class="subhead">'|cat:"{lang mkey='section_title'}"|cat:'</a> > <a href="sectionquestions.php?sectionid='|cat:$smarty.get.sectionid|cat:'" class="subhead">'|cat:"{lang mkey='questions_title'}"|cat:'</a> > '|cat:"{lang mkey='options_title'}"}
{include file="admin/admin_page_hdr01.tpl"}
<BR />
<CENTER>
	<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 >
		<tr>
			<td class="module_detail_inside" width="100%">
				{assign var="page_hdr02_text" value="{lang mkey='question'} "|cat:$question.question}
				{assign var="ct" value=$options|@count}
				{assign var="page_hdr02_text_01" value="{lang mkey='total_options'} "|cat:$ct}
				{include file="admin/admin_page_hdr02.tpl"}
				<table class=table cellspacing={$config.cellspacing} cellpadding={$config.cellpadding} border=0 width="100%">
					{* <tr><td colspan="6">&nbsp;</td></tr> *}
					<tr class="table_head">
						<th><input type=checkbox name="chkall" value="" onclick="checkAll(this.form,'txtcheck[]',this.checked)" /></th>
						<th>{lang mkey='col_head_srno'}</th>
						<th><a href="?sectionid={$smarty.get.sectionid}&amp;questionid={$smarty.get.questionid}&amp;sort={lang mkey='col_head_answer'}&amp;type={$sort_type}">{lang mkey='col_head_answer'}</a></th>
						<th><a href="?sectionid={$smarty.get.sectionid}&amp;questionid={$smarty.get.questionid}&amp;sort={lang mkey='col_head_enabled'}&amp;type={$sort_type}">{lang mkey='col_head_enabled'}</a></th>
						<th colspan="4" >{lang mkey='action'}</th>
					</tr>
				{if $question.control_type != 'textarea' }
					{assign var="mcount" value="0"}
				{foreach key=key item=item from=$options}
					{math equation="$mcount+1" assign="mcount"}
					<tr class="{cycle values="oddrow,evenrow"}">
						<td ><input type="checkbox" name="txtcheck[]" value="{$item.id}" /></td>
						<td>{$mcount}</td>
						<td>{$item.answer|stripslashes}</td>
						<td width="10">{$item.enabled}</td>
					{if $mcount != 1 }
						<td width="12"><a href="?moveup={$item.id}&amp;sectionid={$smarty.get.sectionid}&amp;questionid={$item.questionid}"><img src="images/uparrow.JPG" border="0" alt="" /></a></td>
					{else}
						<td width="12">&nbsp;</td>
					{/if}
					{if $mcount != $options|@count }
						<td width="12"><a href="?movedown={$item.id}&amp;sectionid={$smarty.get.sectionid}&amp;questionid={$item.questionid}"><img src="images/downarrow.JPG" border="0" alt="" /></a></td>
					{else}
						<td width="12">&nbsp;</td>
					{/if}
						<td width="12"><a href="?sectionid={$smarty.get.sectionid}&amp;edit={$item.id}&amp;questionid={$smarty.get.questionid}"><img src="images/button_edit.png" border="0"  alt="" /></a></td>
						<td width="12"><a href="#" onclick="javascript:confirmDelete({$smarty.get.sectionid},{$smarty.get.questionid},{$item.id},'{lang mkey='admin_js__delete_error_msgs' skey=3}');"><img src="images/button_drop.png" border="0"  alt=""  /></a></td>
					</tr>
				{/foreach}
				{/if}
					<tr>
						<td colspan="2">&nbsp;</td>
						<td><input type="text" name="txtanswer" maxlength="255" size="35" /><font color="{lang mkey='required_info_indicator_color'}">{lang mkey='required_info_indicator'}</font></td>
						<td><select name="txtenabled">
		  					{html_options options=$lang.enabled_values}
							</select>
						</td>
						<td colspan="2">
							<input type="button" class="formbutton" name="btnAddOption" value="{lang mkey='submit'}" onclick="addOption(this.form);" />
						</td>
					</tr>
					<tr>
						<td colspan="7">

⌨️ 快捷键说明

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