<?php
/* Copyright (C) 1992, 1993, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/**
* $Log: login.php,v $
* Revision 1.3 2000/08/20 06:13:05 chetang
* Fixed the login.php file which used to set spurious cookies.
*
* Revision 1.2 2000/08/19 23:24:27 chetang
* Fixed to work with PHP 4.
*
* Changed all "post" forms to "get".
*
* Removed invalid reference to search_form.inc
*
* Revision 1.1 2000/08/19 23:11:55 chetang
* Renamed files to ".php" extension
*
* Revision 1.1.1.1 2000/04/01 19:59:23 chetang
* Initial checkin
*
* Revision 1.1.1.1 1999/08/31 04:05:59 chetan
* Initial version as released by Chetan Gadgil
*
* Revision 1.3 1999/08/11 04:44:52 chetan
* Added bitmaps, header, footer, fancy tables
*
* Revision 1.2 1999/07/28 06:23:59 chetan
* Login works fine!
*
* Revision 1.1 1999/07/25 05:38:01 chetan
* Working version
*
*/
include "common.inc";
SetCookie("kbase_login", "$userID", mktime(0,0,0,12,31,2010));
//echo "Set cookie to $userId<br>";
if($userID == "newuser") {
$user_id = "guest";
SetCookie("kbase_login", "guest", mktime(0,0,0,12,31,2010));
//echo "Set cookie to $user_id<br>";
$header_string = "Location: index.php?user_id=$userID";
Header($header_string) ;
echo "Another session must have registered.";
exit;
}
if($userID == "") {
echo "Invalid login - no login specified";
exit;
}
$dbqry = new DBQuery("select password from users where login=\"$userID\"");
$result = $dbqry->queryResult;
logMessage("dbqry $dbqry has [$result] result odd: [$dbqry->result], obj [$dbqry->queryResult], qry=[$dbqry->queryText]");
if($result == 0) {
echo "Invalid login";
//mysql_free_result($result);
exit;
}
$num_rows=mysql_numrows($result);
$password = mysql_result($result, 0, "password");
mysql_free_result($result);
if($passwd != $password) {
echo "Invalid login - invalid password";
exit;
}
//$user_id = $login;
//SetCookie("kbase_login", "$user_id", mktime(0,0,0,12,31,2010));
//echo "Set cookie to $user_id<br>";
/* include "access-control.inc"; */
/* Expire at midnight on 31 Dec 2001 */
?>
<html>
<head>
<title>Login</title>
</head>
<?php
include "header.inc";
?>
<h1>Login successful</h1>
<?php
include "footer.inc";
?>
<pre>
Knowledgebase version 0.05, Copyright (C) 1999 Chetan Gadgil
Knowledgebase comes with ABSOLUTELY NO WARRANTY; For details see the LICENSE.
This is free software, and you are welcome to redistribute it
under certain conditions; For details see the LICENSE.
</pre>
</html>
按主题回答问题的知识库的系统
需积分: 50 80 浏览量
2001-04-08
00:00:00
上传
评论
收藏 41B TGZ 举报
普通网友
- 粉丝: 882
- 资源: 2万+
最新资源
- 基于Matlab人脸肤色定理的教师人数统计+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab霍夫曼变换的表盘读数识别+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab火灾烟雾检测源码带GUI界面+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的恶劣天气交通标志识别系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于MATLAB的霍夫曼变换的表盘示数识别+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的车道线识别系统 +源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于MATLAB的教室人数统计系统带Gui界面+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于MATLAB的教室人数统计系统带Gui界面+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于MATLAB 的霍夫曼变换答题卡识别源码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab+bp神经网络的神经网络汉字识别系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈