Merge lp:~dangarner/xibo/393062 into lp:~xibo-maintainers/xibo/encke

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

Subscribers

People subscribed via source and target branches