/[nuke]/html/auth.inc.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /html/auth.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Fri Sep 22 07:22:13 2000 UTC (23 years, 6 months ago) by dpavlin
Branch: dbp, MAIN
CVS Tags: r3_6, HEAD
Changes since 1.1: +0 -0 lines
import of version 3.6

1 <?PHP
2
3 ######################################################################
4 # PHP-NUKE: Web Portal System
5 # ===========================
6 #
7 # Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
8 # http://www.ncc.org.ve/php-nuke.php
9 #
10 # This modules is for administrators authentication
11 #
12 # This program is free software. You can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License.
15 ######################################################################
16
17 if(!isset($mainfile)) { include("mainfile.php"); }
18
19 if ((isset($aid)) && (isset($pwd)) && ($op == "login")) {
20 if($aid!="" AND $pwd!="") {
21 dbconnect();
22 $result=mysql_query("select pwd from authors where aid='$aid'");
23 list($pass)=mysql_fetch_row($result);
24 if($pass == $pwd) {
25 $admin = base64_encode("$aid:$pwd");
26 setcookie("admin","$admin",time()+2592000); // 1 mo is 2592000
27 }
28 }
29 }
30
31 $admintest = 0;
32
33 if(isset($admin)) {
34 if(!IsSet($mainfile)) { include("mainfile.php"); }
35 $admin = base64_decode($admin);
36 $admin = explode(":", $admin);
37 $aid = "$admin[0]";
38 $pwd = "$admin[1]";
39 if ($aid=="" || $pwd=="") {
40 $admintest=0;
41 exit;
42 }
43 dbconnect();
44 $result=mysql_query("select pwd from authors where aid='$aid'");
45 if(!$result) {
46 echo "Selection from database failed!";
47 exit;
48 } else {
49 list($pass)=mysql_fetch_row($result);
50
51 if($pass == $pwd && $pass != "") {
52 $admintest = 1;
53 }
54 }
55 }
56
57 ?>

  ViewVC Help
Powered by ViewVC 1.1.26