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