Jump to content

[SOLVED] graphic generator script


Tammy

Recommended Posts

I just bought this graphic generator and what this script does is when I upload graphics to my server the script generates the codes automatically so I don't have to manually code it myself, well I want to mod the code so instead of it having the 'next' and 'previous' pages I just want it to show Page numbers like  '1 2 3 4 5 6' and next to it have a 'next' link and say I go to page  3 it'll still have the page numbers and a 'next' link and also a 'previous' link

 

 

(the next and previous links are to go to the next page or previous page)

 

Now this is part of the script where it shows the 'next' and 'previous' links

 

echo '<table width="100%"  border="0" cellspacing="0" cellpadding="4" border="0" bgcolor="#eeeeee" style="border-bottom: 1px solid #cccccc"><tr>';

//if ($cnt >= $start && $cnt < $end)

if(isset($_GET['page'])&&($_GET['page'] != 1)) {

$pre = $_GET['page'] - 1;
	echo '<td align="left" width="38%"><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $pre . '"><b>Previous Page</b></a></td>';
	}

$pages = $total/$max2show;
$lastpage = ceil($pages);

echo '<td></td>';

if($page < $lastpage) {

$next = $page + 1;
echo '<td align="right" width="45%"><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $next . '"><b>Next Page</b></a></td>';

}

echo '</tr>
</table><br />';

 

Thanks  :)

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.