abu edit sample
This commit is contained in:
parent
2a8971d2cb
commit
4717fec6cc
@ -67,6 +67,12 @@ section>form label textarea{
|
||||
<label>
|
||||
<span>Content: </span>
|
||||
<textarea name="content"><?php echo $content; ?></textarea>
|
||||
|
||||
<textarea name="content">
|
||||
111
|
||||
222
|
||||
333
|
||||
</textarea>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -6,10 +6,13 @@ use MessageBoard\Database\DbMessage;
|
||||
|
||||
$db = new DbMessage();
|
||||
|
||||
$page = !empty($_GET["p"])?$_GET["p"]:1;
|
||||
$max_count = $db->getCount();
|
||||
$page = !empty($_GET["p"])?(int)$_GET["p"]:1;
|
||||
$max_count = !empty($_GET['rowcount']) ? (int)$_GET['rowcount'] : $db->getCount();
|
||||
$max_page = ceil($max_count/$list_max_count);
|
||||
$list = $db->getList($page, $list_max_count);
|
||||
|
||||
// $db->query("SELECT SQL_CALC_FOUND_ROWS * FROM xxx WHERE name='abc' LIMIT 100,10");
|
||||
// $max_count = $db->getOne("SELECT FOUND_ROWS()");
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@ -86,6 +89,21 @@ div.table-func {
|
||||
</div>
|
||||
<section>
|
||||
<!-- 主表格 -->
|
||||
<?php
|
||||
if (!empty($list) && count($list) > 0) {
|
||||
?>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>title</th>
|
||||
<th>updated_at</th>
|
||||
<th>action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if (count($list) > 0) {
|
||||
echo '
|
||||
|
Loading…
x
Reference in New Issue
Block a user