Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
	//$Id$
3
	require_once "connect2.php";
4
 
5
	/* ---------------------------------------------------------------------------------------------------------------- */
6
	/* INIT 																											*/
7
	/* ---------------------------------------------------------------------------------------------------------------- */
8
	// Session einleiten
9
	session_start();
10
 
11
	$mode= (isset($_POST["mode"]))? $_POST["mode"] : "";
12
?>
13
<html>
14
<head>
15
<title><? echo $webs[kunde_bezeichnung] ?>: Redaktionssystem</title>
16
<meta http-equiv="Content-Type" content="text/html; charset=<? echo $charset ?>">
17
<style type="text/css">
18
body
19
{
20
	font-family: Arial, Helvetica, sans-serif; font-size: 10pt;
21
<? if ($webs[font_color_seite])		{ ?>color:				#<? echo $webs[font_color_seite] ?>;<? } ?>
22
<? if ($webs[bgcolor_seite])		{ ?>background-color:	#<? echo $webs[bgcolor_seite] ?>;<? } ?>
23
<? if ($webs[hintergrundbild]) 		{ ?>background-image: url(../images/hintergrundbild/<? echo $webs[hintergrundbild] ?>);<? } ?>
24
}
25
 
26
th, .links
27
{
28
font-size: 10pt;
29
<? if ($webs[font_color_links])		{ ?>color:				#<? echo $webs[font_color_links] ?>;<? } ?>
30
<? if ($webs[bgcolor_links])		{ ?>background-color:	#<? echo $webs[bgcolor_links] ?>;<? } ?>
31
}
32
 
33
.td1, .rechts
34
{
35
font-size: 10pt;
36
<? if ($webs[font_color_rechts])	{ ?>color:				#<? echo $webs[font_color_rechts] ?>;<? } ?>
37
<? if ($webs[bgcolor_rechts])		{ ?>background-color:	#<? echo $webs[bgcolor_rechts] ?>;<? } ?>
38
}
39
.td0
40
{
41
font-size: 10pt;
42
<? if ($webs[font_color_rechts])	{ ?>background-color:				#<? echo $webs[font_color_rechts] ?>;<? } ?>
43
<? if ($webs[bgcolor_rechts])		{ ?>color:	#<? echo $webs[bgcolor_rechts] ?>;<? } ?>
44
}
45
 
46
A:link {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
47
A:visited {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
48
A:active {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
49
A:hover {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
50
table.input
51
{
52
	border-width: 2px 1px 1px 2px;
53
	border-top-color    : #CCCCCC;
54
	border-left-color   : #CCCCCC;
55
	border-bottom-color : #AAAAAA;
56
	border-right-color  : #AAAAAA;
57
	border-style		:inset;
58
	background-color	: #FFFFFF;
59
}
60
form {
61
	display:inline;
62
}
63
</style>
64
</head>
65
<body>
66
<?
67
	$mode= (isset($_POST["mode"])) ? $_POST["mode"] : "";
68
	$id= (isset($_POST["ID"])) ? $_POST["ID"] : 0;
69
	$id=intval($id);
70
	switch($mode)
71
	{
72
		case "edit_w":
73
			$sql=
74
			break;
75
		case "new_w":
76
			break;
77
		case "save_w":
78
			break;
79
		case "update_w":
80
			break;
81
		case "edit_b":
82
			break;
83
		case "new_b":
84
			break;
85
		case "save_b":
86
			break;
87
		case "update_b":
88
			break;
89
		default:
90
			$sql="SELECT ID, word, acronyms_desc from akronyms";
91
			$res=mysql_query($sql);
92
			if(!$res)
93
			{
94
				mail("tiefland@weban.de","Fehler beim Lesen der Akronyms",mysql_error()."\n$sql\n","FROM: tiefland@weban.de","-F tiefland@weban.de");
95
			}
96
			else
97
			{
98
			?>
99
				<table width="100%">
100
					<tr>
101
						<th colspan="2">Aktionen</th>
102
					</tr>
103
					<tr>
104
						<td class="td1" align="center">
105
							<form action="" method="post">
106
								<input type="hidden" name="ID" value="<?=$row["ID"];?>">
107
								<input type="hidden" name="mode" value="new_w">
108
								<input type="submit" value="neues Wort">
109
							</form>
110
						</td>
111
						<td class="td1" align="center">
112
							<form action="" method="post">
113
								<input type="hidden" name="ID" value="<?=$row["ID"];?>">
114
								<input type="hidden" name="mode" value="new_b">
115
								<input type="submit" value="neue Beschreibung">
116
							</form>
117
						</td>
118
					</tr>
119
				</table>
120
				<br><br>
121
				<table width="100%">
122
					<tr>
123
						<th>Akronym</th>
124
						<th width="65%">Beschreibung</th>
125
						<th width="20%">Aktionen</th>
126
					</tr>
127
			<?php
128
				while($row=mysql_fetch_assoc($res))
129
				{
130
					$sql2="SELECT a_desc FROM akronyms_desc WHERE ID=".$row["acronyms_desc"];
131
					$res2=mysql_query($sql2);
132
					if(!$res2)
133
					{
134
						mail("tiefland@weban.de","Fehler beim Lesen der Akronyms",mysql_error()."\n$sql2\n","FROM: tiefland@weban.de","-F tiefland@weban.de");
135
					}
136
					else
137
					{
138
						$row2=mysql_fetch_assoc($res2);
139
				?>
140
					<tr>
141
						<td class="td<?=$row["ID"]%2;?>"><?=$row["word"];?></td>
142
						<td class="td<?=$row["ID"]%2;?>"><?=$row2["a_desc"];?></td>
143
						<td class="td<?=$row["ID"]%2;?>">
144
							<form action="" method="post">
145
								<input type="hidden" name="ID" value="<?=$row["ID"];?>">
146
								<input type="hidden" name="mode" value="edit_w">
147
								<input type="submit" value="Wort ändern">
148
							</form>
149
							<form action="" method="post">
150
								<input type="hidden" name="ID" value="<?=$row["ID"];?>">
151
								<input type="hidden" name="mode" value="edit_b">
152
								<input type="submit" value="Beschreibung ändern">
153
							</form>
154
						</td>
155
					</tr>
156
				<?php
157
					}
158
				}
159
				?>
160
				</table>
161
				<?php
162
			}
163
			break;
164
	}
165
?>
166
</body>
167
</html>