Copyright (C) 2007 nso 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //I've not switched the admin interface to db api, as I plan to remove the admin panel as-is today. Please, leave this obsolete thing as-is and start a new admin interface integrated with the rest. include('config.inc.php'); require_once('auth.php'); if (isset($_POST['nybruker'])) { mysql_pconnect($mysql_host,$mysql_user,$mysql_pass); mysql_select_db($mysql_base); $bruker = mysql_real_escape_string($_REQUEST['bruker']); $passwb = mysql_real_escape_string($_REQUEST['pass1']); $passwc = mysql_real_escape_string($_REQUEST['pass2']); if ($passwb !== $passwc) { die("Dei to passorda stemmer ikkje"); } $passwd = sha1($passwb); $sql = "INSERT INTO `brukarar` (`brukar`,`passord`) VALUES ('$bruker','$passwd')"; mysql_query($sql) or die("Brukernavn eller e-postadresse er i bruk."); } else { ?>
Brukarnamn:
Passord:
Gjenta passord: