// phpHoo3 - a PHP4 based "yahoo"-like link directory // Copyright (C) 1999/2001 Rolf V. Ostergaard http://www.cable-modems.org/phpHoo/ // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Refer to http://www.webreference.com/perl/xhoo/php1/ for phphoo, the // first cut done by CDI. include("config.php"); // Configuration files $ver = phpversion(); // Check cookie to see if we are in admin mode if($HooPass == $ADMIN_COOKIE) { // should we delete the cookie and start? if (isset($exit_admin)) { setcookie("HooPass", ""); header ("Location: $SITE_URL$SITE_DIR"); exit; } // Or offer entry as USER or ADMIN? print "
\n"; print "You are already ADMIN - Your options are:
PHP ver $ver
"; print "\n"; exit; } // Check to see if we are being posted a set of USER/PASS if (isset($LOGIN) && !empty($HTTP_POST_VARS)) { $vars = $HTTP_POST_VARS; if (($vars["USER"] == $ADMIN_USER) && ($vars["PASS"] == $ADMIN_PASS)) { setcookie("HooPass", $ADMIN_COOKIE); header ("Location: $SITE_URL$SITE_DIR"); exit; } } print "\n"; print "\n"; print "PHP ver $ver
"; print "\n"; ?>