summaryrefslogtreecommitdiff
path: root/doc/niels-diplom/Dateistruktur/admin/lesson_admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'doc/niels-diplom/Dateistruktur/admin/lesson_admin.php')
-rwxr-xr-xdoc/niels-diplom/Dateistruktur/admin/lesson_admin.php178
1 files changed, 178 insertions, 0 deletions
diff --git a/doc/niels-diplom/Dateistruktur/admin/lesson_admin.php b/doc/niels-diplom/Dateistruktur/admin/lesson_admin.php
new file mode 100755
index 0000000..f039943
--- /dev/null
+++ b/doc/niels-diplom/Dateistruktur/admin/lesson_admin.php
@@ -0,0 +1,178 @@
+<?php
+
+include("../header.php");
+
+if ($_SESSION['type'] == 0) // Session Zugangscheck für den Administrator
+ {
+
+ //print "<meta HTTP-EQUIV=\"Refresh\" CONTENT=5; URL=\"/dipl/praktikum.php\">";
+ print "<tr><td class=\"titel_15\">KEINE ADMINSESSION...</td></tr>";
+ print "<tr><td class=\"titel_15\">Bitte Loggen sie sich erneut als Admin ein...</td></tr>";
+ print "</td></tr></table></table>";
+ include("../footer.php");
+ exit;
+
+ }
+
+include("adminfuncs.php");
+
+
+if (isset($_POST['add']))
+{
+ less_add($_POST['less_text'], $_POST['less_muster'], $_POST['less_typ'], $_POST['less_part']); //Aufgabe anlegen
+}
+
+
+if (isset($_POST['back']))
+{
+ unset($find);
+ unset($chose_typ);
+ unset($_SESSION['chose_typ']);
+}
+
+?>
+
+
+
+
+
+<a name="start"></a>
+
+<tr>
+<td class="titel_15">AUFGABENVERWALTUNG</td>
+</tr>
+
+<table class=text>
+
+<form action="<?=$_POST['PHP_SELF'] . "?" . SID?>" method="Post">
+
+
+<? if (isset($_POST['find']))
+ {
+ $chose_typ = $_POST['chose_typ'];
+
+ $_SESSION['chose_typ'] = $_POST['chose_typ'];
+
+ $sql = "SELECT LESSON_ID, TYP, TEXT FROM LESSONS where TYP = '$chose_typ' and part <> 'Vorbereitung'";
+
+ $stmt = dbconnect($sql);
+
+ OCIExecute($stmt);
+
+
+ print "<tr><TD colspan=2 class=text><BR>In der Rubrik \"$chose_typ \" sind folgende Aufgaben enthalten: <BR> <BR><TABLE Width=550 BORDER=1 colspan=2>\n";
+ print "<TR>\n";
+
+
+
+ print "<TABLE Width=550 BORDER=1 colspan=2 class=text>\n";
+ print "<TH>ID</TH><TH>Typ</TH><TH>Beschreibung</TH>";
+
+ while (OCIFetch($stmt)) {
+ print "<tr><TD><a href=\"edit_lesson.php?id=" . OCIResult($stmt, "LESSON_ID") . "&typ=" . OCIResult($stmt, "TYP") . "&" . SID . "\">" . OCIResult($stmt, "LESSON_ID") . "</a></TD><TD>" . OCIResult($stmt, "TYP") . "</TD><TD>" . OCIResult($stmt, "TEXT") . "</TD></tr>";
+ }
+ OCIFreeStatement($stmt);
+
+ unset($_SESSION['chose_typ']);
+?>
+
+</TABLE>
+
+<tr>
+ <td>...zum Bearbeiten oder Löschen der Aufgaben klicken Sie bitte auf die ID!</td>
+<tr>
+ <td valign=top><br><input class="inputsubmit" type="Submit" name="back" value="zurück zur Auswahl&nbsp;"></td>
+</tr>
+
+
+
+
+
+
+</table>
+
+</table>
+
+
+<?
+ include("../footer.php");
+ exit;
+ }
+?>
+
+
+ <tr><td class="titel" colspan=2><br>Aufgaben finden & bearbeiten</td></tr>
+
+ <tr><td class="text" ><br>AUFGABEN aus der Rubrik:</td></tr>
+
+ <tr>
+ <td><br>
+ <select class="inputtext" name="chose_typ" size="1">
+ <option>SELECT</option>
+ <option>INSERT</option>
+ <option>UPDATE</option>
+ <option>CREATE</option>
+ </select>
+ <input class="inputsubmit" type="Submit" name="find" value="finden" valign="center"><br><br></td>
+ </tr>
+</form>
+</TABLE>
+
+
+
+<table>
+<form action="<?=$_POST['PHP_SELF'] . "?" . SID?>" method="Post">
+
+ <tr><td colspan=2 class=randunten>&nbsp;</td></tr>
+ <tr><td class=titel colspan=2><br>Anlegen neuer Aufgaben</td></tr>
+ <tr><td colspan=2>&nbsp;</td></tr>
+ <tr><td class="text" valign=top>AUFGABENTEXT</td>
+ <td><textarea class="inputtext" type="text" name="less_text" cols="85" rows="10"></textarea></td></tr>
+
+ <tr>
+ <td class="text">MUSTERLÖSUNG</td>
+ <td>
+ <input class="inputtext" type="text" name="less_muster" size="80">
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="text">TYPE</td>
+ <td>
+ <select class="inputtext" name="less_typ" size="1">
+ <option >SELECT</option>
+ <option >INSERT</option>
+ <option >UPDATE</option>
+ <option >CREATE</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="text">GLIEDERUNG</td>
+ <td>
+ <select class="inputtext" name="less_part" size="1">
+ <option >Vorbereitung</option>
+ <option >Abfragen</option>
+ </select><input class="inputsubmit" type="Submit" name="add" size="30" value="Aufgabe hochladen" align=center>
+ </td>
+ </tr>
+
+
+
+
+</form>
+</table>
+
+</td> </tr></table>
+<tr>
+<td width="200" align="right" valign="top" class="randmenu"><p>&nbsp;</td>
+</tr>
+</table>
+
+
+
+<?
+include("../footer.php");
+?> \ No newline at end of file