|
Loading... WebWoWWorld of Warcraft Private Development Forums You are not logged in.
#1 2010-01-27 20:49:29Account Pagination...Was hoping someone could help with making a working mod to the "account list". V/R Stady234 Offline
#2 2010-01-28 15:12:20Offline
#3 2010-01-28 20:58:04Re: Account Pagination...I would like to have the "30 Results for '' (displaying 30 max)" V/R Stady234 Offline
#4 2010-01-29 08:40:26Offline
#5 2010-01-29 09:48:17Re: Account Pagination...It could be very usefull... Axe's rule no.16: Phenom is an exception to Rule 15. Offline
#6 2010-01-29 16:27:19Re: Account Pagination...Here's a quick go at it: Code:<?php
$host = '127.0.0.1'; #MySQL Server host
$user = 'root'; #MySQL Server Username
$pass = ''; #MySQL Server Password
$db = 'Site'; #MySQL Database for Website
$page = '0'; #Default Page
$results = '15'; #Default Result Amounts
$more = false; #Default show next page (leave false)
if(isset($_GET['page']))
$page = (is_numeric($_GET['page'])) ? $_GET['page'] : '0';
mysql_connect($host, $user, $pass);
mysql_select_db($db);
#Get News
$query = mysql_query("SELECT title, news, author FROM news ORDER BY id DESC LIMIT $page, $results");
if(mysql_num_rows($query) > $results) {
$total_pages = mysql_num_rows($query) / $results;
$more = true;
}
while($row = mysql_fetch_array($query)) {
echo "Title: <b>{$row['title']}</b> - Posted by {$row['author']}
<br>
{$row['news']}";
}
echo "Showing {$results} posts per page, {$total_pages} total pages. <a href='?page={$next}'>Next -></a>";
if($more) {
$next = $page + $results;
echo "<a href='?page={$next}'>Next -></a>";
?>Just change this to work with your site, and you're done! Post edited by maverfax (2010-01-29 16:31:03) Offline
#7 2010-01-29 21:35:16Re: Account Pagination...test code didn't work.. but i wanted a mod of the admincp3 SPECIFICALLY.. Code://print "<br>".paginate($b,$start,'quest.php?name=admincp3'); Post edited by stady234 (2010-01-29 21:37:15) V/R Stady234 Offline
#8 2010-01-30 03:36:20Re: Account Pagination...may i remind there is already function to paginate included with script check out functions.php Offline
#9 2010-01-30 07:08:39Re: Account Pagination...if i uncomment your original code i get this: V/R Stady234 Offline
#10 2010-02-05 07:31:39Re: Account Pagination...any help?? V/R Stady234 Offline |
Latest Posts
Table 'characte... (Hellfires) Sticky: Release Two col... (slade1000) How to put vote... (Rusfighter) Trinity_ra- Bla... (Auzziedude) Vote Shop Modul... (Terrum) User Online iss... (mcdonald) Erroe (Axe) paypal (Phenom) Need Help Site ... (Cobo) Vote System: RA... (Lunar)
Random Fact
You can buy AD banner on top of this website, click here, trade in your MP. Activity miki258 and bleachwow122 just completed all steps trough WebCreator and got new websites. maryo1912 and LordRasz just completed all steps trough WebCreator and got new websites. Hellfires and khazan just completed all steps trough WebCreator and got new websites. khazan and Hellfires just completed all steps trough WebCreator and got new websites. bleachwow122 added new person named "Ichigo_Kurosaki" to SpyMe. TheCrogamer and reconsniper96 just completed all steps trough WebCreator and got new websites. |