Filter:   InfoImg
download auth.inc.php
Language: PHP
LOC: 57
Project Info
Free Market(freemarket)
Server: SourceForge
Type: cvs
...\freemarket\freemarket\www\
   .htaccess
   admin.php
   article.php
   auth.inc.php
   backend.php
   banners.php
   comments.php
   counter.php
   dhtmllib.js
   download.php
   ezhilit.php
   faq.php
   footer.php
   friend.php
   header.php
   index.php
   lang-croatian.php
   lang-danish.php
   lang-dutch.php
   lang-english.php
   lang-french.php
   lang-german.php
   lang-indonesia.php
   lang-indonesian.php
   lang-italian.php
   lang-japanese.php
   lang-korean.php
   lang-latvian.php
   lang-norwegian.php
   lang-polish.php
   lang-portuguese.php
   lang-quebec.php
   lang-russian.php
   lang-simplifiedchinese.php
   lang-slovak.php
   lang-spanish.php
   lang-swedish.php
   lang-TEMPLATE.php
   ...-traditionalchinese.php
   links.php
   mainfile.php
   memberlist.php
   memberslist.php
   pollBooth.php
   pollcomments.php
   postinfo.html
   print.php
   problems.php
   scroller.js
   search.php
   sections.php
   stats.php
   submit.php
   top.php
   topics.php
   user.php

<?PHP

######################################################################
# PHP-NUKE: Web Portal System
# ===========================
#
# Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
# http://phpnuke.org
#
# This modules is for administrators authentication
#
# 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.
######################################################################

if(!isset($mainfile)) { include("mainfile.php"); }

if ((isset($aid)) && (isset($pwd)) && ($op == "login")) {
    if($aid!="" AND $pwd!="") {
	dbconnect();
	$result=mysql_query("select pwd from authors where aid='$aid'");
	list($pass)=mysql_fetch_row($result);
	if($pass == $pwd) {
	    $admin = base64_encode("$aid:$pwd");
	    //setcookie("admin","$admin",time()+2592000); // 1 mo is 2592000
	    setcookie("admin","$admin"); // 1 mo is 2592000
	}
    }
}

$admintest = 0;

if(isset($admin)) {
  if(!IsSet($mainfile)) { include("mainfile.php"); }
  $admin = base64_decode($admin);
  $admin = explode(":", $admin);
  $aid = "$admin[0]";
  $pwd = "$admin[1]";
  if ($aid=="" || $pwd=="") {
    $admintest=0;
    echo "<html>\n";
    echo "<title>INTRUDER ALERT!!!</title>\n";
    echo "<body bgcolor=FFFFFF text=000000>\n<br><br><br>";
    echo "<center><img src=images/eyes.gif border=0><br><br>\n";
    echo "<font face=Verdana size=+4><b>Get Out!</b></font></center>\n";
    echo "</body>\n";
    echo "</html>\n";
    exit;
  }
  dbconnect();
  $result=mysql_query("select pwd from authors where aid='$aid'");
  if(!$result) {
        echo "Selection from database failed!";
        exit;
  } else {
    list($pass)=mysql_fetch_row($result);
    if($pass == $pwd && $pass != "") {
        $admintest = 1;
    }
  }
}
?>