| 信息数组变量名:“$list”(必须在后台 系统管理—基本设置—其他设置 开启“获取留言数据”、开启留言板 才可以获取到 $list 数组变量)二维数组 当前分页下的所有留言和回复的数组(用foreach遍历即可得到信息列表) | |
| 变量名 | 说明 |
|---|---|
| id | 留言id |
| name | 留言者姓名 |
| ip | 留言者ip |
| content | 留言内容 |
| 留言者邮箱 | |
| tel | 留言者电话 |
| time | 留言时间“需要用时间格式化函数”,具体看“date_format或date标签” |
| <{$page}> | 翻页 |
| <{$num}> | 留言总条数 |
| 管理回复变量 如果管理员没有回复,以下变量不存在 | |
| isreply | 1:为管理员已经回复,0:为管理员没有回复 ,该变量可用于判断 |
| replyid | 管理员回复id |
| username | 回复留言的管理员用户名 |
| replytime | 管理员回复时间“需要用时间格式化函数”,具体看“date_format或date标签” |
| replycon | 管理员回复内容 |
| 循环遍历留言信息例子 | |
| <div> <{foreach from=$list item=v}> <h2>留言姓名:<{$v.name}> 留言时间:<{'Y-m-d H:i:s'|date:$v.time}></h2> <p>留言内容:<{$v.content}></p> <div>管理回复:<{$v.reply_content}></div> <{/foreach}> </div> |
|
| 表单说明 | ||
| 字段名 | 说明 | 是否必填 |
|---|---|---|
| name | 留言者用户名 | 必填 |
| 留言者邮箱 | 选填 | |
| tel | 留言者电话 | 选填 |
| content | 留言内容 | 必填 |
| setbook | 提交按钮 | 必填 |
| 表单代码例子 (根据自己需要调整表单结构和表现形式) | ||
| <form action='/index.php?m=Book&a=setBook' method='post'> <ul> <li>名字*:<input type='text' name='name' /></li> <li>邮箱:<input type='text' name='mail' /></li> <li>电话:<input type='text' name='tel' /></li> <li>内容*:<textarea name='content'></textarea></li> <input type='submit' name='setbook' value='提交留言'/> </ul> </form> |
||