dede 织梦系统修改后台⾃定义表单列表为横排显⽰
dede织梦系统⾃定义表单提交内容后,在后台显⽰的⽅式⽐较别扭,我们都习惯横排显⽰,这⾥介绍怎么修改成横排显⽰。 1、到后台⾃定义表单的模板,dede/templets/diy_list.htm
2、⾸先把代码
修改成:
3、在{dede:datalist}前⾯加上标题代码:
4、修改{dede:datalist}⾥⾯的代码为:<table width ="98%" border ="0" cellpadding ="1" cellspacing ="1" align ="center" class ="tbtitle" style ="background:#CFCFCF;"><tr ><td colspan ="3" height ="28" background ='images/tbg.gif'><div style ='float:left'> <a href ='diy_main.php'><b >⾃定义表单管理</b ></a > > <b >内容列表</b ></div ><div style ='float:right;padding-right:8px;'><a href ="../plus/diy.php?action=list&diyid=<?php echo $diy->diyid; ?>" target ="_blank"><img src ='images/gtk-tmp.png' align ='left' title ='预览' alt ='预览'</div ></td ></tr >
1
2
3
4
5
6
7
8
9<table width ="98%" border ="0" cellpadding ="1" cellspacing ="1" align ="center" class ="tbtitle" style ="background:#CFCFCF;"><tr ><td height ="28" background ='images/tbg.gif'><div style ='float:left'> <a href ='diy_main.php'><b >⾃定义表单管理</b ></a > > <b >内容列表</b ></div ><div style ='float:right;padding-right:8px;'><a href ="../plus/diy.php?action=list&diyid=<?php echo $diy->diyid; ?>" target ="_blank"><img src ='images/gtk-tmp.png' align ='left' title ='预览' alt ='预览'</div ></td ></tr ></table ><table width ="98%" border ="0" cellpadding ="1" cellspacing ="1" align ="center" class ="tbtitle" style ="background:#CFCFCF;">1
2
3
4
5
6
7
8
9
10
11<?php echo '<tr bgcolor="#F8FDE3"><td width="5">ID</td>';foreach ($fieldlist as $field=>$fielddata){echo '<td bgcolor="#ffffff" >'.$fielddata[0].'</td>';}echo '<td bgcolor="#ffffff" >状态</td><td bgcolor="#ffffff" >操作</td></tr>';?>
1
2
3
4
5
6
7
8
5、把分页操作代码分开,在{/dede:datalist}后⾯加上
6、如果要调整⾃定义表单的字段显⽰顺序,需要修改数据库dede_diyforms表单中的info字段。{dede:datalist}<?php if (!empty ($fields )){$allowhtml = array ('htmltext');$fields ['sta'] = $fields ['ifcheck'] == 1 ? '已审核' : '未审核'; echo '<tr bgcolor="#F8FDE3"><td width="5%"><input type="checkbox" name="id[]" value="'.$fields ['id'].'" class="np" /><a href="diy_list.php?action=edit&di
yi foreach ($fieldlist as $field =>$fielddata ){if ($fielddata [1]=='img'){$fields [$field ] = "<a href='{$fields[$field]}' target='_blank'><img src='images/channeladd.gif' border='0' /> 图⽚附件</a>\r\n";}else if ($fielddata [1]=='addon'){$fields [$field ] = "<a href='{$fields[$field]}' target='_blank'><img src='images/channeladd.gif' border='0' /> 其它附件</a>";}else {if (!in_array($fielddata [1],$allowhtml )){$fields [$field ] = htmlspecialchars($fields [$field ]);}}echo '<td bgcolor="#ffffff">'.$fields [$field ].'</td>';}echo '<td>'.$fields ['sta'].'</td><td width="10%" align="center"><a href="diy_list.php?action=edit&diyid='.$diy ->diyid.'&id='.$fields ['id'].'"><img src="images/fee织梦管理系统php版本
echo '</tr>';} else {echo "<tr><td bgcolor=\"#ffffff\">暂⽆记录</td></tr>";}?>{/dede:datalist}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32</table><table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" >1
2
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论