Subversion Repositories public

Rev

Rev 4 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 andreas 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
   "http://www.w3.org/TR/html4/loose.dtd">
3
<?php
4
$header = $_REQUEST['header'];
5
 
6
if (!isset($unum)) {
7
   $unum = $_COOKIE['TPMunum'];
8
}
9
 
10
if (!isset($rstufe)) {
11
   $rstufe = $_COOKIE['TPMrstufe'];
12
}
13
 
14
if (isset($unum) && isset($rstufe) && strlen($unum) > 10) {
15
   $unum = substr($unum, 32);
16
   $rstufe = substr($rstufe, 32);
17
}
18
 
19
$title_str = urldecode($title_str);
20
?>
21
<html>
22
<head>
23
	<title><? echo "$title_str $strVersion"; ?></title>
24
	<meta name="Description" content="Project Manager">
29 andreas 25
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 andreas 26
	<META name="Author" content="Andreas Theofilu">
27
	<META name="Publisher" content="Andreas Theofilu = TheoSys">
28
	<META name="Copyright" content="Andreas Theofilu">
29
	<META name="Content-language" content="de">
30
<?php
31
if (isset($header) && $header == 2)
32
	echo "<LINK href=\"pstile.css\" rel=\"stylesheet\" type=\"text/css\">\n";
33
else
34
	echo "<LINK href=\"stile.css\" rel=\"stylesheet\" type=\"text/css\">\n";
35
?>
36
<SCRIPT type="text/javascript">
37
var DocChanged = false;
38
</SCRIPT>
39
<script src="browser.js" type="text/javascript">
40
</script>
41
<SCRIPT type="text/javascript">
42
function Farb(R,G,B) {
43
  var Rx = dx(R);
44
  var Gx = dx(G);
45
  var Bx = dx(B);
46
  var color = Rx+Gx+Bx;
47
  window.opener.document.Task.ta_color.value = color;
48
}
49
document.onkeypress = Tastendruck;
50
</script>
51
</head>
52
<body<? echo "$onLoad"; ?>>
53
<?php
54
if (!isset($header) || $header == 3) {
55
   if ($header != 3 && isset($unum) && $unum > 0 && strlen($unum) < 10) {
56
      $_dbhandle = OpenDB();
57
      $_qs = "select mi_userid, mi_rstufe from mitarbeiter where mi_num = $unum";
58
 
59
      if (!($_res = QueryDB($_dbhandle, $_qs))) {
60
         $uname = GetMessage($_dbhandle, 282, "Unknown!");
61
         $urole = GetMessage($_dbhandle, 283, "N/A");
62
      } else {
63
         $_data = fetchDB($_res, 0);
64
         $uname = $_data[0];
65
         $ur = $_data[1];
66
 
67
         switch ($ur) {
68
            case 0: $urole = GetMessage($_dbhandle, 283, "N/A"); break;
69
            case 1: $urole = GetMessage($_dbhandle, 64, "Administrator"); break;
70
            case 2: $urole = GetMessage($_dbhandle, 65, "Projektleiter"); break;
71
            case 3: $urole = GetMessage($_dbhandle, 66, "Mitarbeiter"); break;
72
            case 4: $urole = GetMessage($_dbhandle, 67, "Kontroller"); break;
73
            case 5: $urole = GetMessage($_dbhandle, 283, "N/A"); break;
74
            case 6: $urole = GetMessage($_dbhandle, 69, "Ressourcenmanager"); break;
75
            default: $urole = GetMessage($_dbhandle, 284, "Error!");
76
         }
77
 
78
         unset($ur);
79
      }
80
 
81
      unset($_res);
82
      unset($_qs);
83
   }
84
?>
85
<div id="menu">
86
<table border=0 cellspacing=0 cellpadding=0 class="header" width="100%">
87
   <tr>
88
      <td class="logo" width="80%">
89
          <table border=0 cellspacing=0 cellpadding=0 width="100%" height="100%">
90
             <tr>
91
                <td><img src="image/logo.png" height="70" width="300" alt="Logo" border=0></td>
92
		<td align="center"><img src="image/theopath.png" height="65" width="300" alt="TheoPlan" border=0></td>
93
	     </tr>
94
	  </table>
95
      </td>
96
<?
97
if ($header != 3 && isset($unum) && $unum > 0 && strlen($unum) < 10) {
98
?>
99
      <td width="20%">
100
         <table border=0 class="logo" width="100%" height="70px" cellpadding=0>
101
            <tr>
102
               <td><? Output($_dbhandle, 285, "Anwender:"); ?></td><td><? echo "$uname"; ?></td>
103
            </tr>
104
            <tr>
105
               <td><? Output($_dbhandle, 286, "Rolle:"); ?></td><td><? echo "$urole"; ?></td>
106
            </tr>
107
            <tr>
108
               <td><? Output($_dbhandle, 287, "Datum:"); ?></td><td><? echo date("d.m.Y H:i", time()); ?></td>
109
            </tr>
110
         </table>
111
<?
112
} else {
113
?>
114
      <td class="logo" width="20%">
115
<?
116
}
117
?>
118
      </td>
119
   </tr>
120
   <tr>
121
      <td class="tabsnb" colspan=2>
122
         <table border=0 cellspacing=0 cellpadding=0>
123
            <tr>
124
<!-- Hier folgt das Menue -->
125
<?php
126
}
127
 
128
function ButtonSubmit($str, $form, $back=false) {
129
?>
130
<table class="button" cellpadding=0 cellspacing=0>
131
   <tr>
132
      <td><img src="nav/button_left.png" height="24px" alt=""></td>
133
      <td class="button">
134
<?
135
	echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:document.$form.submit()\">$str</a>\n";
136
?>
137
      <td><img src="nav/button_right.png" height="24px" alt=""></td>
138
      <td>&nbsp;&nbsp;</td>
139
      <td><img src="nav/button_left.png" height="24px" alt=""></td>
140
      <td class="button">
141
<?
142
	if (!$back) {
143
	   echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:document.$form.reset()\">";
144
	   Output(-1, 288, "Zur&uuml;cksetzen");
145
	   echo "</a>\n";
146
	} else {
147
	   echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:history.back()\">";
148
	   Output(-1, 289, "Abbrechen");
149
	   echo "</a>\n";
150
	}
151
?>
152
      </td>
153
      <td><img src="nav/button_right.png" height="24px" alt=""></td>
154
   </tr>
155
</table>
156
<?
157
}
158
 
159
function ButtonImage($image, $form, $alt="", $hidden="", $value="") {
160
	$str = "<img src=\"image/$image\" border=0 height=16 width=16 alt=\"$alt\">";
161
	echo "<a href=\"#\" onClick=\"javascript:";
162
 
163
	if (strlen($hidden) > 0 && strlen($value) > 0) {
164
	   echo "document.$form.$hidden.value = '$value';";
165
	}
166
 
167
	echo "document.$form.submit()\">$str</a>\n";
168
}
169
 
170
function ButtonImageMove($image, $alt, $prog, $func) {
171
	$str = "<img src=\"image/$image\" border=0 height=16 width=16 alt=\"$alt\">";
172
	echo "<a href=\"#\" onClick=\"javascript:";
173
	echo "MoveTo('$prog','$func')\">$str</a>\n";
174
}
175
 
176
function Button($str, $form, $hidden="", $value="") {
177
?>
178
<table class="button" cellpadding=0 cellspacing=0>
179
   <tr>
180
      <td><img src="nav/button_left.png" height="24px" alt=""></td>
181
      <td class="button">
182
<?
183
	if (strlen($hidden) > 0 && strlen($value) > 0) {
184
	   echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:";
185
	   echo "document.$form.$hidden.value = '$value';document.$form.submit()\"";
186
	   echo ">$str</a>\n";
187
	}
188
	else
189
	echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:document.$form.submit()\">$str</a>\n";
190
?>
191
      </td>
192
      <td><img src="nav/button_right.png" height="24px" alt=""></td>
193
   </tr>
194
</table>
195
<?
196
}
197
 
198
function ButtonProg($str, $prog) {
199
?>
200
<table class="button" cellpadding=0 cellspacing=0>
201
   <tr>
202
      <td><img src="nav/button_left.png" height="24px" alt=""></td>
203
      <td class="button">
204
<?
205
	echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:$prog\">$str</a>\n";
206
?>
207
      </td>
208
      <td><img src="nav/button_right.png" height="24px" alt=""></td>
209
   </tr>
210
</table>
211
<?
212
}
213
 
214
function ButtonLink($text, $prog, $func) {
215
?>
216
<table class="button" cellpadding=0 cellspacing=0>
217
   <tr>
218
      <td><img src="nav/button_left.png" height="24px" alt=""></td>
219
      <td class="button">
220
<?
221
	echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:MoveTo('$prog','$func')\">$text</a>\n";
222
?>
223
      </td>
224
      <td><img src="nav/button_right.png" height="24px" alt=""></td>
225
   </tr>
226
</table>
227
<?
228
}
229
 
230
function ButtonPrint($text, $prog, $func, $wtype=false) {
231
?>
232
<table class="button" cellpadding=0 cellspacing=0>
233
   <tr>
234
      <td><img src="nav/button_left.png" height="24px" alt=""></td>
235
      <td class="button">
236
<?
237
	if (!$wtype)
238
	   $ow = "open_mwindow";
239
	else
240
	   $ow = "open_window";
241
 
242
	echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:$ow('$prog?$func','Drucken',1000,650)\">$text</a>\n";
243
?>
244
      </td>
245
      <td><img src="nav/button_right.png" height="24px" alt=""></td>
246
   </tr>
247
</table>
248
<?
249
}
250
 
251
function ButtonImagePrint($image, $alt, $prog, $func, $width=1000, $height=650, $wtype=false) {
252
	$str = "<img src=\"image/$image\" border=0 height=16 width=16 alt=\"$alt\">";
253
 
254
	if (!$wtype)
255
	   $ow = "open_mwindow";
256
	else
257
	   $ow = "open_window";
258
 
259
	echo "<a href=\"#\" class=\"menu\" onClick=\"javascript:$ow('$prog?$func','$alt',$width,$height)\">$str</a>\n";
260
}
261
?>