summaryrefslogtreecommitdiff
path: root/doc/nils-diplom/Dateistruktur/admin/get_user.php
blob: 52aee37f7bc035c8360dd2417d4363a3ed06866b (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
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");
?>