summaryrefslogtreecommitdiff
path: root/doc/nils-diplom/Dateistruktur/admin/get_user.php
diff options
context:
space:
mode:
Diffstat (limited to 'doc/nils-diplom/Dateistruktur/admin/get_user.php')
-rwxr-xr-xdoc/nils-diplom/Dateistruktur/admin/get_user.php158
1 files changed, 158 insertions, 0 deletions
diff --git a/doc/nils-diplom/Dateistruktur/admin/get_user.php b/doc/nils-diplom/Dateistruktur/admin/get_user.php
new file mode 100755
index 0000000..52aee37
--- /dev/null
+++ b/doc/nils-diplom/Dateistruktur/admin/get_user.php
@@ -0,0 +1,158 @@
+<?php
+
+include("../header.php");
+include("adminfuncs.php");
+
+$path = "LIST/".$_SESSION['file'];
+$scriptpath = "LIST/parse-exel.pl";
+
+
+//______________Auslesen des EXCEL-FILES_____________________________________________________________________
+
+ $handle = popen("perl $scriptpath $path", "r"); // parsen des XLS-Files
+ $inhalt = fread($handle, filesize ("$path")); // Parsingergebnis in Variable schreiben
+
+ $lines = explode(">>>",$inhalt); // Zeilenweise aufsplitten...
+ $count = count($lines); // Anzahl der Ergebnisse bestimmen...
+
+ for ($i = 0; $i < $count; $i++) // Inhalte in zweidimensionales Array schreiben
+ {
+ $cont = explode(">",$lines[$i]);
+ $countcont = count($cont);
+ for ($c = 0; $c < $countcont; $c++)
+ {
+ $dim[$i][$c] = $cont[$c]; // $dim enthält die Daten der Studenten
+ }
+ }
+
+//____________________________________________________________________________________________________________
+
+
+
+?>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="titel_15">STUDENTENLISTE<br><br></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td class=text>
+
+<?
+
+if (isset($_GET['load']))
+{
+
+ $group = $_GET['thegroup'];
+
+ while(list($strName ,$value) = each($_GET))
+ {
+ if(is_array($value))
+ {
+ foreach($value as $value_array)
+ {
+ $message = add_user_from_list($dim[$value_array][1], $dim[$value_array][2], $dim[$value_array][3], $group);
+ print "> ".$message."<br>"; //Ausgabe der Fehlermeldung
+ }
+ }
+ }
+}
+
+?>
+
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td valign="top" class="text">
+ <tr>
+
+ <table>
+
+<form action=<?=$_POST['PHP_SELF'].SID?>>
+
+<tr colspan=2><td class="text">In welche GRUPPE sollen die Nutzer aufgenommen werden:</td>
+ <td width=400>
+ <select class="inputtext" name="thegroup" size="1" width=190>
+ <?
+
+ $sql = "SELECT groups FROM groups";
+
+ $stmt = dbconnect($sql);
+
+ OCIExecute($stmt);
+
+ $nrows = OCIFetchStatement($stmt, $results);
+
+
+ for ( $i = 0; $i < $nrows; $i++ )
+ {
+ reset($results);
+
+ while ( $column = each($results) )
+ {
+ $data = $column['value']; //Liste mit vorhandenen Benutzern füllen
+ }
+
+ if ($_POST['all_group'] == $data[$i]) print "<option selected>" . $data[$i] . "</option>\n"; else print "<option>$data[$i]</option>\n";
+ }
+
+ ?>
+
+ </select>
+ </td>
+ </tr>
+
+<tr colspan=2>
+ <td>&nbsp;</td>
+ </tr>
+ <tr colspan=2>
+ <td colspan=2 class=randoben>&nbsp;</td>
+ </tr>
+<tr valign=top colspan=2><td>
+
+
+<?
+
+print "<p><select name=List[] size=$count multiple>";
+
+
+ for ($l = 0; $l < $count; $l++)
+ {
+ print "<option value=$l>";
+ for ($ll = 1; $ll < 4; $ll++)
+ {
+ print $dim[$l][$ll] . " ";
+ }
+ print "</option>";
+ }
+
+
+?>
+
+</select></p>
+
+</td>
+<td colspan=2>
+<input class=inputsubmit type=submit name=load width=179 height=15 border=0>
+</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