1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
<?php
if (isset($_POST['Login']))
{
include("connect.php");
$Login = $_POST['Login'];
$Password = $_POST['Password'];
$sql = "SELECT typ as X, stud_id as Y, aktiv as Z, datum as dat, name, f_name FROM students WHERE LOGIN = '$Login' AND NAME = '$Password'";
$stmt = dbconnect($sql);
OCIExecute($stmt);
$nrows = OCIFetchStatement($stmt,$results); //Ergebnisse in Array eintragen...
if ( $nrows == 1 )
{
OCIExecute($stmt);
while(OCIFetch($stmt))
{
$type = OCIResult($stmt, "X");
$user_id = OCIResult($stmt, "Y");
$aktiv = OCIResult($stmt, "Z");
$datum = OCIResult($stmt, "DAT");
$name = OCIResult($stmt, "NAME");
$fname = OCIResult($stmt, "F_NAME");
}
if ($aktiv == 1) // Nutzer aktiv??
{
session_start();
$_SESSION['type'] = $type;
$_SESSION['user'] = $user_id;
$_SESSION['since'] = $datum;
$_SESSION['name'] = $name;
$_SESSION['fname'] = $fname;
?>
<html>
<meta http-equiv="refresh" content="0; URL=/dipl/portal/portal.php?<?=SID?>">
</html>
<?
}
else // Nutzer nicht aktiv!
{
if ( $aktiv == 0 ) $message = "Ihr Login ist derzeit nicht aktiviert - bitte wenden sie sich an Ihren Administrator!";
}
}
else // Loginname oder Passwort falsch geschrieben oder nicht vorhanden!
if ($rows == 0) $message = "Login oder Passwort ungültig!";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//DE"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Datenbank_Praktikum_Duesterhoeft</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<meta name="keywords" content="Datenbank Praktikum Duesterhoeft Hochschule Wismar">
<meta name="description" content="Bearbeitung von Praktikumsaufgaben von zu Hause">
<META http-equiv="Page-Enter" content="blendTrans(Duration=0.4)">
<META http-equiv="Page-Exit" content="blendTrans(Duration=0.4)">
<link href="/dipl/css/stilneu1.css" rel="stylesheet" type="text/css">
</head>
<body class="titel">
<table width="800" height="73" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="800" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="613" height="110" valign="top">
<img src="/dipl/css/head.gif" width="555" height="100"></td>
<td width="179" height="110" align="right">
<form action="<?=$PHP_SELF?>" method="post" class="titel" height="110">
login <input name="Login" type="text" class="inputtext" size="15">
passwort <input name="Password" type="password" class="inputtext" size="15">
<img src="/dipl/css/HS.gif" width="179" height="45">
</td>
</tr>
<tr>
<td colspan="2"><img src="/dipl/css/ekg_long.gif" width="613" height="15" border="0">
<input type="image" name="submitok" src="/dipl/css/ekg_Login.gif" width="179" height="15" border="0" onclick="javascript:document.FormName.submit()">
</td>
</tr>
</form>
</table>
<? echo $message
?>
</body>
</html>
|