Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
|
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
|
|
|
Author |
Message |
![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 27/04/2006 00:46:50
|
linuxmen
Newbie
Joined: 27/04/2006 00:17:22
Messages: 1
Offline
|
Hello All.
Im check the code of Gb.class.php
- function show_entries($entry=0) {
- global $GB_PG;
- $entry = intval($entry);
- $LANG = &$this->db->LANG;
- $VARS = &$this->db->VARS;
- $this->db->fetch_array($this->db->query("select count(*) as total from ".$this->db->table['data']));
- $this->total = $this->db->record["total"];
- $TPL = $this->get_entries($entry,$this->db->VARS["entries_per_page"]);
- $TPL['GB_TOTAL'] = $this->total;
- $TPL['GB_JUMPMENU'] = implode("\n",$this->generate_JumpMenu());
- $TPL['GB_TIME'] = $this->db->DateFormat(time());
- $TPL['GB_NAVIGATION'] = $this->get_nav($entry);
- $TPL['GB_HTML_CODE'] = ($this->db->VARS["allow_html"] == 1) ? $this->db->LANG["BookMess2"] : $this->db->LANG["BookMess1"];
- $guestbook_html = "";
- eval("\$guestbook_html = \"".$this->template->get_template($this->db->GB_TPL['header'])."\";");
- eval("\$guestbook_html .= \"".$this->template->get_template($this->db->GB_TPL['body'])."\";");
- eval("\$guestbook_html .= \"".$this->template->get_template($this->db->GB_TPL['footer'])."\";");
- return $guestbook_html;
- }
-
-
-
-
- tion get_nav($entry=0) {
- global $_SERVER, $GB_PG;
- $entry = intval($entry);
- $self = (IS_MODULE && eregi("\?",$GB_PG["index"])) ? "$GB_PG[index]&entry=" : basename( $_SERVER['PHP_SELF'])."?entry=";
- $next_page = $entry+$this->db->VARS['entries_per_page'];
- $prev_page = $entry-$this->db->VARS['entries_per_page'];
- $navigation = '';
- if ($prev_page >= 0) {
- $navigation = " <img src=\"$GB_PG[base_url]/img/back.gif\" width=\"16\" height=\"14\"><a href=\"$self$prev_page\">". $this->db->LANG["NavPrev"]."</a>\n";
- }
- if ($next_page < $this->total) {
- $navigation = $navigation." <a href=\"$self$next_page\">".$this->db->LANG["NavNext"]."</a><img src=\"$GB_PG[base_url]/img/next.gif\" width=\"16\" height=\"14\">\n";
- }
- return $navigation;
- }
this function generates the next page and previous page, but How Im create a new navigation bar
for example in this format
< 1 - 2 - 3 - 4 >
Do you have an Idea?
Thanks
A. Acosta[/code]
|
HellBoy |
|
![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 27/04/2006 09:56:59
|
Carbonize
Master
![[Avatar]](/forum/images/avatar/96871336492d73e733f55.jpg)
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
You could have a look at how I do it in Lazarus.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
|
|
|
|
Based on the open source JForum
|