From: Neil S. <sir...@us...> - 2003-06-19 09:44:02
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 09:44:00 UTC Modified files: signup.php docs/CHANGELOG lib/config.php-dist lib/header.php Log message: Author: SiRVu|caN Log message: Admins can now restrict signups. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.12 publicdnsadmin/docs/CHANGELOG:1.13 --- publicdnsadmin/docs/CHANGELOG:1.12 Thu Jun 19 02:28:16 2003 +++ publicdnsadmin/docs/CHANGELOG Thu Jun 19 02:43:50 2003 @@ -19,4 +19,4 @@ SiRVu|caN <sir...@si...> - 19/6/2003 - Improved dbbackup.php, now doesnt require seperate conf. SiRVu|caN <sir...@si...> - 19/6/2003 - Added a offset system, 10 domains displayed per page. SiRVu|caN <sir...@si...> - 19/6/2003 - Version number added below the logo. - +SiRVu|caN <sir...@si...> - 19/6/2003 - Admins can now restrict signups. Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.7 publicdnsadmin/lib/config.php-dist:1.8 --- publicdnsadmin/lib/config.php-dist:1.7 Thu Jun 19 00:58:56 2003 +++ publicdnsadmin/lib/config.php-dist Thu Jun 19 02:43:50 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.7 2003/06/19 07:58:56 sirvulcan Exp $ + $Id: config.php-dist,v 1.8 2003/06/19 09:43:50 sirvulcan Exp $ */ /* @@ -47,6 +47,9 @@ /* Path to site (without a trailing fowardslash */ $site_address = "http://www.site.com/publicdnsadmin"; + +/* Restrict new user signups, admins can still add users via the interface when logged in */ +$allow_newusers = 1; /* NS Server Addresses / Access Data, You Need Webserver Enabled On PowerDNS */ $ns1addy = "ns1.server.com"; Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.6 publicdnsadmin/lib/header.php:1.7 --- publicdnsadmin/lib/header.php:1.6 Thu Jun 19 02:28:16 2003 +++ publicdnsadmin/lib/header.php Thu Jun 19 02:43:50 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.6 2003/06/19 09:28:16 sirvulcan Exp $ + $Id: header.php,v 1.7 2003/06/19 09:43:50 sirvulcan Exp $ */ ?> @@ -43,7 +43,13 @@ <br>· <a href="logout.php" class="menu">Log out</a> <?php } else { ?> · <a href="index.php" class="menu">Login</a><br><br> - · <a href="signup.php" class="menu">Signup</a><br> + <? + if ($allow_newusers != 0) { + ?> + · <a href="signup.php" class="menu">Signup</a><br> + <? + } + ?> · <a href="forgotten_pass.php" class="menu">Forgotten Pass</a><br> · <a href="stats.php" class="menu">Statistics</a><br> · <a href="terms.php" class="menu">Terms</a><br><br> @@ -60,5 +66,5 @@ <table><tr><td> <img src="images/logo.gif"><br> </td></tr><tr><td align="right"> - <font face="verdana" size=1>v1.0dev</font> + <font face="verdana" size=1>Public DNS Administrator v1.0dev</font> </td></tr></table> Index: publicdnsadmin/signup.php diff -u publicdnsadmin/signup.php:1.3 publicdnsadmin/signup.php:1.4 --- publicdnsadmin/signup.php:1.3 Wed Jun 18 03:20:24 2003 +++ publicdnsadmin/signup.php Thu Jun 19 02:43:50 2003 @@ -39,6 +39,12 @@ die(); } +if ($allow_newusers == 0) { + echo "<p class=\"error\">New user signups are disabled, see an Administrator for further info.</p>"; + require("lib/footer.php"); + die(); +} + if ($douser == 1) { // terms and agreement check if ($terms == 1) { ----------------------- End of diff ----------------------- |