list_diyform.htm
2.53 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" />
<title><?php echo $diy->name; ?> - powered by dedecms</title>
<link href="img/nspage.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main mceneter">
<div class="toplogo">
<div class="logo">
<a href="/"><img src="<?php echo $cfg_templeturl; ?>/default/images/logo.gif" /></a>
</div>
<div class="title">
<?php echo $diy->name; ?>
[<a href='diy.php?action=post&diyid=<?php echo $diy->diyid; ?>'>发布信息</a>]
</div>
</div>
<div class="cmain">
<div class="ctitle">
<h1><?php echo $diy->name; ?>内容列表</h1>
<span></span>
</div>
<div class="cbox mceneter">
<div class="maplist">
<br />
{dede:datalist}
<table class='listtable' cellspacing="1">
<?php
if(!empty($fields))
{
echo '<tbody>';
echo '<tr><td bgcolor="#eeeeee" width="20%">id</td>';
echo '<td bgcolor="#eeeeee"><div class="left">'.$fields['id'].'</div><div class="right"><a href="diy.php?action=view&diyid='.$diy->diyid.'&id='.$fields['id'].'" target="_blank">详细...</a> </div></td></tr>';
foreach($fieldlist as $field=>$fielddata)
{
if($fields[$field]=='') continue;
if($fielddata[1]=='img')
{
$fields[$field] = "<a href='{$fields[$field]}' target='_blank'><img src='img/addon.gif' border='0' /> 图片附件</a>\r\n";
}
else if($fielddata[1]=='addon')
{
$fields[$field] = "<a href='{$fields[$field]}' target='_blank'><img src='img/addon.gif' border='0' /> 其它附件</a>";
}
else
{
if($fielddata[1]=='htmltext') $fields[$field] = html2text($fields[$field]);
else $fields[$field] = htmlspecialchars($fields[$field]);
if( strlen($fields[$field]) > 250 )
{
$fields[$field] = cn_substr( $fields[$field], 250).'...';
}
}
echo "<tr><td bgcolor='#ffffff'>{$fielddata[0]}</td><td bgcolor='#ffffff'>{$fields[$field]}</td></tr>\r\n";
}
echo '</tbody>';
}else{
echo "<tr><td bgcolor='#ffffff'>暂无记录</td></tr>";
}
?>
</table>
{/dede:datalist}
<table class='listtable' cellspacing="2">
<tr><td bgcolor="#ffffff">{dede:pagelist listsize=5 /}</td></tr>
</table>
</div>
</div>
</div>
</div>
<div class="copyright mceneter">
Powered by <a href="http://www.dedecms.com" target="_blank">DedeCMS</a> © 2004-2009 <a href="http://www.desdev.cn" target="_blank">DesDev</a> Inc.
</div>
</body>
</html>