| 1 |
lars |
1 |
<?
|
|
|
2 |
require_once "../Online-Shop/connect2.php";
|
|
|
3 |
require_once "../includes/system/getUsers.php";
|
|
|
4 |
|
|
|
5 |
$users=getUsers();
|
|
|
6 |
|
|
|
7 |
if ($_POST)
|
|
|
8 |
{
|
|
|
9 |
if($_POST[users])
|
|
|
10 |
{
|
|
|
11 |
$msg_ID = time();
|
|
|
12 |
foreach($_POST[users] as $user)
|
|
|
13 |
{
|
|
|
14 |
$query = "
|
|
|
15 |
insert into
|
|
|
16 |
systemtermine
|
|
|
17 |
(
|
|
|
18 |
msg_ID,
|
|
|
19 |
faelligkeit,
|
|
|
20 |
prioritaet,
|
|
|
21 |
zielgruppe,
|
|
|
22 |
ueberschrift,
|
|
|
23 |
nachricht,
|
|
|
24 |
CMS_Access_ID,
|
|
|
25 |
deeplink,
|
|
|
26 |
erstellt_am,
|
|
|
27 |
erstellt_von,
|
|
|
28 |
letzte_Aenderung_am,
|
|
|
29 |
letzte_Aenderung_von
|
|
|
30 |
)
|
|
|
31 |
values
|
|
|
32 |
(
|
|
|
33 |
'".$msg_ID."',
|
|
|
34 |
'".$_POST[faelligkeit]."',
|
|
|
35 |
'".$_POST[prioritaet]."',
|
|
|
36 |
'".$user."',
|
|
|
37 |
'".$_POST[ueberschrift]."',
|
|
|
38 |
'".$_POST[nachricht]."',
|
|
|
39 |
'".$_POST[CMS_Access_ID]."',
|
|
|
40 |
'".$_POST[deeplink]."',
|
|
|
41 |
NOW(),
|
|
|
42 |
'".$PHP_AUTH_USER."',
|
|
|
43 |
NOW(),
|
|
|
44 |
'".$PHP_AUTH_USER."'
|
|
|
45 |
)
|
|
|
46 |
";
|
|
|
47 |
$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error());
|
|
|
48 |
}
|
|
|
49 |
?><script language="JavaScript">window.close();</script><?
|
|
|
50 |
}
|
|
|
51 |
else
|
|
|
52 |
{
|
|
|
53 |
$errorMSG = "Bitte Addressaten angeben!";
|
|
|
54 |
}
|
|
|
55 |
}
|
|
|
56 |
?>
|
|
|
57 |
<html>
|
|
|
58 |
<head>
|
|
|
59 |
<title>Systemnachricht erstellen</title>
|
|
|
60 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
61 |
<script language="JavaScript" src="../checkDate.js"></script>
|
|
|
62 |
<script language="JavaScript">
|
|
|
63 |
<!--
|
|
|
64 |
function checkAllUsers()
|
|
|
65 |
{
|
|
|
66 |
with (document.forms[0]) {
|
|
|
67 |
for (i=0; i < elements.length; i++) {
|
|
|
68 |
if (elements[i].type == "checkbox") {
|
|
|
69 |
elements[i].checked=true;
|
|
|
70 |
}
|
|
|
71 |
}
|
|
|
72 |
}
|
|
|
73 |
}
|
|
|
74 |
|
|
|
75 |
function revertSelection()
|
|
|
76 |
{
|
|
|
77 |
with (document.forms[0]) {
|
|
|
78 |
for (i=0; i < elements.length; i++) {
|
|
|
79 |
if (elements[i].type == "checkbox") {
|
|
|
80 |
elements[i].checked = 1 ^ elements[i].checked;
|
|
|
81 |
}
|
|
|
82 |
}
|
|
|
83 |
}
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
function checkDeeplink()
|
|
|
87 |
{
|
|
|
88 |
with (document.forms[0].elements["deeplink"]) {
|
|
|
89 |
if (value == "") { value = opener.location.href; }
|
|
|
90 |
}
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
function MM_findObj(n, d) { //v4.01
|
|
|
94 |
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
|
|
|
95 |
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
|
|
|
96 |
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
|
|
|
97 |
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
|
|
|
98 |
if(!x && d.getElementById) x=d.getElementById(n); return x;
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
|
|
|
102 |
var obj = MM_findObj(objName); if (obj) obj.value += newText;
|
|
|
103 |
}
|
|
|
104 |
//-->
|
|
|
105 |
</script>
|
|
|
106 |
<style>
|
|
|
107 |
body
|
|
|
108 |
{
|
|
|
109 |
margin:10px;
|
|
|
110 |
background-color: #<?=$webs[bgcolor_seite];?>;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
.links
|
|
|
114 |
{
|
|
|
115 |
background-color: #<?=$webs[bgcolor_links];?>;
|
|
|
116 |
color: #<?=$webs[font_color_links];?>;
|
|
|
117 |
font-family: Arial, Helvetica, sans-serif;
|
|
|
118 |
font-weight: bold;
|
|
|
119 |
font-size: 12px
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
.rechts
|
|
|
123 |
{
|
|
|
124 |
background-color: #<?=$webs[bgcolor_rechts];?>;
|
|
|
125 |
color: #<?=$webs[font_color_rechts];?>;
|
|
|
126 |
font-family: Arial, Helvetica, sans-serif;
|
|
|
127 |
font-size: 12px
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
.errorMSG
|
|
|
131 |
{
|
|
|
132 |
background-color: #FFFFFF;
|
|
|
133 |
color: #FF0000;
|
|
|
134 |
font-family: Arial, Helvetica, sans-serif;
|
|
|
135 |
font-weight: bold;
|
|
|
136 |
font-size: 12px
|
|
|
137 |
|
|
|
138 |
}
|
|
|
139 |
</style>
|
|
|
140 |
</head>
|
|
|
141 |
|
|
|
142 |
<body onLoad="checkDeeplink()">
|
|
|
143 |
<form action="<?=$self;?>" method=POST>
|
|
|
144 |
<table border="1" cellspacing="0" cellpadding="2" align="center">
|
|
|
145 |
<tr>
|
|
|
146 |
<td colspan="4" class="links">
|
|
|
147 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
148 |
<tr>
|
|
|
149 |
<td class="links">Nachricht erstellen: </td>
|
|
|
150 |
<td align="right"><span class=errorMSG><?=$errorMSG;?></span></td>
|
|
|
151 |
</tr>
|
|
|
152 |
</table>
|
|
|
153 |
<span class=errorMSG> </span></td>
|
|
|
154 |
<td class="links">
|
|
|
155 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
156 |
<tr>
|
|
|
157 |
<td class="links">An: </td>
|
|
|
158 |
<td align="right" class="links" nowrap="nowrap">
|
|
|
159 |
<input type="button" value="Alle" onClick="checkAllUsers()">
|
|
|
160 |
<input type="button" value="Auswahl umkehren" onClick="revertSelection()">
|
|
|
161 |
</td>
|
|
|
162 |
</tr>
|
|
|
163 |
</table>
|
|
|
164 |
</td>
|
|
|
165 |
</tr>
|
|
|
166 |
<tr>
|
|
|
167 |
<td class="links">Fällig: </td>
|
|
|
168 |
<td class="rechts">
|
|
|
169 |
<input type="text" name="faelligkeit" value="<?=$_POST[faelligkeit];?>" onFocus="if (this.value=='') {this.value=now('09:00:00')};this.select();">
|
|
|
170 |
</td>
|
|
|
171 |
<td class="links">Priorität: </td>
|
|
|
172 |
<td class="rechts" align="center">
|
|
|
173 |
<select name="prioritaet">
|
|
|
174 |
<? foreach (array("A","B","C") as $nr => $option) { ?>
|
|
|
175 |
<option value=<?=$nr; if (($_POST[prioritaet] == $nr) or ((!$_POST[prioritaet]) and ($nr==1))) {echo " selected";} ?>><?=$option?></option>
|
|
|
176 |
<? } ?>
|
|
|
177 |
</select>
|
|
|
178 |
</td>
|
|
|
179 |
<td rowspan="5" valign="top" class="rechts">
|
|
|
180 |
<?
|
|
|
181 |
foreach($users as $ID => $user)
|
|
|
182 |
{
|
|
|
183 |
?>
|
|
|
184 |
<input type="checkbox" name="users[]" value="<?=$ID;?>" <? if (array_search($PHP_AUTH_USER, $users) == $ID) { echo " checked"; } ?>>
|
|
|
185 |
<?=$user;?>
|
|
|
186 |
<br>
|
|
|
187 |
<?
|
|
|
188 |
}
|
|
|
189 |
?>
|
|
|
190 |
</td>
|
|
|
191 |
</tr>
|
|
|
192 |
<tr>
|
|
|
193 |
<td class="links">Überschrift: </td>
|
|
|
194 |
<td colspan="3" class="rechts">
|
|
|
195 |
<input type="text" name="ueberschrift" value="<?=$_REQUEST[ueberschrift];?>" style="width:100%">
|
|
|
196 |
</td>
|
|
|
197 |
</tr>
|
|
|
198 |
<tr>
|
|
|
199 |
<td valign="top" class="links">Nachricht: <br>
|
|
|
200 |
<?
|
|
|
201 |
$query="select * from web_settings where shops_ID = 1 and ID > 249 and ID < 300 order by Rang";
|
|
|
202 |
$result = mysql_query ($query) or mail("admin@weban.de","Fehler in bestell_mail_variablen.php","Benutzer: ".$PHP_AUTH_USER."\n".mysql_errno().": ".mysql_error()."<hr>$query<hr>","from: content-management");
|
|
|
203 |
while($zeile=mysql_fetch_assoc($result))
|
|
|
204 |
{ ?>
|
|
|
205 |
<a class="links" href="#" onClick="MM_setTextOfTextfield('nachricht','','<?=$zeile[Inhalt];?> (<?=$PHP_AUTH_USER?>)\n')"><?=$zeile[Name];?></a><br>
|
|
|
206 |
<? }
|
|
|
207 |
?>
|
|
|
208 |
</td>
|
|
|
209 |
<td colspan="3" class="rechts" valign="top">
|
|
|
210 |
<textarea name="nachricht" rows="15" cols="55"><?=$_POST[nachricht];?></textarea>
|
|
|
211 |
</td>
|
|
|
212 |
</tr>
|
|
|
213 |
<tr>
|
|
|
214 |
<td class="links">Deeplink:</td>
|
|
|
215 |
<td align="right" colspan="3" class="links">
|
|
|
216 |
<input type="text" name="deeplink" value="<?=$_POST[deeplink];?>" style="width:100%">
|
|
|
217 |
</td>
|
|
|
218 |
</tr>
|
|
|
219 |
<tr>
|
|
|
220 |
<td align="right" colspan="4" class="links">
|
|
|
221 |
<input type="hidden" name="CMS_Access_ID" value="<?=array_search($PHP_AUTH_USER, $users);?>">
|
|
|
222 |
<input type="submit" name="Abschicken" value="Abschicken">
|
|
|
223 |
<input type="reset" name="Zurücksetzen" value="Zurücksetzen">
|
|
|
224 |
</td>
|
|
|
225 |
</tr>
|
|
|
226 |
</table>
|
|
|
227 |
</form>
|
|
|
228 |
</body>
|
|
|
229 |
</html>
|