Merge lp:~dangarner/xibo/396735 into lp:~xibo-maintainers/xibo/encke
- 396735
- Merge into encke
Proposed by
Dan Garner
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~dangarner/xibo/396735 |
Merge into: | lp:~xibo-maintainers/xibo/encke |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~dangarner/xibo/396735 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xibo Maintainters | Pending | ||
Review via email: mp+8783@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2009-03-07 23:21:15 +0000 | |||
3 | +++ .bzrignore 2009-06-20 10:05:53 +0000 | |||
4 | @@ -1,3 +1,4 @@ | |||
5 | 1 | server/settings.php | 1 | server/settings.php |
6 | 2 | .project | 2 | .project |
7 | 3 | server/.project | 3 | server/.project |
8 | 4 | Thumbs.db | ||
9 | 4 | 5 | ||
10 | === modified file 'client/dotNET/Region.cs' | |||
11 | --- client/dotNET/Region.cs 2009-03-08 11:40:17 +0000 | |||
12 | +++ client/dotNET/Region.cs 2009-06-20 10:05:53 +0000 | |||
13 | @@ -124,6 +124,10 @@ | |||
14 | 124 | media = new Rss(options); | 124 | media = new Rss(options); |
15 | 125 | break; | 125 | break; |
16 | 126 | 126 | ||
17 | 127 | case "embedded": | ||
18 | 128 | media = new Text(options); | ||
19 | 129 | break; | ||
20 | 130 | |||
21 | 127 | default: | 131 | default: |
22 | 128 | //do nothing | 132 | //do nothing |
23 | 129 | SetNextMediaNode(); | 133 | SetNextMediaNode(); |
24 | @@ -197,7 +201,10 @@ | |||
25 | 197 | options.text = ""; | 201 | options.text = ""; |
26 | 198 | options.documentTemplate = ""; | 202 | options.documentTemplate = ""; |
27 | 199 | options.copyrightNotice = ""; | 203 | options.copyrightNotice = ""; |
28 | 204 | options.scrollSpeed = 1; | ||
29 | 205 | options.updateInterval = 6; | ||
30 | 200 | options.uri = ""; | 206 | options.uri = ""; |
31 | 207 | options.direction = "none"; | ||
32 | 201 | 208 | ||
33 | 202 | // Get a media node | 209 | // Get a media node |
34 | 203 | bool validNode = false; | 210 | bool validNode = false; |
35 | @@ -266,6 +273,28 @@ | |||
36 | 266 | { | 273 | { |
37 | 267 | options.copyrightNotice = option.InnerText; | 274 | options.copyrightNotice = option.InnerText; |
38 | 268 | } | 275 | } |
39 | 276 | else if (option.Name == "scrollSpeed") | ||
40 | 277 | { | ||
41 | 278 | try | ||
42 | 279 | { | ||
43 | 280 | options.scrollSpeed = int.Parse(option.InnerText); | ||
44 | 281 | } | ||
45 | 282 | catch | ||
46 | 283 | { | ||
47 | 284 | System.Diagnostics.Trace.WriteLine("Non integer scrollSpeed in XLF", "Region - SetNextMediaNode"); | ||
48 | 285 | } | ||
49 | 286 | } | ||
50 | 287 | else if (option.Name == "updateInverval") | ||
51 | 288 | { | ||
52 | 289 | try | ||
53 | 290 | { | ||
54 | 291 | options.updateInterval = int.Parse(option.InnerText); | ||
55 | 292 | } | ||
56 | 293 | catch | ||
57 | 294 | { | ||
58 | 295 | System.Diagnostics.Trace.WriteLine("Non integer updateInterval in XLF", "Region - SetNextMediaNode"); | ||
59 | 296 | } | ||
60 | 297 | } | ||
61 | 269 | } | 298 | } |
62 | 270 | 299 | ||
63 | 271 | // And some stuff on Raw nodes | 300 | // And some stuff on Raw nodes |
64 | @@ -281,6 +310,10 @@ | |||
65 | 281 | { | 310 | { |
66 | 282 | options.documentTemplate = raw.InnerText; | 311 | options.documentTemplate = raw.InnerText; |
67 | 283 | } | 312 | } |
68 | 313 | else if (raw.Name == "embedHtml") | ||
69 | 314 | { | ||
70 | 315 | options.text = raw.InnerText; | ||
71 | 316 | } | ||
72 | 284 | } | 317 | } |
73 | 285 | 318 | ||
74 | 286 | // That should cover all the new options | 319 | // That should cover all the new options |
75 | @@ -398,6 +431,8 @@ | |||
76 | 398 | public string text; | 431 | public string text; |
77 | 399 | public string documentTemplate; | 432 | public string documentTemplate; |
78 | 400 | public string copyrightNotice; | 433 | public string copyrightNotice; |
79 | 434 | public int updateInterval; | ||
80 | 435 | public int scrollSpeed; | ||
81 | 401 | 436 | ||
82 | 402 | //The identification for this region | 437 | //The identification for this region |
83 | 403 | public string mediaid; | 438 | public string mediaid; |
84 | 404 | 439 | ||
85 | === removed file 'client/dotNET/Resources/Thumbs.db' | |||
86 | 405 | Binary files client/dotNET/Resources/Thumbs.db 2008-12-19 23:34:13 +0000 and client/dotNET/Resources/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 440 | Binary files client/dotNET/Resources/Thumbs.db 2008-12-19 23:34:13 +0000 and client/dotNET/Resources/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
87 | === modified file 'client/dotNET/Rss.cs' | |||
88 | --- client/dotNET/Rss.cs 2009-03-13 09:21:56 +0000 | |||
89 | +++ client/dotNET/Rss.cs 2009-06-20 10:39:40 +0000 | |||
90 | @@ -64,6 +64,12 @@ | |||
91 | 64 | scheduleId = options.scheduleId; | 64 | scheduleId = options.scheduleId; |
92 | 65 | layoutId = options.layoutId; | 65 | layoutId = options.layoutId; |
93 | 66 | 66 | ||
94 | 67 | // Update interval and scrolling speed | ||
95 | 68 | _updateInterval = options.updateInterval; | ||
96 | 69 | _scrollSpeed = options.scrollSpeed; | ||
97 | 70 | |||
98 | 71 | System.Diagnostics.Trace.WriteLine(String.Format("Scrolling Speed: {0}, Update Interval: {1})", _scrollSpeed.ToString(), _updateInterval.ToString()), "Rss - Constructor"); | ||
99 | 72 | |||
100 | 67 | // Set up the backgrounds | 73 | // Set up the backgrounds |
101 | 68 | backgroundTop = options.backgroundTop + "px"; | 74 | backgroundTop = options.backgroundTop + "px"; |
102 | 69 | backgroundLeft = options.backgroundLeft + "px"; | 75 | backgroundLeft = options.backgroundLeft + "px"; |
103 | @@ -77,7 +83,7 @@ | |||
104 | 77 | 83 | ||
105 | 78 | try | 84 | try |
106 | 79 | { | 85 | { |
108 | 80 | webBrowser.DocumentText = String.Format("<html><head><script type='text/javascript'>{0}</script><style type='text/css'>p, h1, h2, h3, h4, h5 {{ margin:2px; font-size:{1}em; }}</style></head><body></body></html>", Properties.Resources.textRender, options.scaleFactor.ToString()); | 86 | webBrowser.DocumentText = String.Format("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><script type='text/javascript'>{0}</script><style type='text/css'>p, h1, h2, h3, h4, h5 {{ margin:2px; font-size:{1}em; }}</style></head><body></body></html>", Properties.Resources.textRender, options.scaleFactor.ToString()); |
109 | 81 | } | 87 | } |
110 | 82 | catch (Exception e) | 88 | catch (Exception e) |
111 | 83 | { | 89 | { |
112 | @@ -96,6 +102,9 @@ | |||
113 | 96 | try | 102 | try |
114 | 97 | { | 103 | { |
115 | 98 | wc = new System.Net.WebClient(); | 104 | wc = new System.Net.WebClient(); |
116 | 105 | wc.Encoding = System.Text.Encoding.UTF8; | ||
117 | 106 | |||
118 | 107 | System.Diagnostics.Debug.WriteLine("Created at WebClient and set the Encoding to UTF8", "RSS - Refresh local RSS"); | ||
119 | 99 | 108 | ||
120 | 100 | wc.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(wc_OpenReadCompleted); | 109 | wc.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(wc_OpenReadCompleted); |
121 | 101 | 110 | ||
122 | @@ -109,6 +118,8 @@ | |||
123 | 109 | 118 | ||
124 | 110 | void wc_OpenReadCompleted(object sender, System.Net.OpenReadCompletedEventArgs e) | 119 | void wc_OpenReadCompleted(object sender, System.Net.OpenReadCompletedEventArgs e) |
125 | 111 | { | 120 | { |
126 | 121 | String rssContents; | ||
127 | 122 | |||
128 | 112 | if (e.Error != null) | 123 | if (e.Error != null) |
129 | 113 | { | 124 | { |
130 | 114 | System.Diagnostics.Trace.WriteLine(String.Format("[*]ScheduleID:{1},LayoutID:{2},MediaID:{3},Message:{0}", e.Error, scheduleId, layoutId, mediaid)); | 125 | System.Diagnostics.Trace.WriteLine(String.Format("[*]ScheduleID:{1},LayoutID:{2},MediaID:{3},Message:{0}", e.Error, scheduleId, layoutId, mediaid)); |
131 | @@ -122,11 +133,14 @@ | |||
132 | 122 | 133 | ||
133 | 123 | try | 134 | try |
134 | 124 | { | 135 | { |
136 | 125 | System.IO.StreamReader sr = new System.IO.StreamReader(data); | 136 | System.IO.StreamReader sr = new System.IO.StreamReader(data, Encoding.UTF8); |
137 | 137 | rssContents = sr.ReadToEnd(); | ||
138 | 126 | 138 | ||
139 | 127 | StreamWriter sw = new StreamWriter(File.Open(rssFilePath, FileMode.Create, FileAccess.Write, FileShare.Read)); | 139 | StreamWriter sw = new StreamWriter(File.Open(rssFilePath, FileMode.Create, FileAccess.Write, FileShare.Read)); |
140 | 128 | 140 | ||
142 | 129 | sw.Write(sr.ReadToEnd()); | 141 | System.Diagnostics.Debug.WriteLine("Retrieved RSS - about to write it", "RSS - wc_OpenReadCompleted"); |
143 | 142 | |||
144 | 143 | sw.Write(rssContents); | ||
145 | 130 | 144 | ||
146 | 131 | sr.Close(); | 145 | sr.Close(); |
147 | 132 | sw.Close(); | 146 | sw.Close(); |
148 | @@ -172,16 +186,23 @@ | |||
149 | 172 | } | 186 | } |
150 | 173 | else | 187 | else |
151 | 174 | { | 188 | { |
156 | 175 | // It exists - therefore we want to get the last time it was updated | 189 | if (_updateInterval == 0) |
153 | 176 | DateTime lastWriteDate = System.IO.File.GetLastWriteTime(rssFilePath); | ||
154 | 177 | |||
155 | 178 | if (DateTime.Now.CompareTo(lastWriteDate.AddHours(6.0)) > 0) | ||
157 | 179 | { | 190 | { |
158 | 180 | refreshLocalRss(); | 191 | refreshLocalRss(); |
159 | 181 | } | 192 | } |
160 | 182 | else | 193 | else |
161 | 183 | { | 194 | { |
163 | 184 | rssReady = true; | 195 | // It exists - therefore we want to get the last time it was updated |
164 | 196 | DateTime lastWriteDate = System.IO.File.GetLastWriteTime(rssFilePath); | ||
165 | 197 | |||
166 | 198 | if (DateTime.Now.CompareTo(lastWriteDate.AddHours(_updateInterval * 1.0 / 60.0)) > 0) | ||
167 | 199 | { | ||
168 | 200 | refreshLocalRss(); | ||
169 | 201 | } | ||
170 | 202 | else | ||
171 | 203 | { | ||
172 | 204 | rssReady = true; | ||
173 | 205 | } | ||
174 | 185 | } | 206 | } |
175 | 186 | } | 207 | } |
176 | 187 | 208 | ||
177 | @@ -330,7 +351,7 @@ | |||
178 | 330 | // Call the JavaScript on the page | 351 | // Call the JavaScript on the page |
179 | 331 | Object[] objArray = new Object[2]; | 352 | Object[] objArray = new Object[2]; |
180 | 332 | objArray[0] = direction; | 353 | objArray[0] = direction; |
182 | 333 | objArray[1] = 30; | 354 | objArray[1] = _scrollSpeed; |
183 | 334 | 355 | ||
184 | 335 | htmlDoc.InvokeScript("init", objArray); | 356 | htmlDoc.InvokeScript("init", objArray); |
185 | 336 | } | 357 | } |
186 | @@ -451,6 +472,8 @@ | |||
187 | 451 | private WebBrowser webBrowser; | 472 | private WebBrowser webBrowser; |
188 | 452 | private string copyrightNotice; | 473 | private string copyrightNotice; |
189 | 453 | private string mediaid; | 474 | private string mediaid; |
190 | 475 | private int _updateInterval; | ||
191 | 476 | private int _scrollSpeed; | ||
192 | 454 | 477 | ||
193 | 455 | private string rssFilePath; | 478 | private string rssFilePath; |
194 | 456 | 479 | ||
195 | 457 | 480 | ||
196 | === modified file 'client/dotNET/Schedule.cs' | |||
197 | --- client/dotNET/Schedule.cs 2009-03-08 11:40:17 +0000 | |||
198 | +++ client/dotNET/Schedule.cs 2009-06-18 18:36:21 +0000 | |||
199 | @@ -69,6 +69,7 @@ | |||
200 | 69 | xmds2.RequiredFilesCompleted += new XiboClient.xmds.RequiredFilesCompletedEventHandler(xmds2_RequiredFilesCompleted); | 69 | xmds2.RequiredFilesCompleted += new XiboClient.xmds.RequiredFilesCompletedEventHandler(xmds2_RequiredFilesCompleted); |
201 | 70 | xmds2.ScheduleCompleted += new XiboClient.xmds.ScheduleCompletedEventHandler(xmds2_ScheduleCompleted); | 70 | xmds2.ScheduleCompleted += new XiboClient.xmds.ScheduleCompletedEventHandler(xmds2_ScheduleCompleted); |
202 | 71 | 71 | ||
203 | 72 | System.Diagnostics.Trace.WriteLine(String.Format("Collection Interval: {0}", Properties.Settings.Default.collectInterval), "Schedule - InitializeComponents"); | ||
204 | 72 | // | 73 | // |
205 | 73 | // The Timer for the Service call | 74 | // The Timer for the Service call |
206 | 74 | // | 75 | // |
207 | 75 | 76 | ||
208 | === modified file 'client/dotNET/Text.cs' | |||
209 | --- client/dotNET/Text.cs 2008-12-19 23:34:13 +0000 | |||
210 | +++ client/dotNET/Text.cs 2009-06-20 10:39:40 +0000 | |||
211 | @@ -55,11 +55,12 @@ | |||
212 | 55 | 55 | ||
213 | 56 | try | 56 | try |
214 | 57 | { | 57 | { |
216 | 58 | webBrowser.DocumentText = String.Format("<html><head><script type='text/javascript'>{0}</script><style type='text/css'>p, h1, h2, h3, h4, h5 {{ margin:2px; font-size:{1}em; }}</style></head><body></body></html>", Properties.Resources.textRender, options.scaleFactor.ToString()); | 58 | webBrowser.DocumentText = String.Format("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><script type='text/javascript'>{0}</script><style type='text/css'>p, h1, h2, h3, h4, h5 {{ margin:2px; font-size:{1}em; }}</style></head><body></body></html>", Properties.Resources.textRender, options.scaleFactor.ToString()); |
217 | 59 | } | 59 | } |
218 | 60 | catch (Exception e) | 60 | catch (Exception e) |
219 | 61 | { | 61 | { |
221 | 62 | MessageBox.Show(e.Message); | 62 | System.Diagnostics.Trace.WriteLine(e.Message); |
222 | 63 | return; | ||
223 | 63 | } | 64 | } |
224 | 64 | 65 | ||
225 | 65 | webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser_DocumentCompleted); | 66 | webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser_DocumentCompleted); |
226 | 66 | 67 | ||
227 | === modified file 'client/dotNET/VideoPlayer.resx' | |||
228 | --- client/dotNET/VideoPlayer.resx 2008-12-19 23:34:13 +0000 | |||
229 | +++ client/dotNET/VideoPlayer.resx 2009-05-24 10:19:36 +0000 | |||
230 | @@ -123,8 +123,8 @@ | |||
231 | 123 | LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 | 123 | LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 |
232 | 124 | ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAuQAAAAIB | 124 | ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAuQAAAAIB |
233 | 125 | AAAAAQAAAAAAAAAAAAAAAKQAAAAAAwAACAACAAAAAAAFAAAAAAAAAPA/AwAAAAAABQAAAAAAAAAAAAgA | 125 | AAAAAQAAAAAAAAAAAAAAAKQAAAAAAwAACAACAAAAAAAFAAAAAAAAAPA/AwAAAAAABQAAAAAAAAAAAAgA |
236 | 126 | AgAAAAAAAwABAAAACwD//wMAAAAAAAsA//8IAAIAAAAAAAMAMgAAAAsAAAAIAAoAAABuAG8AbgBlAAAA | 126 | AgAAAAAAAwABAAAACwD//wMAAAAAAAsAAAAIAAIAAAAAAAMAMgAAAAsAAAAIAAoAAABuAG8AbgBlAAAA |
237 | 127 | CwD//wsA//8LAAAACwAAAAsAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAAIAAIAAAAAAAsAAAATHgAA | 127 | CwD//wsAAAALAAAACwAAAAsAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAAIAAIAAAAAAAsAAAATHgAA |
238 | 128 | zRsAAAs= | 128 | zRsAAAs= |
239 | 129 | </value> | 129 | </value> |
240 | 130 | </data> | 130 | </data> |
241 | 131 | 131 | ||
242 | === modified file 'client/dotNET/bin/Release/XiboClient.XmlSerializers.dll' | |||
243 | 132 | Binary files client/dotNET/bin/Release/XiboClient.XmlSerializers.dll 2009-03-28 19:13:50 +0000 and client/dotNET/bin/Release/XiboClient.XmlSerializers.dll 2009-06-20 10:39:40 +0000 differ | 132 | Binary files client/dotNET/bin/Release/XiboClient.XmlSerializers.dll 2009-03-28 19:13:50 +0000 and client/dotNET/bin/Release/XiboClient.XmlSerializers.dll 2009-06-20 10:39:40 +0000 differ |
244 | === modified file 'client/dotNET/bin/Release/XiboClient.exe' | |||
245 | 133 | Binary files client/dotNET/bin/Release/XiboClient.exe 2009-03-28 19:13:50 +0000 and client/dotNET/bin/Release/XiboClient.exe 2009-06-20 10:39:40 +0000 differ | 133 | Binary files client/dotNET/bin/Release/XiboClient.exe 2009-03-28 19:13:50 +0000 and client/dotNET/bin/Release/XiboClient.exe 2009-06-20 10:39:40 +0000 differ |
246 | === modified file 'client/dotNET/bin/Release/XiboClient.pdb' | |||
247 | 134 | Binary files client/dotNET/bin/Release/XiboClient.pdb 2009-03-28 19:13:50 +0000 and client/dotNET/bin/Release/XiboClient.pdb 2009-06-20 10:39:40 +0000 differ | 134 | Binary files client/dotNET/bin/Release/XiboClient.pdb 2009-03-28 19:13:50 +0000 and client/dotNET/bin/Release/XiboClient.pdb 2009-06-20 10:39:40 +0000 differ |
248 | === modified file 'server/config/config.class.php' | |||
249 | --- server/config/config.class.php 2009-05-02 10:10:54 +0000 | |||
250 | +++ server/config/config.class.php 2009-06-20 10:59:41 +0000 | |||
251 | @@ -192,7 +192,7 @@ | |||
252 | 192 | $output .= $imgBad.$message.'<br />'; | 192 | $output .= $imgBad.$message.'<br />'; |
253 | 193 | $output .= <<<END | 193 | $output .= <<<END |
254 | 194 | <div class="check_explain"> | 194 | <div class="check_explain"> |
256 | 195 | <p>Xibo requires a MySQL database.</p> | 195 | <p>Xibo requires the PHP MySQL Extension to function.</p> |
257 | 196 | </div> | 196 | </div> |
258 | 197 | END; | 197 | END; |
259 | 198 | } | 198 | } |
260 | 199 | 199 | ||
261 | === removed file 'server/img/Thumbs.db' | |||
262 | 200 | Binary files server/img/Thumbs.db 2008-12-14 14:42:52 +0000 and server/img/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 200 | Binary files server/img/Thumbs.db 2008-12-14 14:42:52 +0000 and server/img/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
263 | === removed file 'server/img/bodys/Thumbs.db' | |||
264 | 201 | Binary files server/img/bodys/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/bodys/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 201 | Binary files server/img/bodys/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/bodys/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
265 | === removed file 'server/img/dashboard/Thumbs.db' | |||
266 | 202 | Binary files server/img/dashboard/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/dashboard/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 202 | Binary files server/img/dashboard/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/dashboard/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
267 | === removed file 'server/img/dialogs/Thumbs.db' | |||
268 | 203 | Binary files server/img/dialogs/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/dialogs/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 203 | Binary files server/img/dialogs/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/dialogs/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
269 | === removed file 'server/img/fades/Thumbs.db' | |||
270 | 204 | Binary files server/img/fades/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/fades/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 204 | Binary files server/img/fades/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/fades/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
271 | === removed file 'server/img/filterform/Thumbs.db' | |||
272 | 205 | Binary files server/img/filterform/Thumbs.db 2008-12-14 14:42:52 +0000 and server/img/filterform/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 205 | Binary files server/img/filterform/Thumbs.db 2008-12-14 14:42:52 +0000 and server/img/filterform/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
273 | === removed file 'server/img/forms/Thumbs.db' | |||
274 | 206 | Binary files server/img/forms/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/forms/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 206 | Binary files server/img/forms/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/forms/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
275 | === added file 'server/img/forms/embedded.png' | |||
276 | 207 | Binary files server/img/forms/embedded.png 1970-01-01 00:00:00 +0000 and server/img/forms/embedded.png 2009-06-20 12:00:21 +0000 differ | 207 | Binary files server/img/forms/embedded.png 1970-01-01 00:00:00 +0000 and server/img/forms/embedded.png 2009-06-20 12:00:21 +0000 differ |
277 | === removed file 'server/img/login/Thumbs.db' | |||
278 | 208 | Binary files server/img/login/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/login/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 208 | Binary files server/img/login/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/login/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
279 | === removed file 'server/img/logos/Thumbs.db' | |||
280 | 209 | Binary files server/img/logos/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/logos/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 209 | Binary files server/img/logos/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/logos/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
281 | === removed file 'server/img/tables/Thumbs.db' | |||
282 | 210 | Binary files server/img/tables/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/tables/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 210 | Binary files server/img/tables/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/tables/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
283 | === removed file 'server/img/tabs/Thumbs.db' | |||
284 | 211 | Binary files server/img/tabs/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/tabs/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 211 | Binary files server/img/tabs/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/tabs/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
285 | === removed file 'server/img/titles/Thumbs.db' | |||
286 | 212 | Binary files server/img/titles/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/titles/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 212 | Binary files server/img/titles/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/titles/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
287 | === removed file 'server/img/weather_rss/Thumbs.db' | |||
288 | 213 | Binary files server/img/weather_rss/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/weather_rss/Thumbs.db 1970-01-01 00:00:00 +0000 differ | 213 | Binary files server/img/weather_rss/Thumbs.db 2008-12-10 23:48:58 +0000 and server/img/weather_rss/Thumbs.db 1970-01-01 00:00:00 +0000 differ |
289 | === modified file 'server/install.php' | |||
290 | --- server/install.php 2009-04-30 17:49:26 +0000 | |||
291 | +++ server/install.php 2009-06-15 08:16:19 +0000 | |||
292 | @@ -266,6 +266,7 @@ | |||
293 | 266 | // NB this is broken for 0 padded files | 266 | // NB this is broken for 0 padded files |
294 | 267 | // eg 01.sql would be incorrectly sorted in the above example. | 267 | // eg 01.sql would be incorrectly sorted in the above example. |
295 | 268 | 268 | ||
296 | 269 | $sqlStatementCount = 0; | ||
297 | 269 | natcasesort($sql_files); | 270 | natcasesort($sql_files); |
298 | 270 | 271 | ||
299 | 271 | foreach ($sql_files as $filename) { | 272 | foreach ($sql_files as $filename) { |
300 | @@ -280,10 +281,11 @@ | |||
301 | 280 | $sql_file = split_sql_file($sql_file, $delimiter); | 281 | $sql_file = split_sql_file($sql_file, $delimiter); |
302 | 281 | 282 | ||
303 | 282 | foreach ($sql_file as $sql) { | 283 | foreach ($sql_file as $sql) { |
305 | 283 | print "."; | 284 | print "."; |
306 | 285 | $sqlStatementCount++; | ||
307 | 284 | flush(); | 286 | flush(); |
308 | 285 | if (! @mysql_query($sql,$db)) { | 287 | if (! @mysql_query($sql,$db)) { |
310 | 286 | reportError("4", "An error occured populating the database.<br /><br />MySQL Error:<br />" . mysql_error()); | 288 | reportError("4", "An error occured populating the database.<br /><br />MySQL Error:<br />" . mysql_error() . "<br /><br />SQL executed:<br />" . $sql . "<br /><br />Statement number: " . $sqlStatementCount); |
311 | 287 | } | 289 | } |
312 | 288 | } | 290 | } |
313 | 289 | print "</p>"; | 291 | print "</p>"; |
314 | 290 | 292 | ||
315 | === added file 'server/install/database/6.sql' | |||
316 | --- server/install/database/6.sql 1970-01-01 00:00:00 +0000 | |||
317 | +++ server/install/database/6.sql 2009-06-20 09:34:43 +0000 | |||
318 | @@ -0,0 +1,16 @@ | |||
319 | 1 | INSERT INTO `module` ( | ||
320 | 2 | `ModuleID` , | ||
321 | 3 | `Module` , | ||
322 | 4 | `Enabled` , | ||
323 | 5 | `RegionSpecific` , | ||
324 | 6 | `Description` , | ||
325 | 7 | `ImageUri` , | ||
326 | 8 | `SchemaVersion` | ||
327 | 9 | ) | ||
328 | 10 | VALUES ( | ||
329 | 11 | NULL , 'Embedded', '1', '1', 'Embedded HTML', 'img/forms/webpage.gif', '1' | ||
330 | 12 | ); | ||
331 | 13 | |||
332 | 14 | UPDATE `version` SET `app_ver` = '1.0.2'; | ||
333 | 15 | UPDATE `setting` SET `value` = 0 WHERE `setting` = 'PHONE_HOME_DATE'; | ||
334 | 16 | UPDATE `version` SET `DBVersion` = '6'; | ||
335 | 0 | \ No newline at end of file | 17 | \ No newline at end of file |
336 | 1 | 18 | ||
337 | === modified file 'server/lib/app/session.class.php' | |||
338 | --- server/lib/app/session.class.php 2008-12-19 22:10:39 +0000 | |||
339 | +++ server/lib/app/session.class.php 2009-07-07 20:01:49 +0000 | |||
340 | @@ -29,7 +29,8 @@ | |||
341 | 29 | 29 | ||
342 | 30 | public $isExpired = 1; | 30 | public $isExpired = 1; |
343 | 31 | 31 | ||
345 | 32 | function __construct(database $db) { | 32 | function __construct(database $db) |
346 | 33 | { | ||
347 | 33 | $this->db =& $db; | 34 | $this->db =& $db; |
348 | 34 | 35 | ||
349 | 35 | session_set_save_handler(array(&$this, 'open'), | 36 | session_set_save_handler(array(&$this, 'open'), |
350 | @@ -64,38 +65,27 @@ | |||
351 | 64 | { | 65 | { |
352 | 65 | $db =& $this->db; | 66 | $db =& $this->db; |
353 | 66 | 67 | ||
356 | 67 | $userAgent = $_SERVER['HTTP_USER_AGENT']; | 68 | $userAgent = Kit::GetParam('HTTP_USER_AGENT', $_SERVER, _STRING, 'No user agent'); |
357 | 68 | $remoteAddr = $_SERVER['REMOTE_ADDR']; | 69 | $remoteAddr = Kit::GetParam('REMOTE_ADDR', $_SERVER, _STRING); |
358 | 70 | $securityToken = Kit::GetParam('SecurityToken', _POST, _STRING, null); | ||
359 | 69 | 71 | ||
360 | 70 | $this->key = $key; | 72 | $this->key = $key; |
361 | 71 | $newExp = time() + $this->max_lifetime; | 73 | $newExp = time() + $this->max_lifetime; |
362 | 72 | 74 | ||
363 | 73 | $this->gc($this->max_lifetime); | 75 | $this->gc($this->max_lifetime); |
364 | 74 | 76 | ||
380 | 75 | if(isset($_POST['SecurityToken'])) | 77 | // Get this session |
366 | 76 | { | ||
367 | 77 | $securityToken = validate($_POST['SecurityToken']); | ||
368 | 78 | |||
369 | 79 | if (!$securityToken) | ||
370 | 80 | { | ||
371 | 81 | log_entry($db, "error", "Invalid Security Token"); | ||
372 | 82 | $securityToken = null; | ||
373 | 83 | } | ||
374 | 84 | } | ||
375 | 85 | else | ||
376 | 86 | { | ||
377 | 87 | $securityToken = null; | ||
378 | 88 | } | ||
379 | 89 | |||
381 | 90 | $SQL = " SELECT session_data, IsExpired, SecurityToken FROM session "; | 78 | $SQL = " SELECT session_data, IsExpired, SecurityToken FROM session "; |
386 | 91 | $SQL .= " WHERE session_id = '$key' "; | 79 | $SQL .= " WHERE session_id = '%s' "; |
387 | 92 | $SQL .= " AND RemoteAddr = '$remoteAddr' "; | 80 | $SQL .= " AND UserAgent = '%s' "; |
388 | 93 | 81 | ||
389 | 94 | if (!$result = $db->query($SQL)); | 82 | $SQL = sprintf($SQL, $db->escape_string($key), $db->escape_string($userAgent)); |
390 | 83 | |||
391 | 84 | $result = $db->query($SQL); | ||
392 | 95 | 85 | ||
393 | 96 | if ($db->num_rows($result) != 0) | 86 | if ($db->num_rows($result) != 0) |
394 | 97 | { | 87 | { |
396 | 98 | 88 | // Get the row | |
397 | 99 | $row = $db->get_row($result); | 89 | $row = $db->get_row($result); |
398 | 100 | 90 | ||
399 | 101 | // We have the Key and the Remote Address. | 91 | // We have the Key and the Remote Address. |
400 | @@ -109,10 +99,10 @@ | |||
401 | 109 | // We have a security token, so dont require a login | 99 | // We have a security token, so dont require a login |
402 | 110 | $this->isExpired = 0; | 100 | $this->isExpired = 0; |
403 | 111 | 101 | ||
405 | 112 | if (!$db->query("UPDATE session SET session_expiration = $newExp, isExpired = 0 WHERE session_id = '$key' ")) | 102 | if (!$db->query(sprintf("UPDATE session SET session_expiration = $newExp, isExpired = 0 WHERE session_id = '%s' ", $db->escape_string($key)))) |
406 | 113 | { | 103 | { |
407 | 114 | log_entry($db, "error", $db->error()); | 104 | log_entry($db, "error", $db->error()); |
409 | 115 | } | 105 | } |
410 | 116 | } | 106 | } |
411 | 117 | else | 107 | else |
412 | 118 | { | 108 | { |
413 | @@ -123,49 +113,55 @@ | |||
414 | 123 | } | 113 | } |
415 | 124 | 114 | ||
416 | 125 | // Either way - update this SESSION so that the security token is NULL | 115 | // Either way - update this SESSION so that the security token is NULL |
418 | 126 | $db->query("UPDATE session SET SecurityToken = NULL WHERE session_id = '$key' "); | 116 | $db->query(sprintf("UPDATE session SET SecurityToken = NULL WHERE session_id = '%s' ", $db->escape_string($key))); |
419 | 127 | 117 | ||
420 | 128 | return($row[0]); | 118 | return($row[0]); |
421 | 129 | } | 119 | } |
423 | 130 | else { | 120 | else |
424 | 121 | { | ||
425 | 131 | $empty = ''; | 122 | $empty = ''; |
426 | 132 | return settype($empty, "string"); | 123 | return settype($empty, "string"); |
427 | 133 | } | 124 | } |
428 | 134 | } | 125 | } |
429 | 135 | 126 | ||
435 | 136 | function write($key, $val) { | 127 | function write($key, $val) |
436 | 137 | 128 | { | |
437 | 138 | $db =& $this->db; | 129 | $db =& $this->db; |
433 | 139 | |||
434 | 140 | $val = addslashes($val); | ||
438 | 141 | 130 | ||
439 | 142 | $newExp = time() + $this->max_lifetime; | 131 | $newExp = time() + $this->max_lifetime; |
440 | 143 | $lastaccessed = date("Y-m-d H:i:s"); | 132 | $lastaccessed = date("Y-m-d H:i:s"); |
443 | 144 | $userAgent = $_SERVER['HTTP_USER_AGENT']; | 133 | $userAgent = Kit::GetParam('HTTP_USER_AGENT', $_SERVER, _STRING, 'No user agent'); |
444 | 145 | $remoteAddr = $_SERVER['REMOTE_ADDR']; | 134 | $remoteAddr = Kit::GetParam('REMOTE_ADDR', $_SERVER, _STRING); |
445 | 146 | 135 | ||
447 | 147 | $result = $db->query("SELECT session_id FROM session WHERE session_id = '$key'"); | 136 | $result = $db->query(sprintf("SELECT session_id FROM session WHERE session_id = '%s'", $db->escape_string($key))); |
448 | 148 | 137 | ||
449 | 149 | if ($db->num_rows($result) == 0) | 138 | if ($db->num_rows($result) == 0) |
450 | 150 | { | 139 | { |
451 | 151 | //INSERT | 140 | //INSERT |
452 | 152 | $SQL = "INSERT INTO session (session_id, session_data, session_expiration, LastAccessed, LastPage, userID, IsExpired, UserAgent, RemoteAddr) | 141 | $SQL = "INSERT INTO session (session_id, session_data, session_expiration, LastAccessed, LastPage, userID, IsExpired, UserAgent, RemoteAddr) |
454 | 153 | VALUES ('$key','$val',$newExp,'$lastaccessed','login', NULL, 0, '$userAgent', '$remoteAddr')"; | 142 | VALUES ('%s', '%s', %d, '%s', 'login', NULL, 0, '%s', '%s')"; |
455 | 143 | |||
456 | 144 | $SQL = sprintf($SQL, $db->escape_string($key), $db->escape_string($val), $newExp, $db->escape_string($lastaccessed), $db->escape_string($userAgent), $db->escape_string($remoteAddr)); | ||
457 | 154 | } | 145 | } |
458 | 155 | else | 146 | else |
459 | 156 | { | 147 | { |
460 | 157 | //UPDATE | 148 | //UPDATE |
461 | 158 | $SQL = "UPDATE session SET "; | 149 | $SQL = "UPDATE session SET "; |
466 | 159 | $SQL .= " session_data = '$val', "; | 150 | $SQL .= " session_data = '%s', "; |
467 | 160 | $SQL .= " session_expiration = '$newExp', "; | 151 | $SQL .= " session_expiration = %d, "; |
468 | 161 | $SQL .= " lastaccessed = '$lastaccessed' "; | 152 | $SQL .= " lastaccessed = '%s', "; |
469 | 162 | $SQL .= " WHERE session_id = '$key' "; | 153 | $SQL .= " RemoteAddr = '%s' "; |
470 | 154 | $SQL .= " WHERE session_id = '%s' "; | ||
471 | 155 | |||
472 | 156 | $SQL = sprintf($SQL, $db->escape_string($val), $newExp, $db->escape_string($lastaccessed), $db->escape_string($remoteAddr), $db->escape_string($key)); | ||
473 | 163 | } | 157 | } |
474 | 164 | 158 | ||
476 | 165 | if(!$db->query($SQL)) { | 159 | if(!$db->query($SQL)) |
477 | 160 | { | ||
478 | 166 | log_entry($db, "error", $db->error()); | 161 | log_entry($db, "error", $db->error()); |
479 | 167 | return(false); | 162 | return(false); |
480 | 168 | } | 163 | } |
481 | 164 | |||
482 | 169 | return true; | 165 | return true; |
483 | 170 | } | 166 | } |
484 | 171 | 167 | ||
485 | @@ -173,7 +169,7 @@ | |||
486 | 173 | { | 169 | { |
487 | 174 | $db =& $this->db; | 170 | $db =& $this->db; |
488 | 175 | 171 | ||
490 | 176 | $SQL = "UPDATE session SET IsExpired = 1 WHERE session_id = '$key'"; | 172 | $SQL = sprintf("UPDATE session SET IsExpired = 1 WHERE session_id = '%s'", $db->escape_string($key)); |
491 | 177 | 173 | ||
492 | 178 | $result = $db->query("$SQL"); | 174 | $result = $db->query("$SQL"); |
493 | 179 | 175 | ||
494 | @@ -193,26 +189,32 @@ | |||
495 | 193 | { | 189 | { |
496 | 194 | $db =& $this->db; | 190 | $db =& $this->db; |
497 | 195 | 191 | ||
499 | 196 | $SQL = "UPDATE session SET userID = $userid WHERE session_id = '$key' "; | 192 | $SQL = sprintf("UPDATE session SET userID = %d WHERE session_id = '%s' ",$userid, $db->escape_string($key)); |
500 | 197 | 193 | ||
502 | 198 | if(!$db->query($SQL)) { | 194 | if(!$db->query($SQL)) |
503 | 195 | { | ||
504 | 199 | trigger_error($db->error(), E_USER_NOTICE); | 196 | trigger_error($db->error(), E_USER_NOTICE); |
505 | 200 | return(false); | 197 | return(false); |
506 | 201 | } | 198 | } |
507 | 202 | return true; | 199 | return true; |
508 | 203 | } | 200 | } |
509 | 204 | 201 | ||
512 | 205 | // Update the session (after login) | 202 | /** |
513 | 206 | static function RegenerateSessionID() | 203 | * Updates the session ID with a new one |
514 | 204 | * @return | ||
515 | 205 | */ | ||
516 | 206 | public function RegenerateSessionID($oldSessionID) | ||
517 | 207 | { | 207 | { |
519 | 208 | $old_sess_id = session_id(); | 208 | $db =& $this->db; |
520 | 209 | 209 | ||
521 | 210 | session_regenerate_id(false); | 210 | session_regenerate_id(false); |
522 | 211 | 211 | ||
523 | 212 | $new_sess_id = session_id(); | 212 | $new_sess_id = session_id(); |
524 | 213 | |||
525 | 214 | $this->key = $new_sess_id; | ||
526 | 213 | 215 | ||
529 | 214 | $query = "UPDATE `session` SET `session_id` = '$new_sess_id' WHERE session_id = '$old_sess_id'"; | 216 | $query = sprintf("UPDATE session SET session_id = '%s' WHERE session_id = '%s'", $db->escape_string($new_sess_id), $db->escape_string($oldSessionID)); |
530 | 215 | mysql_query($query); | 217 | $db->query($query); |
531 | 216 | } | 218 | } |
532 | 217 | 219 | ||
533 | 218 | function set_page($key, $lastpage) | 220 | function set_page($key, $lastpage) |
534 | @@ -221,9 +223,10 @@ | |||
535 | 221 | 223 | ||
536 | 222 | $_SESSION['pagename'] = $lastpage; | 224 | $_SESSION['pagename'] = $lastpage; |
537 | 223 | 225 | ||
539 | 224 | $SQL = "UPDATE session SET LastPage = '$lastpage' WHERE session_id = '$key' "; | 226 | $SQL = sprintf("UPDATE session SET LastPage = '%s' WHERE session_id = '%s' ", $db->escape_string($lastpage), $db->escape_string($key)); |
540 | 225 | 227 | ||
542 | 226 | if(!$db->query($SQL)) { | 228 | if(!$db->query($SQL)) |
543 | 229 | { | ||
544 | 227 | trigger_error($db->error(), E_USER_NOTICE); | 230 | trigger_error($db->error(), E_USER_NOTICE); |
545 | 228 | return(false); | 231 | return(false); |
546 | 229 | } | 232 | } |
547 | @@ -236,7 +239,7 @@ | |||
548 | 236 | 239 | ||
549 | 237 | $this->isExpired = $isExpired; | 240 | $this->isExpired = $isExpired; |
550 | 238 | 241 | ||
552 | 239 | $SQL = "UPDATE session SET IsExpired = $this->isExpired WHERE session_id = '$this->key'"; | 242 | $SQL = sprintf("UPDATE session SET IsExpired = $this->isExpired WHERE session_id = '%s'", $db->escape_string($this->key)); |
553 | 240 | 243 | ||
554 | 241 | if (!$db->query($SQL)) | 244 | if (!$db->query($SQL)) |
555 | 242 | { | 245 | { |
556 | @@ -248,7 +251,7 @@ | |||
557 | 248 | { | 251 | { |
558 | 249 | $db =& $this->db; | 252 | $db =& $this->db; |
559 | 250 | 253 | ||
561 | 251 | $SQL = "UPDATE session SET securityToken = '$token' WHERE session_id = '$this->key'"; | 254 | $SQL = sprintf("UPDATE session SET securityToken = '%s' WHERE session_id = '%s'", $db->escape_string($token), $db->escape_string($this->key)); |
562 | 252 | 255 | ||
563 | 253 | if (!$db->query($SQL)) | 256 | if (!$db->query($SQL)) |
564 | 254 | { | 257 | { |
565 | 255 | 258 | ||
566 | === modified file 'server/lib/pages/layout.class.php' | |||
567 | --- server/lib/pages/layout.class.php 2009-04-27 19:28:08 +0000 | |||
568 | +++ server/lib/pages/layout.class.php 2009-06-20 12:00:21 +0000 | |||
569 | @@ -1194,8 +1194,12 @@ | |||
570 | 1194 | $paddingTop = $regionHeight / 2 - 16; | 1194 | $paddingTop = $regionHeight / 2 - 16; |
571 | 1195 | $paddingTop = $paddingTop . "px"; | 1195 | $paddingTop = $paddingTop . "px"; |
572 | 1196 | 1196 | ||
573 | 1197 | $regionTransparency = '<div class="regionTransparency" style="width:100%; height:100%;">'; | ||
574 | 1198 | $regionTransparency .= '</div>'; | ||
575 | 1199 | |||
576 | 1197 | $doubleClickLink = "XiboFormRender($(this).attr('href'))"; | 1200 | $doubleClickLink = "XiboFormRender($(this).attr('href'))"; |
578 | 1198 | $regionHtml .= "<div id='region_$regionid' regionid='$regionid' layoutid='$this->layoutid' href='index.php?p=layout&layoutid=$this->layoutid®ionid=$regionid&q=RegionOptions' ondblclick=\"$doubleClickLink\"' class='region' style=\"position:absolute; width:$regionWidth; height:$regionHeight; top: $regionTop; left: $regionLeft; background-color: #FFF; opacity: .75; filter: alpha(opacity=75); border: 1px dashed #000\"> | 1201 | $regionHtml .= "<div id='region_$regionid' regionid='$regionid' layoutid='$this->layoutid' href='index.php?p=layout&layoutid=$this->layoutid®ionid=$regionid&q=RegionOptions' ondblclick=\"$doubleClickLink\"' class='region' style=\"position:absolute; width:$regionWidth; height:$regionHeight; top: $regionTop; left: $regionLeft; border: 1px dashed #000\"> |
579 | 1202 | $regionTransparency | ||
580 | 1199 | <div class='preview' style='$previewStyle'> | 1203 | <div class='preview' style='$previewStyle'> |
581 | 1200 | <div class='previewContent'></div> | 1204 | <div class='previewContent'></div> |
582 | 1201 | <div class='previewNav' style='display:none;'></div> | 1205 | <div class='previewNav' style='display:none;'></div> |
583 | @@ -1435,7 +1439,7 @@ | |||
584 | 1435 | while ($modulesItem = $enabledModules->GetNextModule()) | 1439 | while ($modulesItem = $enabledModules->GetNextModule()) |
585 | 1436 | { | 1440 | { |
586 | 1437 | $mod = Kit::ValidateParam($modulesItem['Module'], _STRING); | 1441 | $mod = Kit::ValidateParam($modulesItem['Module'], _STRING); |
588 | 1438 | $caption = 'Add ' . $mod; | 1442 | $caption = '+ ' . $mod; |
589 | 1439 | $mod = strtolower($mod); | 1443 | $mod = strtolower($mod); |
590 | 1440 | $title = Kit::ValidateParam($modulesItem['Description'], _STRING); | 1444 | $title = Kit::ValidateParam($modulesItem['Description'], _STRING); |
591 | 1441 | $img = Kit::ValidateParam($modulesItem['ImageUri'], _STRING); | 1445 | $img = Kit::ValidateParam($modulesItem['ImageUri'], _STRING); |
592 | @@ -1445,7 +1449,7 @@ | |||
593 | 1445 | $buttons .= <<<HTML | 1449 | $buttons .= <<<HTML |
594 | 1446 | <div class="regionicons"> | 1450 | <div class="regionicons"> |
595 | 1447 | <a class="XiboFormButton" title="$title" href="$uri"> | 1451 | <a class="XiboFormButton" title="$title" href="$uri"> |
597 | 1448 | <img class="dash_button" src="$img" /> | 1452 | <img class="dash_button moduleButtonImage" src="$img" /> |
598 | 1449 | <span class="dash_text">$caption</span></a> | 1453 | <span class="dash_text">$caption</span></a> |
599 | 1450 | </div> | 1454 | </div> |
600 | 1451 | HTML; | 1455 | HTML; |
601 | @@ -1456,7 +1460,7 @@ | |||
602 | 1456 | <div id="buttons"> | 1460 | <div id="buttons"> |
603 | 1457 | <div class="regionicons"> | 1461 | <div class="regionicons"> |
604 | 1458 | <a class="XiboFormButton" href="index.php?p=content&q=LibraryAssignForm&layoutid=$this->layoutid®ionid=$regionid" title="Library"> | 1462 | <a class="XiboFormButton" href="index.php?p=content&q=LibraryAssignForm&layoutid=$this->layoutid®ionid=$regionid" title="Library"> |
606 | 1459 | <img class="region_button" src="img/forms/library.gif"/> | 1463 | <img class="region_button moduleButtonImage" src="img/forms/library.gif"/> |
607 | 1460 | <span class="region_text">Library</span></a> | 1464 | <span class="region_text">Library</span></a> |
608 | 1461 | </div> | 1465 | </div> |
609 | 1462 | $buttons | 1466 | $buttons |
610 | @@ -1635,7 +1639,7 @@ | |||
611 | 1635 | $type = (string) $node->getAttribute("type"); | 1639 | $type = (string) $node->getAttribute("type"); |
612 | 1636 | $mediaDurationText = (string) $node->getAttribute("duration"); | 1640 | $mediaDurationText = (string) $node->getAttribute("duration"); |
613 | 1637 | 1641 | ||
615 | 1638 | $return .= "<div class='info' style='display:none; position:absolute; top: 15px; left: 150px; background-color:#FFF; z-index: 50;'> | 1642 | $return .= "<div class='info regionTransparency' style='display:none; position:absolute; top: 15px; left: 150px; background-color:#FFF; z-index: 50;'> |
616 | 1639 | <h5>Media Information</h5> | 1643 | <h5>Media Information</h5> |
617 | 1640 | <ul> | 1644 | <ul> |
618 | 1641 | <li>Type: $type</li> | 1645 | <li>Type: $type</li> |
619 | 1642 | 1646 | ||
620 | === modified file 'server/lib/pages/report.class.php' | |||
621 | --- server/lib/pages/report.class.php 2009-03-13 10:10:07 +0000 | |||
622 | +++ server/lib/pages/report.class.php 2009-07-07 19:44:46 +0000 | |||
623 | @@ -210,9 +210,7 @@ | |||
624 | 210 | <td>$ip</td> | 210 | <td>$ip</td> |
625 | 211 | <td>$browser</td> | 211 | <td>$browser</td> |
626 | 212 | <td> | 212 | <td> |
630 | 213 | <div class="buttons"> | 213 | <button class="XiboFormButton" href="index.php?p=report&q=ConfirmLogout&userid=$userID"><span>Logout</span></a> |
628 | 214 | <a class="neutral" href="index.php?p=report&q=ConfirmLogout&userid=$userID" onclick="return init_button(this,'Logout User', exec_filter_callback, set_form_size(450,150))"><span>Logout</span></a> | ||
629 | 215 | </div> | ||
631 | 216 | </td> | 214 | </td> |
632 | 217 | </tr> | 215 | </tr> |
633 | 218 | END; | 216 | END; |
634 | @@ -234,14 +232,15 @@ | |||
635 | 234 | $userID = Kit::GetParam('userid', _GET, _INT); | 232 | $userID = Kit::GetParam('userid', _GET, _INT); |
636 | 235 | 233 | ||
637 | 236 | $form = <<<END | 234 | $form = <<<END |
639 | 237 | <form class="dialog_form" method="post" action="index.php?p=report&q=LogoutUser"> | 235 | <form class="XiboForm" method="post" action="index.php?p=report&q=LogoutUser"> |
640 | 238 | <input type="hidden" name="userid" value="userid" /> | 236 | <input type="hidden" name="userid" value="userid" /> |
641 | 239 | <p>Are you sure you want to logout this user?</p> | 237 | <p>Are you sure you want to logout this user?</p> |
642 | 240 | <input type="submit" value="Yes"> | 238 | <input type="submit" value="Yes"> |
643 | 241 | <input type="submit" value="No" onclick="$('#div_dialog').dialog('close');return false; "> | 239 | <input type="submit" value="No" onclick="$('#div_dialog').dialog('close');return false; "> |
644 | 242 | </form> | 240 | </form> |
645 | 243 | END; | 241 | END; |
647 | 244 | $arh->SetFormSubmitResponse($form); | 242 | |
648 | 243 | $arh->SetFormRequestResponse($form, 'Logout User', '450px', '300px'); | ||
649 | 245 | $arh->Respond(); | 244 | $arh->Respond(); |
650 | 246 | } | 245 | } |
651 | 247 | 246 | ||
652 | 248 | 247 | ||
653 | === added file 'server/modules/embedded.module.php' | |||
654 | --- server/modules/embedded.module.php 1970-01-01 00:00:00 +0000 | |||
655 | +++ server/modules/embedded.module.php 2009-06-20 10:05:53 +0000 | |||
656 | @@ -0,0 +1,251 @@ | |||
657 | 1 | <?php | ||
658 | 2 | /* | ||
659 | 3 | * Xibo - Digitial Signage - http://www.xibo.org.uk | ||
660 | 4 | * Copyright (C) 2009 Daniel Garner | ||
661 | 5 | * | ||
662 | 6 | * This file is part of Xibo. | ||
663 | 7 | * | ||
664 | 8 | * Xibo is free software: you can redistribute it and/or modify | ||
665 | 9 | * it under the terms of the GNU Affero General Public License as published by | ||
666 | 10 | * the Free Software Foundation, either version 3 of the License, or | ||
667 | 11 | * any later version. | ||
668 | 12 | * | ||
669 | 13 | * Xibo is distributed in the hope that it will be useful, | ||
670 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
671 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
672 | 16 | * GNU Affero General Public License for more details. | ||
673 | 17 | * | ||
674 | 18 | * You should have received a copy of the GNU Affero General Public License | ||
675 | 19 | * along with Xibo. If not, see <http://www.gnu.org/licenses/>. | ||
676 | 20 | */ | ||
677 | 21 | class embedded extends Module | ||
678 | 22 | { | ||
679 | 23 | |||
680 | 24 | public function __construct(database $db, user $user, $mediaid = '', $layoutid = '', $regionid = '') | ||
681 | 25 | { | ||
682 | 26 | // Must set the type of the class | ||
683 | 27 | $this->type = 'embedded'; | ||
684 | 28 | |||
685 | 29 | // Must call the parent class | ||
686 | 30 | parent::__construct($db, $user, $mediaid, $layoutid, $regionid); | ||
687 | 31 | } | ||
688 | 32 | |||
689 | 33 | /** | ||
690 | 34 | * Return the Add Form as HTML | ||
691 | 35 | * @return | ||
692 | 36 | */ | ||
693 | 37 | public function AddForm() | ||
694 | 38 | { | ||
695 | 39 | $db =& $this->db; | ||
696 | 40 | $user =& $this->user; | ||
697 | 41 | |||
698 | 42 | // Would like to get the regions width / height | ||
699 | 43 | $layoutid = $this->layoutid; | ||
700 | 44 | $regionid = $this->regionid; | ||
701 | 45 | $rWidth = Kit::GetParam('rWidth', _REQUEST, _STRING); | ||
702 | 46 | $rHeight = Kit::GetParam('rHeight', _REQUEST, _STRING); | ||
703 | 47 | |||
704 | 48 | $form = <<<FORM | ||
705 | 49 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=AddMedia"> | ||
706 | 50 | <input type="hidden" name="layoutid" value="$layoutid"> | ||
707 | 51 | <input type="hidden" id="iRegionId" name="regionid" value="$regionid"> | ||
708 | 52 | <table> | ||
709 | 53 | <tr> | ||
710 | 54 | <td><label for="duration" title="The duration in seconds this webpage should be displayed">Duration<span class="required">*</span></label></td> | ||
711 | 55 | <td><input id="duration" name="duration" type="text"></td> | ||
712 | 56 | </tr> | ||
713 | 57 | <tr> | ||
714 | 58 | <td colspan="2"> | ||
715 | 59 | <label for="embedHtml" title="The HTML you want to Embed in this Layout.">Embed HTML<span class="required">*</span></label><br /> | ||
716 | 60 | <textarea id="embedHtml" name="embedHtml"></textarea> | ||
717 | 61 | </td> | ||
718 | 62 | </tr> | ||
719 | 63 | <tr> | ||
720 | 64 | <td></td> | ||
721 | 65 | <td> | ||
722 | 66 | <input id="btnSave" type="submit" value="Save" /> | ||
723 | 67 | <input class="XiboFormButton" id="btnCancel" type="button" title="Return to the Region Options" href="index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions" value="Cancel" /> | ||
724 | 68 | </td> | ||
725 | 69 | </tr> | ||
726 | 70 | </table> | ||
727 | 71 | </form> | ||
728 | 72 | FORM; | ||
729 | 73 | |||
730 | 74 | $this->response->html = $form; | ||
731 | 75 | $this->response->dialogTitle = 'Add Embedded HTML'; | ||
732 | 76 | $this->response->dialogSize = true; | ||
733 | 77 | $this->response->dialogWidth = '650px'; | ||
734 | 78 | $this->response->dialogHeight = '450px'; | ||
735 | 79 | |||
736 | 80 | return $this->response; | ||
737 | 81 | } | ||
738 | 82 | |||
739 | 83 | /** | ||
740 | 84 | * Return the Edit Form as HTML | ||
741 | 85 | * @return | ||
742 | 86 | */ | ||
743 | 87 | public function EditForm() | ||
744 | 88 | { | ||
745 | 89 | $db =& $this->db; | ||
746 | 90 | |||
747 | 91 | $layoutid = $this->layoutid; | ||
748 | 92 | $regionid = $this->regionid; | ||
749 | 93 | $mediaid = $this->mediaid; | ||
750 | 94 | |||
751 | 95 | // Get the embedded HTML out of RAW | ||
752 | 96 | $rawXml = new DOMDocument(); | ||
753 | 97 | $rawXml->loadXML($this->GetRaw()); | ||
754 | 98 | |||
755 | 99 | Debug::LogEntry($db, 'audit', 'Raw XML returned: ' . $this->GetRaw()); | ||
756 | 100 | |||
757 | 101 | // Get the HTML Node out of this | ||
758 | 102 | $textNodes = $rawXml->getElementsByTagName('embedHtml'); | ||
759 | 103 | $textNode = $textNodes->item(0); | ||
760 | 104 | $embedHtml = $textNode->nodeValue; | ||
761 | 105 | |||
762 | 106 | //Output the form | ||
763 | 107 | $form = <<<FORM | ||
764 | 108 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> | ||
765 | 109 | <input type="hidden" name="layoutid" value="$layoutid"> | ||
766 | 110 | <input type="hidden" name="mediaid" value="$mediaid"> | ||
767 | 111 | <input type="hidden" id="iRegionId" name="regionid" value="$regionid"> | ||
768 | 112 | <table> | ||
769 | 113 | <tr> | ||
770 | 114 | <td><label for="duration" title="The duration in seconds this webpage should be displayed (may be overridden on each layout)">Duration<span class="required">*</span></label></td> | ||
771 | 115 | <td><input id="duration" name="duration" value="$this->duration" type="text"></td> | ||
772 | 116 | </tr> | ||
773 | 117 | <tr> | ||
774 | 118 | <td colspan="2"> | ||
775 | 119 | <label for="embedHtml" title="The HTML you want to Embed in this Layout.">Embed HTML<span class="required">*</span></label><br /> | ||
776 | 120 | <textarea id="embedHtml" name="embedHtml">$embedHtml</textarea> | ||
777 | 121 | </td> | ||
778 | 122 | </tr> | ||
779 | 123 | <tr> | ||
780 | 124 | <td></td> | ||
781 | 125 | <td> | ||
782 | 126 | <input id="btnSave" type="submit" value="Save" /> | ||
783 | 127 | <input class="XiboFormButton" id="btnCancel" type="button" title="Return to the Region Options" href="index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions" value="Cancel" /> | ||
784 | 128 | </td> | ||
785 | 129 | </tr> | ||
786 | 130 | </table> | ||
787 | 131 | </form> | ||
788 | 132 | FORM; | ||
789 | 133 | |||
790 | 134 | $this->response->html = $form; | ||
791 | 135 | $this->response->dialogTitle = 'Edit Embedded HTML'; | ||
792 | 136 | $this->response->dialogSize = true; | ||
793 | 137 | $this->response->dialogWidth = '650px'; | ||
794 | 138 | $this->response->dialogHeight = '450px'; | ||
795 | 139 | |||
796 | 140 | return $this->response; | ||
797 | 141 | } | ||
798 | 142 | |||
799 | 143 | /** | ||
800 | 144 | * Add Media to the Database | ||
801 | 145 | * @return | ||
802 | 146 | */ | ||
803 | 147 | public function AddMedia() | ||
804 | 148 | { | ||
805 | 149 | $db =& $this->db; | ||
806 | 150 | |||
807 | 151 | $layoutid = $this->layoutid; | ||
808 | 152 | $regionid = $this->regionid; | ||
809 | 153 | $mediaid = $this->mediaid; | ||
810 | 154 | |||
811 | 155 | //Other properties | ||
812 | 156 | $embedHtml = Kit::GetParam('embedHtml', _POST, _HTMLSTRING); | ||
813 | 157 | $duration = Kit::GetParam('duration', _POST, _INT, 0); | ||
814 | 158 | |||
815 | 159 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; | ||
816 | 160 | |||
817 | 161 | //Validate the URL? | ||
818 | 162 | if ($embedHtml == "") | ||
819 | 163 | { | ||
820 | 164 | $this->response->SetError('Please enter some HTML to embed.'); | ||
821 | 165 | $this->response->keepOpen = true; | ||
822 | 166 | return $this->response; | ||
823 | 167 | } | ||
824 | 168 | |||
825 | 169 | if ($duration == 0) | ||
826 | 170 | { | ||
827 | 171 | $this->response->SetError('You must enter a duration.'); | ||
828 | 172 | $this->response->keepOpen = true; | ||
829 | 173 | return $this->response; | ||
830 | 174 | } | ||
831 | 175 | |||
832 | 176 | // Required Attributes | ||
833 | 177 | $this->mediaid = md5(uniqid()); | ||
834 | 178 | $this->duration = $duration; | ||
835 | 179 | |||
836 | 180 | // Any Options | ||
837 | 181 | $this->SetRaw('<embedHtml><![CDATA[' . $embedHtml . ']]></embedHtml>'); | ||
838 | 182 | |||
839 | 183 | // Should have built the media object entirely by this time | ||
840 | 184 | // This saves the Media Object to the Region | ||
841 | 185 | $this->UpdateRegion(); | ||
842 | 186 | |||
843 | 187 | //Set this as the session information | ||
844 | 188 | setSession('content', 'type', $this->type); | ||
845 | 189 | |||
846 | 190 | // We want to load a new form | ||
847 | 191 | $this->response->loadForm = true; | ||
848 | 192 | $this->response->loadFormUri= $url; | ||
849 | 193 | |||
850 | 194 | return $this->response; | ||
851 | 195 | } | ||
852 | 196 | |||
853 | 197 | /** | ||
854 | 198 | * Edit Media in the Database | ||
855 | 199 | * @return | ||
856 | 200 | */ | ||
857 | 201 | public function EditMedia() | ||
858 | 202 | { | ||
859 | 203 | $db =& $this->db; | ||
860 | 204 | |||
861 | 205 | $layoutid = $this->layoutid; | ||
862 | 206 | $regionid = $this->regionid; | ||
863 | 207 | $mediaid = $this->mediaid; | ||
864 | 208 | |||
865 | 209 | //Other properties | ||
866 | 210 | $embedHtml = Kit::GetParam('embedHtml', _POST, _HTMLSTRING); | ||
867 | 211 | $duration = Kit::GetParam('duration', _POST, _INT, 0); | ||
868 | 212 | |||
869 | 213 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; | ||
870 | 214 | |||
871 | 215 | //Validate the URL? | ||
872 | 216 | if ($embedHtml == "") | ||
873 | 217 | { | ||
874 | 218 | $this->response->SetError('Please enter some HTML to embed.'); | ||
875 | 219 | $this->response->keepOpen = true; | ||
876 | 220 | return $this->response; | ||
877 | 221 | } | ||
878 | 222 | |||
879 | 223 | if ($duration == 0) | ||
880 | 224 | { | ||
881 | 225 | $this->response->SetError('You must enter a duration.'); | ||
882 | 226 | $this->response->keepOpen = true; | ||
883 | 227 | return $this->response; | ||
884 | 228 | } | ||
885 | 229 | |||
886 | 230 | // Required Attributes | ||
887 | 231 | $this->duration = $duration; | ||
888 | 232 | |||
889 | 233 | // Any Options | ||
890 | 234 | $this->SetRaw('<embedHtml><![CDATA[' . $embedHtml . ']]></embedHtml>'); | ||
891 | 235 | |||
892 | 236 | // Should have built the media object entirely by this time | ||
893 | 237 | // This saves the Media Object to the Region | ||
894 | 238 | $this->UpdateRegion(); | ||
895 | 239 | |||
896 | 240 | //Set this as the session information | ||
897 | 241 | setSession('content', 'type', $this->type); | ||
898 | 242 | |||
899 | 243 | // We want to load a new form | ||
900 | 244 | $this->response->loadForm = true; | ||
901 | 245 | $this->response->loadFormUri= $url; | ||
902 | 246 | |||
903 | 247 | return $this->response; | ||
904 | 248 | } | ||
905 | 249 | } | ||
906 | 250 | |||
907 | 251 | ?> | ||
908 | 0 | \ No newline at end of file | 252 | \ No newline at end of file |
909 | 1 | 253 | ||
910 | === modified file 'server/modules/flash.module.php' | |||
911 | --- server/modules/flash.module.php 2009-03-10 19:29:40 +0000 | |||
912 | +++ server/modules/flash.module.php 2009-05-24 09:59:49 +0000 | |||
913 | @@ -300,7 +300,8 @@ | |||
914 | 300 | <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span> | 300 | <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span> |
915 | 301 | </div> | 301 | </div> |
916 | 302 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> | 302 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> |
918 | 303 | <input type="hidden" name="MAX_FILE_SIZE" value="1048576000"> | 303 | <input type="hidden" name="hidFileID" id="hidFileID" value="" /> |
919 | 304 | <input type="hidden" id="txtFileName" name="txtFileName" readonly="true" /> | ||
920 | 304 | <input type="hidden" name="layoutid" value="$layoutid"> | 305 | <input type="hidden" name="layoutid" value="$layoutid"> |
921 | 305 | <input type="hidden" name="regionid" value="$regionid"> | 306 | <input type="hidden" name="regionid" value="$regionid"> |
922 | 306 | <input type="hidden" name="mediaid" value="$mediaid"> | 307 | <input type="hidden" name="mediaid" value="$mediaid"> |
923 | @@ -727,8 +728,17 @@ | |||
924 | 727 | 728 | ||
925 | 728 | $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid); | 729 | $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid); |
926 | 729 | 730 | ||
927 | 731 | if (!$new_mediaid = $db->insert_query($SQL)) | ||
928 | 732 | { | ||
929 | 733 | trigger_error($db->error()); | ||
930 | 734 | trigger_error('Error inserting replacement media record.', E_USER_ERROR); | ||
931 | 735 | } | ||
932 | 736 | |||
933 | 730 | //What are we going to store this media as... | 737 | //What are we going to store this media as... |
934 | 731 | $storedAs = $new_mediaid.".".$ext; | 738 | $storedAs = $new_mediaid.".".$ext; |
935 | 739 | |||
936 | 740 | // File upload directory.. get this from the settings object | ||
937 | 741 | $databaseDir = Config::GetSetting($db, "LIBRARY_LOCATION"); | ||
938 | 732 | 742 | ||
939 | 733 | //Now we need to move the file | 743 | //Now we need to move the file |
940 | 734 | if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs)) | 744 | if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs)) |
941 | @@ -754,9 +764,11 @@ | |||
942 | 754 | return $this->response; | 764 | return $this->response; |
943 | 755 | } | 765 | } |
944 | 756 | 766 | ||
948 | 757 | //Update the existing record with the new record's id | 767 | // Update the existing record with the new record's id |
949 | 758 | $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $mediaid "; | 768 | $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $new_mediaid "; |
950 | 759 | $SQL .= " WHERE editedMediaID = $mediaid and mediaID <> $new_mediaid "; | 769 | $SQL .= " WHERE IFNULL(editedMediaID,0) <> $new_mediaid AND mediaID = $mediaid "; |
951 | 770 | |||
952 | 771 | Debug::LogEntry($db, 'audit', $SQL); | ||
953 | 760 | 772 | ||
954 | 761 | if (!$db->query($SQL)) | 773 | if (!$db->query($SQL)) |
955 | 762 | { | 774 | { |
956 | 763 | 775 | ||
957 | === modified file 'server/modules/image.module.php' | |||
958 | --- server/modules/image.module.php 2009-03-08 00:23:29 +0000 | |||
959 | +++ server/modules/image.module.php 2009-05-24 09:59:49 +0000 | |||
960 | @@ -300,7 +300,8 @@ | |||
961 | 300 | <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span> | 300 | <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span> |
962 | 301 | </div> | 301 | </div> |
963 | 302 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> | 302 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> |
965 | 303 | <input type="hidden" name="MAX_FILE_SIZE" value="1048576000"> | 303 | <input type="hidden" name="hidFileID" id="hidFileID" value="" /> |
966 | 304 | <input type="hidden" id="txtFileName" name="txtFileName" readonly="true" /> | ||
967 | 304 | <input type="hidden" name="layoutid" value="$layoutid"> | 305 | <input type="hidden" name="layoutid" value="$layoutid"> |
968 | 305 | <input type="hidden" name="regionid" value="$regionid"> | 306 | <input type="hidden" name="regionid" value="$regionid"> |
969 | 306 | <input type="hidden" name="mediaid" value="$mediaid"> | 307 | <input type="hidden" name="mediaid" value="$mediaid"> |
970 | @@ -729,9 +730,18 @@ | |||
971 | 729 | $SQL .= "VALUES ('%s', 'image', '%s', '%s', %d, %d, 0) "; | 730 | $SQL .= "VALUES ('%s', 'image', '%s', '%s', %d, %d, 0) "; |
972 | 730 | 731 | ||
973 | 731 | $SQL = sprintf($SQL, $db->escape_string($name), $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid); | 732 | $SQL = sprintf($SQL, $db->escape_string($name), $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid); |
974 | 733 | |||
975 | 734 | if (!$new_mediaid = $db->insert_query($SQL)) | ||
976 | 735 | { | ||
977 | 736 | trigger_error($db->error()); | ||
978 | 737 | trigger_error('Error inserting replacement media record.', E_USER_ERROR); | ||
979 | 738 | } | ||
980 | 732 | 739 | ||
981 | 733 | //What are we going to store this media as... | 740 | //What are we going to store this media as... |
982 | 734 | $storedAs = $new_mediaid.".".$ext; | 741 | $storedAs = $new_mediaid.".".$ext; |
983 | 742 | |||
984 | 743 | // File upload directory.. get this from the settings object | ||
985 | 744 | $databaseDir = Config::GetSetting($db, "LIBRARY_LOCATION"); | ||
986 | 735 | 745 | ||
987 | 736 | //Now we need to move the file | 746 | //Now we need to move the file |
988 | 737 | if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs)) | 747 | if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs)) |
989 | @@ -764,9 +774,11 @@ | |||
990 | 764 | ResizeImage($databaseDir.$storedAs, $databaseDir."tn_".$storedAs, 80, 80); | 774 | ResizeImage($databaseDir.$storedAs, $databaseDir."tn_".$storedAs, 80, 80); |
991 | 765 | } | 775 | } |
992 | 766 | 776 | ||
996 | 767 | //Update the existing record with the new record's id | 777 | // Update the existing record with the new record's id |
997 | 768 | $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $mediaid "; | 778 | $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $new_mediaid "; |
998 | 769 | $SQL .= " WHERE editedMediaID = $mediaid and mediaID <> $new_mediaid "; | 779 | $SQL .= " WHERE IFNULL(editedMediaID,0) <> $new_mediaid AND mediaID = $mediaid "; |
999 | 780 | |||
1000 | 781 | Debug::LogEntry($db, 'audit', $SQL); | ||
1001 | 770 | 782 | ||
1002 | 771 | if (!$db->query($SQL)) | 783 | if (!$db->query($SQL)) |
1003 | 772 | { | 784 | { |
1004 | 773 | 785 | ||
1005 | === modified file 'server/modules/module_user_general.php' | |||
1006 | --- server/modules/module_user_general.php 2009-03-25 19:36:36 +0000 | |||
1007 | +++ server/modules/module_user_general.php 2009-07-07 20:01:49 +0000 | |||
1008 | @@ -89,8 +89,6 @@ | |||
1009 | 89 | 89 | ||
1010 | 90 | $sql = sprintf("SELECT UserID, UserName, UserPassword, usertypeid, groupID FROM user WHERE UserName = '%s' AND UserPassword = '%s'", $db->escape_string($username), $db->escape_string($password)); | 90 | $sql = sprintf("SELECT UserID, UserName, UserPassword, usertypeid, groupID FROM user WHERE UserName = '%s' AND UserPassword = '%s'", $db->escape_string($username), $db->escape_string($password)); |
1011 | 91 | 91 | ||
1012 | 92 | Debug::LogEntry($db, 'audit', $sql); | ||
1013 | 93 | |||
1014 | 94 | if(!$result = $db->query($sql)) trigger_error('A database error occurred while checking your login details.', E_USER_ERROR); | 92 | if(!$result = $db->query($sql)) trigger_error('A database error occurred while checking your login details.', E_USER_ERROR); |
1015 | 95 | 93 | ||
1016 | 96 | if ($db->num_rows($result)==0) | 94 | if ($db->num_rows($result)==0) |
1017 | @@ -122,6 +120,7 @@ | |||
1018 | 122 | $db->query($SQL) or trigger_error("Can not write last accessed info.", E_USER_ERROR); | 120 | $db->query($SQL) or trigger_error("Can not write last accessed info.", E_USER_ERROR); |
1019 | 123 | 121 | ||
1020 | 124 | $session->setIsExpired(0); | 122 | $session->setIsExpired(0); |
1021 | 123 | $session->RegenerateSessionID(session_id()); | ||
1022 | 125 | 124 | ||
1023 | 126 | return true; | 125 | return true; |
1024 | 127 | } | 126 | } |
1025 | 128 | 127 | ||
1026 | === modified file 'server/modules/powerpoint.module.php' | |||
1027 | --- server/modules/powerpoint.module.php 2009-03-10 19:29:40 +0000 | |||
1028 | +++ server/modules/powerpoint.module.php 2009-05-24 09:59:49 +0000 | |||
1029 | @@ -300,7 +300,8 @@ | |||
1030 | 300 | <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span> | 300 | <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span> |
1031 | 301 | </div> | 301 | </div> |
1032 | 302 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> | 302 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> |
1034 | 303 | <input type="hidden" name="MAX_FILE_SIZE" value="1048576000"> | 303 | <input type="hidden" name="hidFileID" id="hidFileID" value="" /> |
1035 | 304 | <input type="hidden" id="txtFileName" name="txtFileName" readonly="true" /> | ||
1036 | 304 | <input type="hidden" name="layoutid" value="$layoutid"> | 305 | <input type="hidden" name="layoutid" value="$layoutid"> |
1037 | 305 | <input type="hidden" name="regionid" value="$regionid"> | 306 | <input type="hidden" name="regionid" value="$regionid"> |
1038 | 306 | <input type="hidden" name="mediaid" value="$mediaid"> | 307 | <input type="hidden" name="mediaid" value="$mediaid"> |
1039 | @@ -726,9 +727,18 @@ | |||
1040 | 726 | $SQL .= "VALUES ('%s', '%s', '%s', '%s', %d, %d, 0) "; | 727 | $SQL .= "VALUES ('%s', '%s', '%s', '%s', %d, %d, 0) "; |
1041 | 727 | 728 | ||
1042 | 728 | $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid); | 729 | $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid); |
1043 | 730 | |||
1044 | 731 | if (!$new_mediaid = $db->insert_query($SQL)) | ||
1045 | 732 | { | ||
1046 | 733 | trigger_error($db->error()); | ||
1047 | 734 | trigger_error('Error inserting replacement media record.', E_USER_ERROR); | ||
1048 | 735 | } | ||
1049 | 729 | 736 | ||
1050 | 730 | //What are we going to store this media as... | 737 | //What are we going to store this media as... |
1051 | 731 | $storedAs = $new_mediaid.".".$ext; | 738 | $storedAs = $new_mediaid.".".$ext; |
1052 | 739 | |||
1053 | 740 | // File upload directory.. get this from the settings object | ||
1054 | 741 | $databaseDir = Config::GetSetting($db, "LIBRARY_LOCATION"); | ||
1055 | 732 | 742 | ||
1056 | 733 | //Now we need to move the file | 743 | //Now we need to move the file |
1057 | 734 | if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs)) | 744 | if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs)) |
1058 | @@ -754,9 +764,11 @@ | |||
1059 | 754 | return $this->response; | 764 | return $this->response; |
1060 | 755 | } | 765 | } |
1061 | 756 | 766 | ||
1065 | 757 | //Update the existing record with the new record's id | 767 | // Update the existing record with the new record's id |
1066 | 758 | $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $mediaid "; | 768 | $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $new_mediaid "; |
1067 | 759 | $SQL .= " WHERE editedMediaID = $mediaid and mediaID <> $new_mediaid "; | 769 | $SQL .= " WHERE IFNULL(editedMediaID,0) <> $new_mediaid AND mediaID = $mediaid "; |
1068 | 770 | |||
1069 | 771 | Debug::LogEntry($db, 'audit', $SQL); | ||
1070 | 760 | 772 | ||
1071 | 761 | if (!$db->query($SQL)) | 773 | if (!$db->query($SQL)) |
1072 | 762 | { | 774 | { |
1073 | 763 | 775 | ||
1074 | === modified file 'server/modules/ticker.module.php' | |||
1075 | --- server/modules/ticker.module.php 2009-03-13 09:30:23 +0000 | |||
1076 | +++ server/modules/ticker.module.php 2009-06-18 18:36:21 +0000 | |||
1077 | @@ -48,7 +48,7 @@ | |||
1078 | 48 | $rWidth = Kit::GetParam('rWidth', _REQUEST, _STRING); | 48 | $rWidth = Kit::GetParam('rWidth', _REQUEST, _STRING); |
1079 | 49 | $rHeight = Kit::GetParam('rHeight', _REQUEST, _STRING); | 49 | $rHeight = Kit::GetParam('rHeight', _REQUEST, _STRING); |
1080 | 50 | 50 | ||
1082 | 51 | $direction_list = listcontent("none|None,left|Left,right|Right,up|Up,down|Down", "direction"); | 51 | $direction_list = listcontent("none|None,left|Left,right|Right,up|Up,down|Down,single|Single", "direction"); |
1083 | 52 | 52 | ||
1084 | 53 | $form = <<<FORM | 53 | $form = <<<FORM |
1085 | 54 | <form class="XiboTextForm" method="post" action="index.php?p=module&mod=ticker&q=Exec&method=AddMedia"> | 54 | <form class="XiboTextForm" method="post" action="index.php?p=module&mod=ticker&q=Exec&method=AddMedia"> |
1086 | @@ -68,6 +68,12 @@ | |||
1087 | 68 | <td><input id="duration" name="duration" type="text"></td> | 68 | <td><input id="duration" name="duration" type="text"></td> |
1088 | 69 | </tr> | 69 | </tr> |
1089 | 70 | <tr> | 70 | <tr> |
1090 | 71 | <td><label for="scrollSpeed" title="The scroll speed of the ticker.">Scroll Speed<span class="required">*</span> (lower is faster)</label></td> | ||
1091 | 72 | <td><input id="scrollSpeed" name="scrollSpeed" type="text" value="30"></td> | ||
1092 | 73 | <td><label for="updateInterval" title="The Interval at which the client should cache the feed.">Update Interval (mins)<span class="required">*</span></label></td> | ||
1093 | 74 | <td><input id="updateInterval" name="updateInterval" type="text" value="360"></td> | ||
1094 | 75 | </tr> | ||
1095 | 76 | <tr> | ||
1096 | 71 | <td colspan="4"> | 77 | <td colspan="4"> |
1097 | 72 | <textarea id="ta_text" name="ta_text"> | 78 | <textarea id="ta_text" name="ta_text"> |
1098 | 73 | [Title] - [Date] - [Description] | 79 | [Title] - [Date] - [Description] |
1099 | @@ -104,9 +110,11 @@ | |||
1100 | 104 | $regionid = $this->regionid; | 110 | $regionid = $this->regionid; |
1101 | 105 | $mediaid = $this->mediaid; | 111 | $mediaid = $this->mediaid; |
1102 | 106 | 112 | ||
1106 | 107 | $direction = $this->GetOption('direction'); | 113 | $direction = $this->GetOption('direction'); |
1107 | 108 | $copyright = $this->GetOption('copyright'); | 114 | $copyright = $this->GetOption('copyright'); |
1108 | 109 | $uri = urldecode($this->GetOption('uri')); | 115 | $scrollSpeed = $this->GetOption('scrollSpeed'); |
1109 | 116 | $updateInterval = $this->GetOption('updateInterval'); | ||
1110 | 117 | $uri = urldecode($this->GetOption('uri')); | ||
1111 | 110 | 118 | ||
1112 | 111 | // Get the text out of RAW | 119 | // Get the text out of RAW |
1113 | 112 | $rawXml = new DOMDocument(); | 120 | $rawXml = new DOMDocument(); |
1114 | @@ -119,7 +127,7 @@ | |||
1115 | 119 | $textNode = $textNodes->item(0); | 127 | $textNode = $textNodes->item(0); |
1116 | 120 | $text = $textNode->nodeValue; | 128 | $text = $textNode->nodeValue; |
1117 | 121 | 129 | ||
1119 | 122 | $direction_list = listcontent("none|None,left|Left,right|Right,up|Up,down|Down", "direction", $direction); | 130 | $direction_list = listcontent("none|None,left|Left,right|Right,up|Up,down|Down,single|Single", "direction", $direction); |
1120 | 123 | 131 | ||
1121 | 124 | //Output the form | 132 | //Output the form |
1122 | 125 | $form = <<<FORM | 133 | $form = <<<FORM |
1123 | @@ -141,6 +149,12 @@ | |||
1124 | 141 | <td><input id="duration" name="duration" value="$this->duration" type="text"></td> | 149 | <td><input id="duration" name="duration" value="$this->duration" type="text"></td> |
1125 | 142 | </tr> | 150 | </tr> |
1126 | 143 | <tr> | 151 | <tr> |
1127 | 152 | <td><label for="scrollSpeed" title="The scroll speed of the ticker.">Scroll Speed<span class="required">*</span> (lower is faster)</label></td> | ||
1128 | 153 | <td><input id="scrollSpeed" name="scrollSpeed" type="text" value="$scrollSpeed"></td> | ||
1129 | 154 | <td><label for="updateInterval" title="The Interval at which the client should cache the feed.">Update Interval (mins)<span class="required">*</span></label></td> | ||
1130 | 155 | <td><input id="updateInterval" name="updateInterval" type="text" value="$updateInterval"></td> | ||
1131 | 156 | </tr> | ||
1132 | 157 | <tr> | ||
1133 | 144 | <td colspan="4"> | 158 | <td colspan="4"> |
1134 | 145 | <textarea id="ta_text" name="ta_text">$text</textarea> | 159 | <textarea id="ta_text" name="ta_text">$text</textarea> |
1135 | 146 | </td> | 160 | </td> |
1136 | @@ -179,6 +193,8 @@ | |||
1137 | 179 | $uri = Kit::GetParam('uri', _POST, _URI); | 193 | $uri = Kit::GetParam('uri', _POST, _URI); |
1138 | 180 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); | 194 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); |
1139 | 181 | $duration = Kit::GetParam('duration', _POST, _INT, 0); | 195 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
1140 | 196 | $scrollSpeed = Kit::GetParam('scrollSpeed', _POST, _INT, 30); | ||
1141 | 197 | $updateInterval = Kit::GetParam('updateInterval', _POST, _INT, 360); | ||
1142 | 182 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); | 198 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); |
1143 | 183 | $copyright = Kit::GetParam('copyright', _POST, _STRING); | 199 | $copyright = Kit::GetParam('copyright', _POST, _STRING); |
1144 | 184 | 200 | ||
1145 | @@ -214,6 +230,8 @@ | |||
1146 | 214 | // Any Options | 230 | // Any Options |
1147 | 215 | $this->SetOption('direction', $direction); | 231 | $this->SetOption('direction', $direction); |
1148 | 216 | $this->SetOption('copyright', $copyright); | 232 | $this->SetOption('copyright', $copyright); |
1149 | 233 | $this->SetOption('scrollSpeed', $scrollSpeed); | ||
1150 | 234 | $this->SetOption('updateInterval', $updateInterval); | ||
1151 | 217 | $this->SetOption('uri', $uri); | 235 | $this->SetOption('uri', $uri); |
1152 | 218 | 236 | ||
1153 | 219 | $this->SetRaw('<template><![CDATA[' . $text . ']]></template>'); | 237 | $this->SetRaw('<template><![CDATA[' . $text . ']]></template>'); |
1154 | @@ -249,6 +267,8 @@ | |||
1155 | 249 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); | 267 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); |
1156 | 250 | $duration = Kit::GetParam('duration', _POST, _INT, 0); | 268 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
1157 | 251 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); | 269 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); |
1158 | 270 | $scrollSpeed = Kit::GetParam('scrollSpeed', _POST, _INT, 30); | ||
1159 | 271 | $updateInterval = Kit::GetParam('updateInterval', _POST, _INT, 360); | ||
1160 | 252 | $copyright = Kit::GetParam('copyright', _POST, _STRING); | 272 | $copyright = Kit::GetParam('copyright', _POST, _STRING); |
1161 | 253 | 273 | ||
1162 | 254 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; | 274 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; |
1163 | @@ -282,6 +302,8 @@ | |||
1164 | 282 | // Any Options | 302 | // Any Options |
1165 | 283 | $this->SetOption('direction', $direction); | 303 | $this->SetOption('direction', $direction); |
1166 | 284 | $this->SetOption('copyright', $copyright); | 304 | $this->SetOption('copyright', $copyright); |
1167 | 305 | $this->SetOption('scrollSpeed', $scrollSpeed); | ||
1168 | 306 | $this->SetOption('updateInterval', $updateInterval); | ||
1169 | 285 | $this->SetOption('uri', $uri); | 307 | $this->SetOption('uri', $uri); |
1170 | 286 | 308 | ||
1171 | 287 | $this->SetRaw('<template><![CDATA[' . $text . ']]></template>'); | 309 | $this->SetRaw('<template><![CDATA[' . $text . ']]></template>'); |
1172 | 288 | 310 | ||
1173 | === modified file 'server/modules/video.module.php' | |||
1174 | --- server/modules/video.module.php 2009-04-01 18:31:33 +0000 | |||
1175 | +++ server/modules/video.module.php 2009-05-24 09:59:49 +0000 | |||
1176 | @@ -300,11 +300,12 @@ | |||
1177 | 300 | <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span> | 300 | <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span> |
1178 | 301 | </div> | 301 | </div> |
1179 | 302 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> | 302 | <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia"> |
1180 | 303 | <input type="hidden" name="MAX_FILE_SIZE" value="1048576000"> | ||
1181 | 304 | <input type="hidden" name="layoutid" value="$layoutid"> | 303 | <input type="hidden" name="layoutid" value="$layoutid"> |
1182 | 305 | <input type="hidden" name="regionid" value="$regionid"> | 304 | <input type="hidden" name="regionid" value="$regionid"> |
1183 | 306 | <input type="hidden" name="mediaid" value="$mediaid"> | 305 | <input type="hidden" name="mediaid" value="$mediaid"> |
1184 | 307 | <input type="hidden" name="lkid" value="$lkid"> | 306 | <input type="hidden" name="lkid" value="$lkid"> |
1185 | 307 | <input type="hidden" name="hidFileID" id="hidFileID" value="" /> | ||
1186 | 308 | <input type="hidden" id="txtFileName" name="txtFileName" readonly="true" /> | ||
1187 | 308 | <input type="hidden" id="PHPSESSID" value="$sessionId" /> | 309 | <input type="hidden" id="PHPSESSID" value="$sessionId" /> |
1188 | 309 | <input type="hidden" id="SecurityToken" value="$securityToken" /> | 310 | <input type="hidden" id="SecurityToken" value="$securityToken" /> |
1189 | 310 | <table> | 311 | <table> |
1190 | @@ -713,9 +714,18 @@ | |||
1191 | 713 | $SQL .= "VALUES ('%s', '%s', '%s', '%s', %d, %d, 0) "; | 714 | $SQL .= "VALUES ('%s', '%s', '%s', '%s', %d, %d, 0) "; |
1192 | 714 | 715 | ||
1193 | 715 | $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid); | 716 | $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid); |
1194 | 717 | |||
1195 | 718 | if (!$new_mediaid = $db->insert_query($SQL)) | ||
1196 | 719 | { | ||
1197 | 720 | trigger_error($db->error()); | ||
1198 | 721 | trigger_error('Error inserting replacement media record.', E_USER_ERROR); | ||
1199 | 722 | } | ||
1200 | 716 | 723 | ||
1201 | 717 | //What are we going to store this media as... | 724 | //What are we going to store this media as... |
1202 | 718 | $storedAs = $new_mediaid.".".$ext; | 725 | $storedAs = $new_mediaid.".".$ext; |
1203 | 726 | |||
1204 | 727 | // File upload directory.. get this from the settings object | ||
1205 | 728 | $databaseDir = Config::GetSetting($db, "LIBRARY_LOCATION"); | ||
1206 | 719 | 729 | ||
1207 | 720 | //Now we need to move the file | 730 | //Now we need to move the file |
1208 | 721 | if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs)) | 731 | if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs)) |
1209 | @@ -731,7 +741,7 @@ | |||
1210 | 731 | } | 741 | } |
1211 | 732 | } | 742 | } |
1212 | 733 | 743 | ||
1214 | 734 | //Update the media record to include this information | 744 | // Update the media record to include this information |
1215 | 735 | $SQL = "UPDATE media SET storedAs = '$storedAs' WHERE mediaid = $new_mediaid"; | 745 | $SQL = "UPDATE media SET storedAs = '$storedAs' WHERE mediaid = $new_mediaid"; |
1216 | 736 | if (!$db->query($SQL)) | 746 | if (!$db->query($SQL)) |
1217 | 737 | { | 747 | { |
1218 | @@ -741,9 +751,11 @@ | |||
1219 | 741 | return $this->response; | 751 | return $this->response; |
1220 | 742 | } | 752 | } |
1221 | 743 | 753 | ||
1225 | 744 | //Update the existing record with the new record's id | 754 | // Update the existing record with the new record's id |
1226 | 745 | $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $mediaid "; | 755 | $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $new_mediaid "; |
1227 | 746 | $SQL .= " WHERE editedMediaID = $mediaid and mediaID <> $new_mediaid "; | 756 | $SQL .= " WHERE IFNULL(editedMediaID,0) <> $new_mediaid AND mediaID = $mediaid "; |
1228 | 757 | |||
1229 | 758 | Debug::LogEntry($db, 'audit', $SQL); | ||
1230 | 747 | 759 | ||
1231 | 748 | if (!$db->query($SQL)) | 760 | if (!$db->query($SQL)) |
1232 | 749 | { | 761 | { |
1233 | 750 | 762 | ||
1234 | === modified file 'server/template/css/presentation.css' | |||
1235 | --- server/template/css/presentation.css 2009-01-04 12:59:11 +0000 | |||
1236 | +++ server/template/css/presentation.css 2009-06-20 09:34:43 +0000 | |||
1237 | @@ -1153,6 +1153,21 @@ | |||
1238 | 1153 | margin-left:9px; | 1153 | margin-left:9px; |
1239 | 1154 | } | 1154 | } |
1240 | 1155 | 1155 | ||
1241 | 1156 | .timebar_embedded_left{ | ||
1242 | 1157 | background:url(../../img/forms/green_bar.gif) no-repeat; | ||
1243 | 1158 | background-position:top left; | ||
1244 | 1159 | height:59px; | ||
1245 | 1160 | width:9px; | ||
1246 | 1161 | float:left; | ||
1247 | 1162 | } | ||
1248 | 1163 | |||
1249 | 1164 | .timebar_embedded_right{ | ||
1250 | 1165 | background:url(../../img/forms/green_bar.gif) no-repeat; | ||
1251 | 1166 | background-position:top right; | ||
1252 | 1167 | height:59px; | ||
1253 | 1168 | margin-left:9px; | ||
1254 | 1169 | } | ||
1255 | 1170 | |||
1256 | 1156 | .timebar_text_left{ | 1171 | .timebar_text_left{ |
1257 | 1157 | background:url(../../img/forms/yellow_bar.gif) no-repeat; | 1172 | background:url(../../img/forms/yellow_bar.gif) no-repeat; |
1258 | 1158 | background-position:top left; | 1173 | background-position:top left; |
1259 | 1159 | 1174 | ||
1260 | === modified file 'server/template/css/xibo.css' | |||
1261 | --- server/template/css/xibo.css 2009-03-22 17:58:21 +0000 | |||
1262 | +++ server/template/css/xibo.css 2009-06-20 12:00:21 +0000 | |||
1263 | @@ -41,3 +41,19 @@ | |||
1264 | 41 | .ReportFault ol li { | 41 | .ReportFault ol li { |
1265 | 42 | display: list-item; | 42 | display: list-item; |
1266 | 43 | } | 43 | } |
1267 | 44 | |||
1268 | 45 | .moduleButtonImage { | ||
1269 | 46 | width: 65px; | ||
1270 | 47 | } | ||
1271 | 48 | |||
1272 | 49 | #embedHtml { | ||
1273 | 50 | width: 500px; | ||
1274 | 51 | height: 310px; | ||
1275 | 52 | } | ||
1276 | 53 | |||
1277 | 54 | .regionTransparency { | ||
1278 | 55 | position: absolute; | ||
1279 | 56 | background-color: #FFF; | ||
1280 | 57 | opacity: .75; | ||
1281 | 58 | filter: alpha(opacity=75); | ||
1282 | 59 | } | ||
1283 | 44 | 60 | ||
1284 | === modified file 'server/upgrade.php' | |||
1285 | --- server/upgrade.php 2009-05-02 10:12:58 +0000 | |||
1286 | +++ server/upgrade.php 2009-06-15 08:16:19 +0000 | |||
1287 | @@ -249,6 +249,7 @@ | |||
1288 | 249 | backup_tables($db, '*'); | 249 | backup_tables($db, '*'); |
1289 | 250 | echo '</p>'; | 250 | echo '</p>'; |
1290 | 251 | 251 | ||
1291 | 252 | $sqlStatementCount = 0; | ||
1292 | 252 | // Now loop over the entire upgrade. Run the SQLs and PHP interleaved. | 253 | // Now loop over the entire upgrade. Run the SQLs and PHP interleaved. |
1293 | 253 | for ($i=$_SESSION['upgradeFrom'] + 1; (($i <= $_SESSION['upgradeTo']) && ($fault==false)) ; $i++) { | 254 | for ($i=$_SESSION['upgradeFrom'] + 1; (($i <= $_SESSION['upgradeTo']) && ($fault==false)) ; $i++) { |
1294 | 254 | if (file_exists('install/database/' . $i . '.sql')) { | 255 | if (file_exists('install/database/' . $i . '.sql')) { |
1295 | @@ -260,11 +261,12 @@ | |||
1296 | 260 | $sql_file = split_sql_file($sql_file, $delimiter); | 261 | $sql_file = split_sql_file($sql_file, $delimiter); |
1297 | 261 | 262 | ||
1298 | 262 | foreach ($sql_file as $sql) { | 263 | foreach ($sql_file as $sql) { |
1300 | 263 | print "."; | 264 | print "."; |
1301 | 265 | $sqlStatementCount++; | ||
1302 | 264 | flush(); | 266 | flush(); |
1303 | 265 | if (! $db->query($sql)) { | 267 | if (! $db->query($sql)) { |
1306 | 266 | $fault = true; | 268 | $fault = true; |
1307 | 267 | reportError("0", "An error occured populating the database.<br /><br />MySQL Error:<br />" . $db->error()); | 269 | reportError("0", "An error occured populating the database.<br /><br />MySQL Error:<br />" . $db->error() . "<br /><br />SQL executed:<br />" . $sql . "<br /><br />Statement number: " . $sqlStatementCount); |
1308 | 268 | } | 270 | } |
1309 | 269 | } | 271 | } |
1310 | 270 | echo '</p>'; | 272 | echo '</p>'; |
1311 | 271 | 273 | ||
1312 | === modified file 'server/xmds.php' | |||
1313 | --- server/xmds.php 2009-03-30 18:34:54 +0000 | |||
1314 | +++ server/xmds.php 2009-06-03 11:55:05 +0000 | |||
1315 | @@ -374,7 +374,12 @@ | |||
1316 | 374 | if (Config::GetSetting($db,'PHONE_HOME') == 'On') { | 374 | if (Config::GetSetting($db,'PHONE_HOME') == 'On') { |
1317 | 375 | // Find out when we last PHONED_HOME :D | 375 | // Find out when we last PHONED_HOME :D |
1318 | 376 | // If it's been > 28 days since last PHONE_HOME then | 376 | // If it's been > 28 days since last PHONE_HOME then |
1320 | 377 | if (Config::GetSetting($db,'PHONE_HOME_DATE') < (time() - (60 * 60 * 24 * 28))) { | 377 | if (Config::GetSetting($db,'PHONE_HOME_DATE') < (time() - (60 * 60 * 24 * 28))) { |
1321 | 378 | |||
1322 | 379 | if ($displayInfo['isAuditing'] == 1) | ||
1323 | 380 | { | ||
1324 | 381 | Debug::LogEntry($db, "audit", "PHONE_HOME [IN]", "xmds", "RequiredFiles"); | ||
1325 | 382 | } | ||
1326 | 378 | 383 | ||
1327 | 379 | // Retrieve number of displays | 384 | // Retrieve number of displays |
1328 | 380 | $SQL = "SELECT COUNT(*) | 385 | $SQL = "SELECT COUNT(*) |
1329 | @@ -397,9 +402,7 @@ | |||
1330 | 397 | if ($displayInfo['isAuditing'] == 1) | 402 | if ($displayInfo['isAuditing'] == 1) |
1331 | 398 | { | 403 | { |
1332 | 399 | Debug::LogEntry($db, "audit", "PHONE_HOME_URL " . $PHONE_HOME_URL , "xmds", "RequiredFiles"); | 404 | Debug::LogEntry($db, "audit", "PHONE_HOME_URL " . $PHONE_HOME_URL , "xmds", "RequiredFiles"); |
1336 | 400 | } | 405 | } |
1334 | 401 | |||
1335 | 402 | @file_get_contents($PHONE_HOME_URL); | ||
1337 | 403 | 406 | ||
1338 | 404 | // Set PHONE_HOME_TIME to NOW. | 407 | // Set PHONE_HOME_TIME to NOW. |
1339 | 405 | $SQL = "UPDATE `setting` | 408 | $SQL = "UPDATE `setting` |
1340 | @@ -410,6 +413,13 @@ | |||
1341 | 410 | { | 413 | { |
1342 | 411 | trigger_error($db->error()); | 414 | trigger_error($db->error()); |
1343 | 412 | } | 415 | } |
1344 | 416 | |||
1345 | 417 | @file_get_contents($PHONE_HOME_URL); | ||
1346 | 418 | |||
1347 | 419 | if ($displayInfo['isAuditing'] == 1) | ||
1348 | 420 | { | ||
1349 | 421 | Debug::LogEntry($db, "audit", "PHONE_HOME [OUT]", "xmds", "RequiredFiles"); | ||
1350 | 422 | } | ||
1351 | 413 | //endif | 423 | //endif |
1352 | 414 | } | 424 | } |
1353 | 415 | } | 425 | } |