Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2003
Posts: 179
Member
Member
Offline
Joined: Feb 2003
Posts: 179
Ok I'm totally stuck on handling multiple pages, and this is all i need to finish my sub showmain that does the shopping mall main index.

I have $page var and $totpages var that tell me current page number to display and the total pages in the index.
plus I have a $shopcolcnt var for the number of shops per column. then I get to follow bit that parses the datafile

Code

# one datafile how da heck to split it into pages
@datafile = &OpenFileAsArray("$vars_config{NonCGIPath}/shops/shoplist.cgi");

foreach $thisline(@datafile) {
chomp($thisline);
if ($thisline ne '') {
@linearray = split(/\|\|/,$thisline);
##output it if active shop
if ($linearray[6]=1) {
## weed out shop type for each column
if ($linearray[1] == "0") {
# we have a pit shop
$pshops .= "<br><b><a href=\"$linearray[3]\">$linearray[2]</a></b><br>\n";
$pshops .= "<br><a href=\"$linearray[3]\"><img src=\"http://dragboatalley.com/shops/$linearray[4]\" border=\"1\" alt=\"Click Here to visit this Shop\"</a><br><br><br>\n";
} else {
# we have a featured shop
$fshops .= "<br><b><a target=\"_blank\" href=\"$linearray[3]\">$linearray[2]</a></b><br>\n";
$fshops .= "<br><a target=\"_blank\" href=\"$linearray[3]\"><img src=\"http://dragboatalley.com/shops/$linearray[4]\" border=\"1\" alt=\"Click Here to visit this Shop\"</a><br><br><br>\n";
}
}
}
}

as-is, it dumps all shops on one page not matter what page requested. The only thing i did with the page handling vars was page number links at bottom of index.

Sponsored Links
Entire Thread
Subject Posted By Posted
Need Help Finishing Custom Mod RoxSeibert 08/13/2006 8:53 PM
Re: Need Help Finishing Custom Mod AllenAyres 08/15/2006 11:37 PM
Re: Need Help Finishing Custom Mod RoxSeibert 08/16/2006 3:00 PM
Re: Need Help Finishing Custom Mod AllenAyres 08/16/2006 11:42 PM
Re: Need Help Finishing Custom Mod RoxSeibert 08/17/2006 1:01 AM
Re: Need Help Finishing Custom Mod AllenAyres 08/17/2006 6:07 AM
Re: Need Help Finishing Custom Mod RoxSeibert 08/17/2006 6:39 AM
Re: Need Help Finishing Custom Mod RoxSeibert 08/18/2006 6:51 PM
Re: Need Help Finishing Custom Mod AllenAyres 08/19/2006 6:26 AM
Re: Need Help Finishing Custom Mod RoxSeibert 08/20/2006 7:56 PM
Re: Need Help Finishing Custom Mod AllenAyres 08/21/2006 3:59 AM
Re: Need Help Finishing Custom Mod RoxSeibert 08/22/2006 3:46 PM
Re: Need Help Finishing Custom Mod RoxSeibert 08/23/2006 4:55 AM
Re: Need Help Finishing Custom Mod AllenAyres 08/23/2006 4:46 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 538
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 8
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)