From: Neil S. <sir...@us...> - 2003-06-19 07:59:08
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 07:59:06 UTC Modified files: index.php lib/config.php-dist Log message: Author: SiRVu|caN Log message: Allow the main admin to change the amount of domains listed per page. ---------------------- diff included ---------------------- Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.5 publicdnsadmin/index.php:1.6 --- publicdnsadmin/index.php:1.5 Thu Jun 19 00:45:20 2003 +++ publicdnsadmin/index.php Thu Jun 19 00:58:56 2003 @@ -39,7 +39,7 @@ $row_id = 0; $row_count = 0; $offsetmin = $offset; - $offsetmax = $offset + 10; + $offsetmax = $offset + $domains_per_page; echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>Domain</th><th>Current serial</th><th>Owner</th><th>Records</th><th> </th></tr>\n"; foreach ($zones as $zone) { @@ -83,13 +83,13 @@ if ($row_id == 2) { $row_id = 0; } } - if ($row_count > 10) { - $offsettop = $row_count - 10; - $nums = round($row_count / 10); + if ($row_count > $domains_per_page) { + $offsettop = $row_count - $domains_per_page; + $nums = round($row_count / $domains_per_page); $num_count = 0; echo "<tr><td class=\"rowsearch\" colspan=5><center>"; echo "<a href=\"index.php?offset=1\"><<</a> | "; - $prev = $offset - 10; + $prev = $offset - $domains_per_page; if ($prev < 0) { echo "< | "; } else { @@ -97,10 +97,10 @@ } while ($num_count < $nums) { $num_count++; - $off = $num_count * 10 - 10; + $off = $num_count * $domains_per_page - $domains_per_page; echo "<a href=\"index.php?offset=$off\">$num_count</a> "; } - $next = $offset + 10; + $next = $offset + $domains_per_page; echo "| <a href=\"index.php?offset=$next\">></a> | "; echo "<a href=\"index.php?offset=$offsettop\">>></a>"; echo "</center></th></tr>"; Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.6 publicdnsadmin/lib/config.php-dist:1.7 --- publicdnsadmin/lib/config.php-dist:1.6 Wed Jun 18 23:04:38 2003 +++ publicdnsadmin/lib/config.php-dist Thu Jun 19 00:58:56 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.6 2003/06/19 06:04:38 sirvulcan Exp $ + $Id: config.php-dist,v 1.7 2003/06/19 07:58:56 sirvulcan Exp $ */ /* @@ -35,6 +35,9 @@ /* Default TTL for domains/pointers */ $default_ttl = 86400; + +/* Number of domains listed per page */ +$domains_per_page = 10; /* Default template used for when users signup- must exist */ $signup_template = "user-domains"; ----------------------- End of diff ----------------------- |