diy_edit_content.htm
2.93 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
<!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>编辑评论</title>
<style type="text/css">
<!--
body {
background-image: url(images/allbg.gif);
}
-->
</style>
<link href="css/base.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6D6D6">
<tr>
<td width="100%" height="24" colspan="2" background="images/tbg.gif">
<strong><a href="<?php echo $ENV_GOBACK_URL; ?>"><u>表单管理</u></a> >> 编辑评论:</strong> </td>
</tr>
<tr>
<td height="167" colspan="2" align="center" bgcolor="#FFFFFF" valign="top">
<form name="form1" method="post" enctype="multipart/form-data" action="diy_list.php?action=edit&diyid=<?php echo $diy->diyid ?>&id=<?php echo $row['id'] ?>&do=2">
<input type="hidden" name="dopost" value="edit" />
<input type="hidden" name="id" value="<?php echo $row['id']; ?>" />
<table width="100%" border="0" cellpadding="3" cellspacing="1" style="text-align:left;">
<?php
$formfields = '';
foreach($fieldlist as $field=>$fielddata)
{
$allowhtml = array('htmltext');
if($row[$field]=='') continue;
if($fielddata[1]=='img')
{
$row[$field] = "<input name='photo' type='file' /> <a href='{$row[$field]}' target='_blank'><img src='images/channeladd.gif' border='0' /> 浏览原图</a> <a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field'>删除原图</a>\r\n";
}
else if($fielddata[1]=='addon')
{
$row[$field] = "<input name='file' type='file' /> <a href='{$row[$field]}' target='_blank'><img src='images/channeladd.gif' border='0' /> 浏览原附件</a> <a href='diy_list.php?action=delete&diyid=$diy->diyid&id=$row[id]&do=1&name=$field'>删除原附件</a>";
}
else
{
if(!in_array($fielddata[1],$allowhtml)){
$row[$field] = htmlspecialchars($row[$field]);
$row[$field] = "<input type='text' name='".$field."' value='".$row[$field]."'/>";
}
}
echo '<tr bgcolor="#ffffff"><td width="20%" height="24">'.$fielddata[0].':'.'</td><td width="80%">'.$row[$field].'</td></tr>';
$formfields .= $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1];
}
echo "<input type='hidden' name='dede_fields' value='".$formfields."'>";
?>
<tr bgcolor="#FFFFFF">
<td height="40" width='600' colspan="2" align="center">
<input type="submit" name="Submit1" class='coolbg np' value="保存更改" />
<input type="button" name="Submit2" class='coolbg np' value="不理返回" onClick="location='<?php echo $ENV_GOBACK_URL; ?>';" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>