diff --git a/ag/gm/include/npc.inc.php b/ag/gm/include/npc.inc.php
index e4acbd5..219fb4a 100644
--- a/ag/gm/include/npc.inc.php
+++ b/ag/gm/include/npc.inc.php
@@ -11,6 +11,7 @@
NPC Übersicht | '."\n";
}
-function displayNPCOverview() {
+function displayNPCOverview($page) {
$d_array = array('id', 'name', 'level');
$desc_array = array('id', 'Name', 'Level');
- $sql = 'SELECT '.join($d_array,',').' from chars where rasse = \'NPC\' ORDER BY level';
- //$qry = mysql_query($sql.' LIMIT '.($page*20).', 20');
+ $sql = 'SELECT '.join($d_array,',').' from chars where rasse = \'NPC\' ORDER BY level, Name LIMIT '.($page*20).', 20';
$qry = mysql_query($sql);
//$anzahlSeiten = ceil(mysql_num_rows(mysql_query($sql))/20);
$colspan = count($d_array);
@@ -312,7 +312,10 @@ function displayNPCOverview() {
echo "\t".''."\n";
}
-
+ $total = mysql_num_rows(mysql_query('SELECT '.join($d_array,',').' from chars where rasse = \'NPC\''));
+ $url = '###LABEL###';
+ echo "\t".''.displayPagelinksNew(20, $total, $page, $url).' |
'."\n";
+
echo "\t".'Create a new NPC |
'."\n";
echo "\t".'
|
'."\n";
}
@@ -345,7 +348,7 @@ function displayNPC($action, $task, $charid, $table, $page, $data, $att_ids){
displayDeleteNPC($charid);
}
} else{
- displayNPCOverview();
+ displayNPCOverview($page);
}
echo "\t".'Zum Hauptmenu |
'."\n";
echo "\t".''."\n";