任何人都有任何想法爲什麼我的頁碼沒有列在分頁div內?我正在使用tablesorter.pager插件。不顯示頁碼
<?php
session_start();
require("../inc/dbconfig.php");
require("../inc/global_functions.php");
// find out how many rows are in the table
$query = "SELECT CONCAT_WS(' ',firstName,lastName) AS name, username, emailAddress, userID FROM manager_users WHERE statusID != 4";
$result = mysqli_query($dbc,$query);
$fileName = basename($_SERVER['PHP_SELF']);
$pageName = "User Accounts";
$userData = $_SESSION['user_data'];
$userID = $userData['userID'];
?>
<script type="text/javascript">
$(document).ready(function() {
$('a.bt_green').click(function(e) {
e.preventDefault();
$('div.right_content').load('forms/addnew/' + $(this).attr('id'));
});
$('#usersPageList').tablesorter().tablesorterPager({container:$('#pagination'),cssPageLinks:'a.pageLink', positionFixed: false});
$('table tr').click(function() {
checkBox = $(this).children('td').children('input[type=checkbox]');
if(checkBox.attr('checked'))
checkBox.removeAttr('checked');
else
checkBox.attr('checked', 'checked');
});
$('.ask').jConfirmAction();
$('.ask2').jConfirmAction();
});
</script>
<h2>User Accounts</h2>
<table id="usersPageList" class="rounded-corner">
<thead>
<tr>
<th scope="col" class="rounded-first"></th>
<th scope="col" class="rounded">Name</th>
<th scope="col" class="rounded">Email Address</th>
<th scope="col" class="rounded">Username</th>
<th scope="col" class="rounded">Edit</th>
<th scope="col" class="rounded-last">Delete</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="5" class="rounded-foot-left"><em>Displays all of the registered and verified users!</em></td>
<td class="rounded-foot-right"> </td>
</tr>
</tfoot>
<tbody>
<?php
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
echo "<tr>";
echo "<td><input type=\"checkbox\" name=\"users[]\" value=\"".$row['userID']."\"/></td>";
echo "<td>".$row['name']."</td>";
echo "<td>".$row['emailAddress']."</td>";
echo "<td>".$row['username']."</td>";
echo "<td><a href=\"#\"><img src=\"images/user_edit.png\" alt=\"\" title=\"\" border=\"0\" /></a></td>";
echo "<td>";
if (($row['userID'] !== '10000') && ($row['userID'] !== $userID)){
echo "<a href=\"#\" class=\"ask\"><img src=\"images/trash.png\" class=\"delete\" alt=\"\" title=\"\" border=\"0\" id=\"".$row['userID']."\" /></a>";
}
echo "</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<div id="pagination"></div>
<?php
addRemove($fileName,$pageName);
?>
<input type="hidden" name="myhiddenPageToken" id="myhiddenPageToken" value="useraccounts" />
編輯帖子:
<script type="text/javascript">
$(document).ready(function() {
$('a.bt_green').click(function(e) {
e.preventDefault();
$('div.right_content').load('forms/addnew/' + $(this).attr('id'));
});
$('#usersPageList').tablesorter().tablesorterPager({container:$('#pagination'),cssPageLinks:'a.pageLink', positionFixed: false});
$('table tr').click(function() {
checkBox = $(this).children('td').children('input[type=checkbox]');
if(checkBox.attr('checked'))
checkBox.removeAttr('checked');
else
checkBox.attr('checked', 'checked');
});
$('.ask').jConfirmAction();
$('.ask2').jConfirmAction();
});
</script>
<h2>User Accounts</h2>
<table id="usersPageList" class="rounded-corner">
<thead>
<tr>
<th scope="col" class="rounded-first"></th>
<th scope="col" class="rounded">Name</th>
<th scope="col" class="rounded">Email Address</th>
<th scope="col" class="rounded">Username</th>
<th scope="col" class="rounded">Edit</th>
<th scope="col" class="rounded-last">Delete</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="5" class="rounded-foot-left"><em>Displays all of the registered and verified users!</em></td>
<td class="rounded-foot-right"> </td>
</tr>
</tfoot>
<tbody>
<tr><td><input type="checkbox" name="users[]" value="10000"/></td><td>KOW Management</td><td>[email protected]</td><td>Administrator</td><td><a href="#"><img src="images/user_edit.png" alt="" title="" border="0" /></a></td><td></td></tr><tr><td><input type="checkbox" name="users[]" value="10001"/></td><td>Jeff Davidson</td><td>[email protected]</td><td>xtremer360</td><td><a href="#"><img src="images/user_edit.png" alt="" title="" border="0" /></a></td><td></td></tr>
</tbody>
</table>
<div id="pagination"></div>
<a href="" class="bt_green" id="useraccounts.php"><span class="bt_green_lft"></span><strong>Add New User Accounts</strong><span class="bt_green_r"></span></a><a href="" class="bt_blue"><span class="bt_blue_lft"></span><strong>View all User Accounts</strong><span class="bt_blue_r"></span></a><a href="" class="bt_red ask2"><span class="bt_red_lft"></span><strong>Delete User Accounts</strong><span class="bt_red_r"></span></a><input type="hidden" name="myhiddenPageToken" id="myhiddenPageToken" value="useraccounts" />
你能張貼在jsfiddle.net最終HTML輸出或者是給我們一個頁面一個鏈接,該頁面被呈現? (因爲這可能是JavaScript和/或HTML結構問題)。謝謝! –
我會編輯我的帖子。 –
我一直在這一整天。如果有人可以在AIM或YAHOO上發送即時消息。 (xtremer360) –