* @author Loic Vinet * @author Laurent Giovannoni */ class domain extends dbquery { /** * * @access private * @var integer */ private $the_start; /** * Redefinition of the LetterBox object constructor */ function __construct() { // configure the sql argument order by if(isset($_GET['start'])) { $this->the_start = strip_tags($_GET['start']); } else { $this->the_start = 0; } } /** * Alphabetical list of the domains * * @param string $page page name */ public function domainslistletters($page = "domains") { // List all the alphabet letter to view the doc types who are starting with the letter if(isset($_GET['show'])) { if($_GET['show'] == "false") { $show = "&show=false"; } else { $show = ""; } } else { $show = ""; } ?> : A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - connect(); $this->query("select count(*) as total from ".$table_name." ".$where); $nb_total_1 = $this->fetch_object(); $nb_total = $nb_total_1->total; // define the defaults values $nb_pages = ceil($nb_total/$nb_show); $link = "index.php?page=".$page_name."&start=".$this->the_start."&order=".$this->orderby.$what; if($nb_pages > 1) { $next_start = 0; $page_list1 = ' '._GO_TO_PAGE.' '; $page_list2 = ' '._GO_TO_PAGE.' '; $lastpage = 0; for($i = 0;$i <> $nb_pages; $i++) { $page_name = $i + 1; $the_line = $i + 1; if($this->the_start == $next_start) { $page_list1 .= "".$the_line.""; $page_list2 .= "".$the_line.""; } else { $page_list1 .= "".$the_line.""; $page_list2 .= "".$the_line.""; } $next_start = $next_start + $nb_show; $lastpage = $next_start; } $lastpage = $lastpage - $nb_show; $previous = ""; $next = ""; if($this->the_start > 0) { $start_prev = $this->the_start - $nb_show; $previous = ''._PREVIOUS.''; } if($this->the_start <> $lastpage) { $start_next = $this->the_start + $nb_show; $next = ''._NEXT.''; } $page_list1 = $page_list1.""; $page_list2 = $page_list2.""; if($previous <> '' || $next <> '') { if(empty($previous)) { $previous = " "; } if(empty($next)) { $next = " "; } $page_list1 .= $previous." ".$next.''; $page_list2 .= $previous." ".$next.'
: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z -
'._GO_TO_PAGE.' '; $page_list2 = ' '._GO_TO_PAGE.' '; $lastpage = 0; for($i = 0;$i <> $nb_pages; $i++) { $page_name = $i + 1; $the_line = $i + 1; if($this->the_start == $next_start) { $page_list1 .= "".$the_line.""; $page_list2 .= "".$the_line.""; } else { $page_list1 .= "".$the_line.""; $page_list2 .= "".$the_line.""; } $next_start = $next_start + $nb_show; $lastpage = $next_start; } $lastpage = $lastpage - $nb_show; $previous = ""; $next = ""; if($this->the_start > 0) { $start_prev = $this->the_start - $nb_show; $previous = ''._PREVIOUS.''; } if($this->the_start <> $lastpage) { $start_next = $this->the_start + $nb_show; $next = ''._NEXT.''; } $page_list1 = $page_list1.""; $page_list2 = $page_list2.""; if($previous <> '' || $next <> '') { if(empty($previous)) { $previous = " "; } if(empty($next)) { $next = " "; } $page_list1 .= $previous." ".$next.'
'._GO_TO_PAGE.' '; $lastpage = 0; for($i = 0;$i <> $nb_pages; $i++) { $page_name = $i + 1; $the_line = $i + 1; if($this->the_start == $next_start) { $page_list1 .= "".$the_line.""; $page_list2 .= "".$the_line.""; } else { $page_list1 .= "".$the_line.""; $page_list2 .= "".$the_line.""; } $next_start = $next_start + $nb_show; $lastpage = $next_start; } $lastpage = $lastpage - $nb_show; $previous = ""; $next = ""; if($this->the_start > 0) { $start_prev = $this->the_start - $nb_show; $previous = ''._PREVIOUS.''; } if($this->the_start <> $lastpage) { $start_next = $this->the_start + $nb_show; $next = ''._NEXT.''; } $page_list1 = $page_list1.""; $page_list2 = $page_list2."
: *