summaryrefslogtreecommitdiff
path: root/doc/nils-diplom/Dateistruktur/praktikum.php
diff options
context:
space:
mode:
Diffstat (limited to 'doc/nils-diplom/Dateistruktur/praktikum.php')
-rwxr-xr-xdoc/nils-diplom/Dateistruktur/praktikum.php121
1 files changed, 121 insertions, 0 deletions
diff --git a/doc/nils-diplom/Dateistruktur/praktikum.php b/doc/nils-diplom/Dateistruktur/praktikum.php
new file mode 100755
index 0000000..5a51c4b
--- /dev/null
+++ b/doc/nils-diplom/Dateistruktur/praktikum.php
@@ -0,0 +1,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&nbsp;<input name="Login" type="text" class="inputtext" size="15">
+ passwort&nbsp;<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> \ No newline at end of file