Subversion Repositories public

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 andreas 1
<?php
2
require_once('version.inc');
3
require_once('dbaccess.inc');
4
require_once('language.inc');
5
require_once('settings.inc');
6
 
7
$unum = $_COOKIE['TPMunum'];
8
$rstufe = $_COOKIE['TPMrstufe'];
9
$proto = $_SERVER['HTTPS'];
10
$location = $_SERVER['REQUEST_URI'];
11
$host = $_SERVER['HTTP_HOST'];
12
 
13
if ($proto != "on") {	// HTTPS protocol?
14
?>
15
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
16
   "http://www.w3.org/TR/html4/loose.dtd">
17
<html>
18
<head>
19
	<title><? echo "$title_str $strVersion"; ?></title>
20
	<meta name="Description" content="Project Manager">
21
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
22
	<META name="Author" content="Andreas Theofilu">
23
	<META name="Publisher" content="Andreas Theofilu = Theos Soft">
24
	<META name="Copyright" content="Andreas Theofilu">
25
	<META name="Content-language" content="de">
26
	<META http-equiv="refresh" content="1; URL=https://<? echo $host . $location; ?>">
27
</head>
28
<body>
29
<center>
30
<h2><? Output(-1, 218, "Klicken Sie"); ?> <a href="https://<? echo $host . $location; ?>"><? Output(-1, 219, "hier"); ?></a>,
31
<? Output(-1, 220, "falls die Seite nicht automatisch neu geladen wird."); ?></h2>
32
</body>
33
</html>
34
<?php
35
   exit;
36
}
37
 
38
if (isset($unum) || isset($rstufe)) {
39
   setcookie("TPMunum", "", time() - 3600);
40
   setcookie("TPMrstufe", "", time() - 3600);
41
}
42
 
43
require_once('header.inc');
44
 
45
if ($header == 3)
46
   Journal(401, "index.php: User: $unum");
47
 
48
function FormInitDB() {
49
?>
50
<form action="initdb.php" method="post">
51
   <input type="hidden" name="func" value="FormInitDB">
52
   <input type="hidden" name="headline" value="2">
53
   <input type="hidden" name="login" value="1">
54
<table class="input">
55
   <tr>
56
      <th colspan=2 class="sel"><? Output(-1, 221, "Datenbank"); ?></th>
57
   </tr>
58
   <tr>
59
      <td><? Output(-1, 222, "Datenbankname:"); ?></td>
60
      <td><input type="text" name="dbname" value="pm" size=16 maxlength=16></td>
61
   </tr>
62
   <tr>
63
      <td><? Output(-1, 223, "Domainname:"); ?></td>
64
      <td><input type="text" name="domain" value="localhost" size=30 maxlength=80></td>
65
   </tr>
66
   <tr>
67
      <th colspan=2 class="sel"><? Output(-1, 91, "Einstellungen f&uuml;r die Planung"); ?></th>
68
   </tr>
69
   <tr>
70
      <td><? Output(-1, 92, "L&auml;nge einer Periode:"); ?></td>
71
      <td><select name="periode">
72
             <option value="1"><? Output(-1, 93, "Jahr"); ?></option>
73
	     <option value="2"><? Output(-1, 94, "Quartal"); ?></option>
74
	     <option value="3" selected><? Output(-1, 95, "Monat"); ?></option>
75
	     <option value="4"><? Output(-1, 97, "Tag"); ?></option>
76
	  </select>
77
      </td>
78
   </tr>
79
   <tr>
80
      <td><? Output(-1, 98, "Verteilung der Auw&auml;nde:"); ?></td>
81
      <td><select name="verteil">
82
             <option value="1"><? Output(-1, 99, "Normalverteilung"); ?></option>
83
	     <option value="2"><? Output(-1, 100, "Endlastig"); ?></option>
84
	     <option value="3"><? Output(-1, 101, "Anfangslastig"); ?></option>
85
	     <option value="4"><? Output(-1, 102, "Anfang&minus; und Endlasig"); ?></option>
86
	     <option value="5"><? Output(-1, 103, "Mittellastig"); ?></option>
87
	     <option value="6" selected><? Output(-1, 104, "Individuell"); ?></option>
88
	  </select>
89
      </td>
90
   </tr>
91
   <tr>
92
      <td><? Output(-1, 105, "Gr&ouml;&szlig;e einer Arbeitseiheit:"); ?></td>
93
      <td><select name="einheit">
94
             <option value="1"><? Output(-1, 106, "Stunde"); ?></option>
95
	     <option value="2" selected><? Output(-1, 107, "Tag"); ?></option>
96
	     <option value="3"><? Output(-1, 108, "Woche"); ?></option>
97
	     <option value="4"><? Output(-1, 109, "Monat"); ?></option>
98
	     <option value="5"><? Output(-1, 111, "Jahr"); ?></option>
99
	  </select>
100
      </td>
101
   </tr>
102
   <tr>
103
      <td><? Output(-1, 112, "L&auml;nge einer Arbeitseinh. in Stunden:"); ?></td>
104
      <td><input type="text" name="leneinheit" value="8" size=5 maxlength=5>
105
   </tr>
106
   <tr>
107
      <td><? Output(-1, 113, "Projektphasen verwenden?"); ?></td>
108
      <td><input type="checkbox" name="phase" value="1" checked>
109
   </tr>
110
   <tr>
111
      <td><? Output(-1, 114, "Tasks nach Phasen nummerieren?"); ?></td>
112
      <td><input type="checkbox" name="numphase" value="1" checked>
113
   </tr>
114
   <tr>
115
      <td><? Output(-1, 115, "Datumsformat:"); ?></td>
116
      <td><select name="dtformatshort">
117
             <option value="d.m.Y" <? if ($dtformatshort == "d.m.Y") echo "selected"; ?>>TT.MM.JJJJ</option>
118
	     <option value="d.m.y" <? if ($dtformatshort == "d.m.y") echo "selected"; ?>>TT.MM.JJ</option>
119
	     <option value="j.n.Y" <? if ($dtformatshort == "j.n.Y") echo "selected"; ?>>T.M.JJJJ</option>
120
	     <option value="j.n.y" <? if ($dtformatshort == "j.n.y") echo "selected"; ?>>T.M.JJ</option>
121
	     <option value="m/d/Y" <? if ($dtformatshort == "m/d/Y") echo "selected"; ?>>MM/DD/YYYY</option>
122
	     <option value="m/d/y" <? if ($dtformatshort == "m/d/y") echo "selected"; ?>>MM/DD/YY</option>
123
	     <option value="Y-m-d" <? if ($dtformatshort == "Y-m-d") echo "selected"; ?>>YYYY-MM-DD</option>
124
	  </select>
125
      </td>
126
   </tr>
127
   <tr>
128
      <td><? Output(-1, 116, "Periodensicht:"); ?></td>
129
      <td><input type="checkbox" name="pmlight" value="1" <? if (isset($pmlight) && $pmlight) echo "checked"; ?>></td>
130
   </td>
131
   <tr>
132
      <td><? Output(-1, 117, "Mitarbeiterrolle in Plan:"); ?></td>
133
      <td><input type="checkbox" name="role" value="1" <? if (isset($role) && $role) echo "checked"; ?>></td>
134
   </tr>
135
   <tr>
136
      <th colspan=2 class="sel"><? Output(-1, 224, "Verwaltungsanwender definieren"); ?></th>
137
   </tr>
138
   <tr>
139
      <td><? Output(-1, 225, "Superuser:"); ?></td>
140
      <td><input type="text" name="suser" value="root" size=8 maxlength=8></td>
141
   </tr>
142
   <tr>
143
      <td><? Output(-1, 226, "Passwort:"); ?></td>
144
      <td><input type="password" name="pass1" size=8 maxlength=8></td>
145
   </tr>
146
   <tr>
147
      <td><? Output(-1, 227, "Passwort Vergleich:"); ?></td>
148
      <td><input type="password" name="pass2" size=8 maxlength=8></td>
149
   </tr>
150
</table>
151
<br>
152
<input type="submit" value="<? Output(-1, 217, "Weiter -->"); ?>"> <input type="reset">
153
</form>
154
<?php
155
}
156
 
157
# Wir pruefen zunaechst ob es eine Datei gibt, welche die Grunddaten enthaelt,
158
# die wir zum Betrieb benoetigen. Falls nicht, handelt es sich um den ersten
159
# Aufruf und wir muessen die Datenbank zunaechst einrichten. Klappt das, sind
160
# wir im Geschaeft :-).
161
 
162
if (!file_exists("setup/setup.dat")) {
163
   FormInitDB();
164
   require('footer.inc');
165
   exit;
166
}
167
 
168
if (!file_exists("setup/pmkey.pem") || !file_exists("setup/pmkey.xpem")) {
169
   require_once('crypt.inc');
170
   CreateCryptKey();
171
}
172
 
173
$ini_array = parse_ini_file("setup/setup.dat");
174
$dbname = $ini_array['dbname'];
175
$domain = $ini_array['domain'];
176
$suser = $ini_array['suser'];
177
$password = $ini_array['password'];
178
$headline = 1;
179
$login = 1;
180
 
181
require_once('menu.inc');
182
?>
183
<form name="login" action="login.php" method="post" onkeypress="javascript:AktDocument = this">
184
<input type="hidden" name="headline" value="1">
185
<table class="input">
186
   <tr>
187
      <th class="sel" colspan=2><? Output(-1, 228, "Zugangsdaten"); ?></th>
188
   </tr>
189
   <tr>
190
      <td><? Output(-1, 229, "Benutzername:"); ?></td>
191
      <td><input type="text" class="inputmust" name="user" size=8 maxlength=8></td>
192
   </tr>
193
   <tr>
194
      <td><? Output(-1, 226, "Passwort:"); ?></td>
195
      <td><input type="password" class="inputmust" name="pass" size=8 maxlength=8></td>
196
   </tr>
197
</table>
198
<table class="indent"><tr><td>
199
<?
200
Button(GetMessage(-1, 230, "Login"), "login");
201
?>
202
</td></tr></table>
203
</form>
204
<?php
205
 
206
require('footer.inc');
207
?>