| 1 |
lars |
1 |
<?
|
|
|
2 |
require_once "connect2.php";
|
|
|
3 |
session_start();
|
|
|
4 |
if ( !$language )
|
|
|
5 |
{
|
|
|
6 |
$language = "DE";
|
|
|
7 |
}
|
|
|
8 |
|
|
|
9 |
// SEBASTIAN
|
|
|
10 |
// verwendungsfilter
|
|
|
11 |
if ( isset( $_GET[modul] ) )
|
|
|
12 |
{
|
|
|
13 |
$_SESSION[$self][verwendung] = "$_GET[modul]";
|
|
|
14 |
}
|
|
|
15 |
// prüfen, ob die spalte verwendung existiert
|
|
|
16 |
if ( !isset( $_SESSION[$self][spalte_verwendung_existiert] ) )
|
|
|
17 |
{
|
|
|
18 |
$query = "show columns from Features like 'verwendung'";
|
|
|
19 |
$result = mysql_query( $query ) or die( mysql_errno() . ": " .
|
|
|
20 |
mysql_error() . "<hr>" . $query . "<hr>" );
|
|
|
21 |
$_SESSION[$self][spalte_verwendung_existiert] = ( mysql_num_rows( $result ) >
|
|
|
22 |
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
if ( $delete )
|
|
|
27 |
{
|
|
|
28 |
$query = "delete from Feature_to_Ware where ID = $LinkID";
|
|
|
29 |
// SEBASTIAN
|
|
|
30 |
if ( $_SESSION[$self][verwendung] == "Branchenbuch" )
|
|
|
31 |
{
|
|
|
32 |
$query = "delete from Feature_to_Firma where ID = $LinkID";
|
|
|
33 |
}
|
|
|
34 |
$result = mysql_query( $query ) or die( mysql_errno() . ": " .
|
|
|
35 |
mysql_error() . "<hr>" . $query2 );
|
|
|
36 |
?>
|
|
|
37 |
<script language=javascript>
|
|
|
38 |
parent.Features.location.href='Features_blank.php';
|
|
|
39 |
</script>
|
|
|
40 |
<?
|
|
|
41 |
}
|
|
|
42 |
if ( $insert )
|
|
|
43 |
{
|
|
|
44 |
$query = "insert into Feature_to_Ware (Ware,Feature) Values ($ID,$Feature)";
|
|
|
45 |
// SEBASTIAN
|
|
|
46 |
if ( $_SESSION[$self][verwendung] == "Branchenbuch" )
|
|
|
47 |
{
|
|
|
48 |
$query = "insert into Feature_to_Firma (Firma,Feature) Values ($ID,$Feature)";
|
|
|
49 |
}
|
|
|
50 |
$result = mysql_query( $query ) or die( mysql_errno() . ": " .
|
|
|
51 |
mysql_error() . "<hr>" . $query );
|
|
|
52 |
?>
|
|
|
53 |
<script language=javascript>
|
|
|
54 |
parent.Features.location.href='Feature_control.php?
|
|
|
55 |
<? if ( isset( $_SESSION[$self][verwendung] ) )
|
|
|
56 |
{
|
|
|
57 |
echo "modul=" . $_SESSION[$self][verwendung] . "&";
|
|
|
58 |
}
|
|
|
59 |
?>
|
|
|
60 |
ID=<? echo $ID
|
|
|
61 |
?>&Feature=<? echo $Feature
|
|
|
62 |
?>&bit=';
|
|
|
63 |
</script>
|
|
|
64 |
<?
|
|
|
65 |
|
|
|
66 |
}
|
|
|
67 |
?>
|
|
|
68 |
<html>
|
|
|
69 |
<head>
|
|
|
70 |
<title>Plümacher: Redaktionssystem</title>
|
|
|
71 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
72 |
<meta name="author" content="Webagentur Niewerth - www.weban.de">
|
|
|
73 |
<meta name="revisit-after" content="30 days">
|
|
|
74 |
<meta name="language" content="deutsch, de">
|
|
|
75 |
<meta name="distribution" content="global">
|
|
|
76 |
<meta name="robots" content="all">
|
|
|
77 |
<link rel=stylesheet type="text/css" href="redaktion.css">
|
|
|
78 |
</head>
|
|
|
79 |
|
|
|
80 |
<body bgcolor="#<? echo $webs[bgcolor_rechts]
|
|
|
81 |
?>" text="#<? echo $webs[font_color_rechts]
|
|
|
82 |
?>" leftmargin="0" topmargin="0" link="#0000FF" vlink="#0000FF" alink="#0000FF">
|
|
|
83 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
84 |
<?
|
|
|
85 |
$query = "SELECT * FROM Features where Language = '$language'";
|
|
|
86 |
// SEBASTIAN
|
|
|
87 |
if ( $_SESSION[$self][spalte_verwendung_existiert] )
|
|
|
88 |
{
|
|
|
89 |
$query .= " and verwendung = '" . $_SESSION[$self][verwendung] . "'";
|
|
|
90 |
}
|
|
|
91 |
$result = mysql_query( $query ) or die( mysql_errno() . ": " .
|
|
|
92 |
mysql_error() . "<hr>" . $query );
|
|
|
93 |
while ( $zeile = mysql_fetch_array( $result ) )
|
|
|
94 |
{
|
|
|
95 |
unset( $zeile2 );
|
|
|
96 |
$query2 = "SELECT * FROM Feature_to_Ware where Ware=$ID and Feature=$zeile[ID]";
|
|
|
97 |
// SEBASTIAN
|
|
|
98 |
if ( $_SESSION[$self][verwendung] == "Branchenbuch" )
|
|
|
99 |
{
|
|
|
100 |
$query2 = "SELECT * FROM Feature_to_Firma where Firma=$ID and Feature=$zeile[ID]";
|
|
|
101 |
}
|
|
|
102 |
$result2 = mysql_query( $query2 ) or die( mysql_errno() . ": " .
|
|
|
103 |
mysql_error() . "<hr>" . $query2 );
|
|
|
104 |
$zeile2 = mysql_fetch_array( $result2 );
|
|
|
105 |
?>
|
|
|
106 |
<tr>
|
|
|
107 |
<td align="center" valign="middle">
|
|
|
108 |
<a name="Option_<?php echo $zeile[ID]
|
|
|
109 |
?>">
|
|
|
110 |
<input type="checkbox" onClick="this.blur();this.focus();" onChange="location.href='<? echo
|
|
|
111 |
$self
|
|
|
112 |
?>?<? if ( isset
|
|
|
113 |
( $_SESSION[$self][verwendung] ) )
|
|
|
114 |
{
|
|
|
115 |
echo "modul=" . $_SESSION[$self][verwendung] . "&";
|
|
|
116 |
}
|
|
|
117 |
?>ID=<? echo
|
|
|
118 |
$ID
|
|
|
119 |
?>&Feature=<? echo
|
|
|
120 |
$zeile[ID]
|
|
|
121 |
?>&<? if ( $zeile2 )
|
|
|
122 |
{
|
|
|
123 |
echo "delete=true";
|
|
|
124 |
}
|
|
|
125 |
else
|
|
|
126 |
{
|
|
|
127 |
echo "insert=true";
|
|
|
128 |
}
|
|
|
129 |
?>&LinkID=<? echo
|
|
|
130 |
$zeile2[ID]
|
|
|
131 |
?>#Option_<? echo
|
|
|
132 |
$zeile[ID]
|
|
|
133 |
?>'" <? if ( mysql_num_rows
|
|
|
134 |
( $result2 ) > 0 )
|
|
|
135 |
{
|
|
|
136 |
echo " checked";
|
|
|
137 |
}
|
|
|
138 |
?>>
|
|
|
139 |
</td>
|
|
|
140 |
<td width="100%">
|
|
|
141 |
<a href="Feature_control.php?<? if ( isset( $_SESSION[$self][verwendung] ) )
|
|
|
142 |
{
|
|
|
143 |
echo "modul=" . $_SESSION[$self][verwendung] . "&";
|
|
|
144 |
}
|
|
|
145 |
?>ID=<? echo
|
|
|
146 |
$ID
|
|
|
147 |
?>&Feature=<? echo
|
|
|
148 |
$zeile[ID]
|
|
|
149 |
?>&bit=<? echo
|
|
|
150 |
$zeile2[Feature_options]
|
|
|
151 |
?>" target="Features"><? echo
|
|
|
152 |
$zeile[Name]
|
|
|
153 |
?></a>
|
|
|
154 |
</td>
|
|
|
155 |
</tr>
|
|
|
156 |
<?
|
|
|
157 |
}
|
|
|
158 |
?>
|
|
|
159 |
</table>
|
|
|
160 |
<br>
|
|
|
161 |
<a href="options_copy.php?ID=<? echo $_GET['ID']
|
|
|
162 |
?>" target="Features">Optionen Kopieren</a> <a href="#" onClick="javascript:window.open('options_copy.php?ID=<? echo
|
|
|
163 |
$_GET['ID']
|
|
|
164 |
?>', 'FeatureCopy', 'width=300,height=200,scrollbars=yes'); return false;">nach</a>...
|
|
|
165 |
</body>
|
|
|
166 |
</html>
|
|
|
167 |
|