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

Proposed by Dan Garner
Status: Merged
Merged at revision: not available
Proposed branch: lp:~dangarner/xibo/396735
Merge into: lp:~xibo-maintainers/xibo/encke
Diff against target: None lines
To merge this branch: bzr merge lp:~dangarner/xibo/396735
Reviewer Review Type Date Requested Status
Xibo Maintainters Pending
Review via email: mp+8783@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
=== modified file '.bzrignore'
--- .bzrignore 2009-03-07 23:21:15 +0000
+++ .bzrignore 2009-06-20 10:05:53 +0000
@@ -1,3 +1,4 @@
1server/settings.php1server/settings.php
2.project2.project
3server/.project3server/.project
4Thumbs.db
45
=== modified file 'client/dotNET/Region.cs'
--- client/dotNET/Region.cs 2009-03-08 11:40:17 +0000
+++ client/dotNET/Region.cs 2009-06-20 10:05:53 +0000
@@ -124,6 +124,10 @@
124 media = new Rss(options);124 media = new Rss(options);
125 break;125 break;
126126
127 case "embedded":
128 media = new Text(options);
129 break;
130
127 default:131 default:
128 //do nothing132 //do nothing
129 SetNextMediaNode();133 SetNextMediaNode();
@@ -197,7 +201,10 @@
197 options.text = "";201 options.text = "";
198 options.documentTemplate = "";202 options.documentTemplate = "";
199 options.copyrightNotice = "";203 options.copyrightNotice = "";
204 options.scrollSpeed = 1;
205 options.updateInterval = 6;
200 options.uri = "";206 options.uri = "";
207 options.direction = "none";
201208
202 // Get a media node209 // Get a media node
203 bool validNode = false;210 bool validNode = false;
@@ -266,6 +273,28 @@
266 {273 {
267 options.copyrightNotice = option.InnerText;274 options.copyrightNotice = option.InnerText;
268 }275 }
276 else if (option.Name == "scrollSpeed")
277 {
278 try
279 {
280 options.scrollSpeed = int.Parse(option.InnerText);
281 }
282 catch
283 {
284 System.Diagnostics.Trace.WriteLine("Non integer scrollSpeed in XLF", "Region - SetNextMediaNode");
285 }
286 }
287 else if (option.Name == "updateInverval")
288 {
289 try
290 {
291 options.updateInterval = int.Parse(option.InnerText);
292 }
293 catch
294 {
295 System.Diagnostics.Trace.WriteLine("Non integer updateInterval in XLF", "Region - SetNextMediaNode");
296 }
297 }
269 }298 }
270299
271 // And some stuff on Raw nodes300 // And some stuff on Raw nodes
@@ -281,6 +310,10 @@
281 {310 {
282 options.documentTemplate = raw.InnerText;311 options.documentTemplate = raw.InnerText;
283 }312 }
313 else if (raw.Name == "embedHtml")
314 {
315 options.text = raw.InnerText;
316 }
284 }317 }
285318
286 // That should cover all the new options319 // That should cover all the new options
@@ -398,6 +431,8 @@
398 public string text;431 public string text;
399 public string documentTemplate;432 public string documentTemplate;
400 public string copyrightNotice;433 public string copyrightNotice;
434 public int updateInterval;
435 public int scrollSpeed;
401 436
402 //The identification for this region437 //The identification for this region
403 public string mediaid;438 public string mediaid;
404439
=== removed file 'client/dotNET/Resources/Thumbs.db'
405Binary 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 differ440Binary 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
=== modified file 'client/dotNET/Rss.cs'
--- client/dotNET/Rss.cs 2009-03-13 09:21:56 +0000
+++ client/dotNET/Rss.cs 2009-06-20 10:39:40 +0000
@@ -64,6 +64,12 @@
64 scheduleId = options.scheduleId;64 scheduleId = options.scheduleId;
65 layoutId = options.layoutId;65 layoutId = options.layoutId;
6666
67 // Update interval and scrolling speed
68 _updateInterval = options.updateInterval;
69 _scrollSpeed = options.scrollSpeed;
70
71 System.Diagnostics.Trace.WriteLine(String.Format("Scrolling Speed: {0}, Update Interval: {1})", _scrollSpeed.ToString(), _updateInterval.ToString()), "Rss - Constructor");
72
67 // Set up the backgrounds73 // Set up the backgrounds
68 backgroundTop = options.backgroundTop + "px";74 backgroundTop = options.backgroundTop + "px";
69 backgroundLeft = options.backgroundLeft + "px";75 backgroundLeft = options.backgroundLeft + "px";
@@ -77,7 +83,7 @@
7783
78 try84 try
79 {85 {
80 webBrowser.DocumentText = String.Format("<html><head><script type='text/javascript'>{0}</script><style type='text/css'>p, h1, h2, h3, h4, h5 {{ margin:2px; font-size:{1}em; }}</style></head><body></body></html>", Properties.Resources.textRender, options.scaleFactor.ToString()); 86 webBrowser.DocumentText = String.Format("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><script type='text/javascript'>{0}</script><style type='text/css'>p, h1, h2, h3, h4, h5 {{ margin:2px; font-size:{1}em; }}</style></head><body></body></html>", Properties.Resources.textRender, options.scaleFactor.ToString());
81 }87 }
82 catch (Exception e)88 catch (Exception e)
83 {89 {
@@ -96,6 +102,9 @@
96 try102 try
97 {103 {
98 wc = new System.Net.WebClient();104 wc = new System.Net.WebClient();
105 wc.Encoding = System.Text.Encoding.UTF8;
106
107 System.Diagnostics.Debug.WriteLine("Created at WebClient and set the Encoding to UTF8", "RSS - Refresh local RSS");
99108
100 wc.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(wc_OpenReadCompleted);109 wc.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(wc_OpenReadCompleted);
101 110
@@ -109,6 +118,8 @@
109118
110 void wc_OpenReadCompleted(object sender, System.Net.OpenReadCompletedEventArgs e)119 void wc_OpenReadCompleted(object sender, System.Net.OpenReadCompletedEventArgs e)
111 {120 {
121 String rssContents;
122
112 if (e.Error != null)123 if (e.Error != null)
113 {124 {
114 System.Diagnostics.Trace.WriteLine(String.Format("[*]ScheduleID:{1},LayoutID:{2},MediaID:{3},Message:{0}", e.Error, scheduleId, layoutId, mediaid));125 System.Diagnostics.Trace.WriteLine(String.Format("[*]ScheduleID:{1},LayoutID:{2},MediaID:{3},Message:{0}", e.Error, scheduleId, layoutId, mediaid));
@@ -122,11 +133,14 @@
122133
123 try134 try
124 {135 {
125 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();
126138
127 StreamWriter sw = new StreamWriter(File.Open(rssFilePath, FileMode.Create, FileAccess.Write, FileShare.Read));139 StreamWriter sw = new StreamWriter(File.Open(rssFilePath, FileMode.Create, FileAccess.Write, FileShare.Read));
128140
129 sw.Write(sr.ReadToEnd());141 System.Diagnostics.Debug.WriteLine("Retrieved RSS - about to write it", "RSS - wc_OpenReadCompleted");
142
143 sw.Write(rssContents);
130144
131 sr.Close();145 sr.Close();
132 sw.Close();146 sw.Close();
@@ -172,16 +186,23 @@
172 }186 }
173 else187 else
174 {188 {
175 // It exists - therefore we want to get the last time it was updated189 if (_updateInterval == 0)
176 DateTime lastWriteDate = System.IO.File.GetLastWriteTime(rssFilePath);
177
178 if (DateTime.Now.CompareTo(lastWriteDate.AddHours(6.0)) > 0)
179 {190 {
180 refreshLocalRss();191 refreshLocalRss();
181 }192 }
182 else193 else
183 {194 {
184 rssReady = true;195 // It exists - therefore we want to get the last time it was updated
196 DateTime lastWriteDate = System.IO.File.GetLastWriteTime(rssFilePath);
197
198 if (DateTime.Now.CompareTo(lastWriteDate.AddHours(_updateInterval * 1.0 / 60.0)) > 0)
199 {
200 refreshLocalRss();
201 }
202 else
203 {
204 rssReady = true;
205 }
185 }206 }
186 }207 }
187208
@@ -330,7 +351,7 @@
330 // Call the JavaScript on the page351 // Call the JavaScript on the page
331 Object[] objArray = new Object[2];352 Object[] objArray = new Object[2];
332 objArray[0] = direction;353 objArray[0] = direction;
333 objArray[1] = 30;354 objArray[1] = _scrollSpeed;
334355
335 htmlDoc.InvokeScript("init", objArray);356 htmlDoc.InvokeScript("init", objArray);
336 }357 }
@@ -451,6 +472,8 @@
451 private WebBrowser webBrowser;472 private WebBrowser webBrowser;
452 private string copyrightNotice;473 private string copyrightNotice;
453 private string mediaid;474 private string mediaid;
475 private int _updateInterval;
476 private int _scrollSpeed;
454477
455 private string rssFilePath;478 private string rssFilePath;
456479
457480
=== modified file 'client/dotNET/Schedule.cs'
--- client/dotNET/Schedule.cs 2009-03-08 11:40:17 +0000
+++ client/dotNET/Schedule.cs 2009-06-18 18:36:21 +0000
@@ -69,6 +69,7 @@
69 xmds2.RequiredFilesCompleted += new XiboClient.xmds.RequiredFilesCompletedEventHandler(xmds2_RequiredFilesCompleted);69 xmds2.RequiredFilesCompleted += new XiboClient.xmds.RequiredFilesCompletedEventHandler(xmds2_RequiredFilesCompleted);
70 xmds2.ScheduleCompleted += new XiboClient.xmds.ScheduleCompletedEventHandler(xmds2_ScheduleCompleted);70 xmds2.ScheduleCompleted += new XiboClient.xmds.ScheduleCompletedEventHandler(xmds2_ScheduleCompleted);
7171
72 System.Diagnostics.Trace.WriteLine(String.Format("Collection Interval: {0}", Properties.Settings.Default.collectInterval), "Schedule - InitializeComponents");
72 //73 //
73 // The Timer for the Service call74 // The Timer for the Service call
74 //75 //
7576
=== modified file 'client/dotNET/Text.cs'
--- client/dotNET/Text.cs 2008-12-19 23:34:13 +0000
+++ client/dotNET/Text.cs 2009-06-20 10:39:40 +0000
@@ -55,11 +55,12 @@
5555
56 try56 try
57 {57 {
58 webBrowser.DocumentText = String.Format("<html><head><script type='text/javascript'>{0}</script><style type='text/css'>p, h1, h2, h3, h4, h5 {{ margin:2px; font-size:{1}em; }}</style></head><body></body></html>", Properties.Resources.textRender, options.scaleFactor.ToString());58 webBrowser.DocumentText = String.Format("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><script type='text/javascript'>{0}</script><style type='text/css'>p, h1, h2, h3, h4, h5 {{ margin:2px; font-size:{1}em; }}</style></head><body></body></html>", Properties.Resources.textRender, options.scaleFactor.ToString());
59 }59 }
60 catch (Exception e)60 catch (Exception e)
61 {61 {
62 MessageBox.Show(e.Message);62 System.Diagnostics.Trace.WriteLine(e.Message);
63 return;
63 }64 }
6465
65 webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser_DocumentCompleted);66 webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser_DocumentCompleted);
6667
=== modified file 'client/dotNET/VideoPlayer.resx'
--- client/dotNET/VideoPlayer.resx 2008-12-19 23:34:13 +0000
+++ client/dotNET/VideoPlayer.resx 2009-05-24 10:19:36 +0000
@@ -123,8 +123,8 @@
123 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0123 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
124 ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAuQAAAAIB124 ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAuQAAAAIB
125 AAAAAQAAAAAAAAAAAAAAAKQAAAAAAwAACAACAAAAAAAFAAAAAAAAAPA/AwAAAAAABQAAAAAAAAAAAAgA125 AAAAAQAAAAAAAAAAAAAAAKQAAAAAAwAACAACAAAAAAAFAAAAAAAAAPA/AwAAAAAABQAAAAAAAAAAAAgA
126 AgAAAAAAAwABAAAACwD//wMAAAAAAAsA//8IAAIAAAAAAAMAMgAAAAsAAAAIAAoAAABuAG8AbgBlAAAA126 AgAAAAAAAwABAAAACwD//wMAAAAAAAsAAAAIAAIAAAAAAAMAMgAAAAsAAAAIAAoAAABuAG8AbgBlAAAA
127 CwD//wsA//8LAAAACwAAAAsAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAAIAAIAAAAAAAsAAAATHgAA127 CwD//wsAAAALAAAACwAAAAsAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAAIAAIAAAAAAAsAAAATHgAA
128 zRsAAAs=128 zRsAAAs=
129</value>129</value>
130 </data>130 </data>
131131
=== modified file 'client/dotNET/bin/Release/XiboClient.XmlSerializers.dll'
132Binary 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 differ132Binary 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
=== modified file 'client/dotNET/bin/Release/XiboClient.exe'
133Binary 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 differ133Binary 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
=== modified file 'client/dotNET/bin/Release/XiboClient.pdb'
134Binary 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 differ134Binary 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
=== modified file 'server/config/config.class.php'
--- server/config/config.class.php 2009-05-02 10:10:54 +0000
+++ server/config/config.class.php 2009-06-20 10:59:41 +0000
@@ -192,7 +192,7 @@
192 $output .= $imgBad.$message.'<br />';192 $output .= $imgBad.$message.'<br />';
193 $output .= <<<END193 $output .= <<<END
194 <div class="check_explain">194 <div class="check_explain">
195 <p>Xibo requires a MySQL database.</p>195 <p>Xibo requires the PHP MySQL Extension to function.</p>
196 </div>196 </div>
197END;197END;
198 }198 }
199199
=== removed file 'server/img/Thumbs.db'
200Binary files server/img/Thumbs.db 2008-12-14 14:42:52 +0000 and server/img/Thumbs.db 1970-01-01 00:00:00 +0000 differ200Binary 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
=== removed file 'server/img/bodys/Thumbs.db'
201Binary 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 differ201Binary 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
=== removed file 'server/img/dashboard/Thumbs.db'
202Binary 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 differ202Binary 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
=== removed file 'server/img/dialogs/Thumbs.db'
203Binary 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 differ203Binary 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
=== removed file 'server/img/fades/Thumbs.db'
204Binary 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 differ204Binary 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
=== removed file 'server/img/filterform/Thumbs.db'
205Binary 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 differ205Binary 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
=== removed file 'server/img/forms/Thumbs.db'
206Binary 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 differ206Binary 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
=== added file 'server/img/forms/embedded.png'
207Binary 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 differ207Binary 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
=== removed file 'server/img/login/Thumbs.db'
208Binary 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 differ208Binary 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
=== removed file 'server/img/logos/Thumbs.db'
209Binary 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 differ209Binary 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
=== removed file 'server/img/tables/Thumbs.db'
210Binary 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 differ210Binary 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
=== removed file 'server/img/tabs/Thumbs.db'
211Binary 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 differ211Binary 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
=== removed file 'server/img/titles/Thumbs.db'
212Binary 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 differ212Binary 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
=== removed file 'server/img/weather_rss/Thumbs.db'
213Binary 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 differ213Binary 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
=== modified file 'server/install.php'
--- server/install.php 2009-04-30 17:49:26 +0000
+++ server/install.php 2009-06-15 08:16:19 +0000
@@ -266,6 +266,7 @@
266 // NB this is broken for 0 padded files266 // NB this is broken for 0 padded files
267 // eg 01.sql would be incorrectly sorted in the above example.267 // eg 01.sql would be incorrectly sorted in the above example.
268 268
269 $sqlStatementCount = 0;
269 natcasesort($sql_files);270 natcasesort($sql_files);
270271
271 foreach ($sql_files as $filename) {272 foreach ($sql_files as $filename) {
@@ -280,10 +281,11 @@
280 $sql_file = split_sql_file($sql_file, $delimiter);281 $sql_file = split_sql_file($sql_file, $delimiter);
281 282
282 foreach ($sql_file as $sql) {283 foreach ($sql_file as $sql) {
283 print ".";284 print ".";
285 $sqlStatementCount++;
284 flush();286 flush();
285 if (! @mysql_query($sql,$db)) {287 if (! @mysql_query($sql,$db)) {
286 reportError("4", "An error occured populating the database.<br /><br />MySQL Error:<br />" . mysql_error());288 reportError("4", "An error occured populating the database.<br /><br />MySQL Error:<br />" . mysql_error() . "<br /><br />SQL executed:<br />" . $sql . "<br /><br />Statement number: " . $sqlStatementCount);
287 }289 }
288 }290 }
289 print "</p>";291 print "</p>";
290292
=== added file 'server/install/database/6.sql'
--- server/install/database/6.sql 1970-01-01 00:00:00 +0000
+++ server/install/database/6.sql 2009-06-20 09:34:43 +0000
@@ -0,0 +1,16 @@
1INSERT INTO `module` (
2`ModuleID` ,
3`Module` ,
4`Enabled` ,
5`RegionSpecific` ,
6`Description` ,
7`ImageUri` ,
8`SchemaVersion`
9)
10VALUES (
11NULL , 'Embedded', '1', '1', 'Embedded HTML', 'img/forms/webpage.gif', '1'
12);
13
14UPDATE `version` SET `app_ver` = '1.0.2';
15UPDATE `setting` SET `value` = 0 WHERE `setting` = 'PHONE_HOME_DATE';
16UPDATE `version` SET `DBVersion` = '6';
0\ No newline at end of file17\ No newline at end of file
118
=== modified file 'server/lib/app/session.class.php'
--- server/lib/app/session.class.php 2008-12-19 22:10:39 +0000
+++ server/lib/app/session.class.php 2009-07-07 20:01:49 +0000
@@ -29,7 +29,8 @@
29 29
30 public $isExpired = 1;30 public $isExpired = 1;
3131
32 function __construct(database $db) {32 function __construct(database $db)
33 {
33 $this->db =& $db;34 $this->db =& $db;
34 35
35 session_set_save_handler(array(&$this, 'open'),36 session_set_save_handler(array(&$this, 'open'),
@@ -64,38 +65,27 @@
64 {65 {
65 $db =& $this->db;66 $db =& $this->db;
66 67
67 $userAgent = $_SERVER['HTTP_USER_AGENT'];68 $userAgent = Kit::GetParam('HTTP_USER_AGENT', $_SERVER, _STRING, 'No user agent');
68 $remoteAddr = $_SERVER['REMOTE_ADDR'];69 $remoteAddr = Kit::GetParam('REMOTE_ADDR', $_SERVER, _STRING);
70 $securityToken = Kit::GetParam('SecurityToken', _POST, _STRING, null);
69 71
70 $this->key = $key;72 $this->key = $key;
71 $newExp = time() + $this->max_lifetime;73 $newExp = time() + $this->max_lifetime;
72 74
73 $this->gc($this->max_lifetime);75 $this->gc($this->max_lifetime);
74 76
75 if(isset($_POST['SecurityToken'])) 77 // Get this session
76 {
77 $securityToken = validate($_POST['SecurityToken']);
78
79 if (!$securityToken)
80 {
81 log_entry($db, "error", "Invalid Security Token");
82 $securityToken = null;
83 }
84 }
85 else
86 {
87 $securityToken = null;
88 }
89
90 $SQL = " SELECT session_data, IsExpired, SecurityToken FROM session ";78 $SQL = " SELECT session_data, IsExpired, SecurityToken FROM session ";
91 $SQL .= " WHERE session_id = '$key' ";79 $SQL .= " WHERE session_id = '%s' ";
92 $SQL .= " AND RemoteAddr = '$remoteAddr' ";80 $SQL .= " AND UserAgent = '%s' ";
93 81
94 if (!$result = $db->query($SQL));82 $SQL = sprintf($SQL, $db->escape_string($key), $db->escape_string($userAgent));
83
84 $result = $db->query($SQL);
95 85
96 if ($db->num_rows($result) != 0) 86 if ($db->num_rows($result) != 0)
97 {87 {
98 88 // Get the row
99 $row = $db->get_row($result);89 $row = $db->get_row($result);
100 90
101 // We have the Key and the Remote Address.91 // We have the Key and the Remote Address.
@@ -109,10 +99,10 @@
109 // We have a security token, so dont require a login99 // We have a security token, so dont require a login
110 $this->isExpired = 0;100 $this->isExpired = 0;
111 101
112 if (!$db->query("UPDATE session SET session_expiration = $newExp, isExpired = 0 WHERE session_id = '$key' "))102 if (!$db->query(sprintf("UPDATE session SET session_expiration = $newExp, isExpired = 0 WHERE session_id = '%s' ", $db->escape_string($key))))
113 {103 {
114 log_entry($db, "error", $db->error());104 log_entry($db, "error", $db->error());
115 } 105 }
116 }106 }
117 else107 else
118 {108 {
@@ -123,49 +113,55 @@
123 }113 }
124 114
125 // Either way - update this SESSION so that the security token is NULL115 // Either way - update this SESSION so that the security token is NULL
126 $db->query("UPDATE session SET SecurityToken = NULL WHERE session_id = '$key' ");116 $db->query(sprintf("UPDATE session SET SecurityToken = NULL WHERE session_id = '%s' ", $db->escape_string($key)));
127 117
128 return($row[0]);118 return($row[0]);
129 }119 }
130 else {120 else
121 {
131 $empty = '';122 $empty = '';
132 return settype($empty, "string");123 return settype($empty, "string");
133 }124 }
134 }125 }
135 126
136 function write($key, $val) {127 function write($key, $val)
137 128 {
138 $db =& $this->db;129 $db =& $this->db;
139
140 $val = addslashes($val);
141 130
142 $newExp = time() + $this->max_lifetime;131 $newExp = time() + $this->max_lifetime;
143 $lastaccessed = date("Y-m-d H:i:s");132 $lastaccessed = date("Y-m-d H:i:s");
144 $userAgent = $_SERVER['HTTP_USER_AGENT'];133 $userAgent = Kit::GetParam('HTTP_USER_AGENT', $_SERVER, _STRING, 'No user agent');
145 $remoteAddr = $_SERVER['REMOTE_ADDR'];134 $remoteAddr = Kit::GetParam('REMOTE_ADDR', $_SERVER, _STRING);
146 135
147 $result = $db->query("SELECT session_id FROM session WHERE session_id = '$key'");136 $result = $db->query(sprintf("SELECT session_id FROM session WHERE session_id = '%s'", $db->escape_string($key)));
148 137
149 if ($db->num_rows($result) == 0) 138 if ($db->num_rows($result) == 0)
150 {139 {
151 //INSERT140 //INSERT
152 $SQL = "INSERT INTO session (session_id, session_data, session_expiration, LastAccessed, LastPage, userID, IsExpired, UserAgent, RemoteAddr) 141 $SQL = "INSERT INTO session (session_id, session_data, session_expiration, LastAccessed, LastPage, userID, IsExpired, UserAgent, RemoteAddr)
153 VALUES ('$key','$val',$newExp,'$lastaccessed','login', NULL, 0, '$userAgent', '$remoteAddr')";142 VALUES ('%s', '%s', %d, '%s', 'login', NULL, 0, '%s', '%s')";
143
144 $SQL = sprintf($SQL, $db->escape_string($key), $db->escape_string($val), $newExp, $db->escape_string($lastaccessed), $db->escape_string($userAgent), $db->escape_string($remoteAddr));
154 }145 }
155 else 146 else
156 {147 {
157 //UPDATE148 //UPDATE
158 $SQL = "UPDATE session SET ";149 $SQL = "UPDATE session SET ";
159 $SQL .= " session_data = '$val', ";150 $SQL .= " session_data = '%s', ";
160 $SQL .= " session_expiration = '$newExp', ";151 $SQL .= " session_expiration = %d, ";
161 $SQL .= " lastaccessed = '$lastaccessed' ";152 $SQL .= " lastaccessed = '%s', ";
162 $SQL .= " WHERE session_id = '$key' ";153 $SQL .= " RemoteAddr = '%s' ";
154 $SQL .= " WHERE session_id = '%s' ";
155
156 $SQL = sprintf($SQL, $db->escape_string($val), $newExp, $db->escape_string($lastaccessed), $db->escape_string($remoteAddr), $db->escape_string($key));
163 }157 }
164 158
165 if(!$db->query($SQL)) {159 if(!$db->query($SQL))
160 {
166 log_entry($db, "error", $db->error());161 log_entry($db, "error", $db->error());
167 return(false);162 return(false);
168 }163 }
164
169 return true;165 return true;
170 }166 }
171167
@@ -173,7 +169,7 @@
173 {169 {
174 $db =& $this->db;170 $db =& $this->db;
175 171
176 $SQL = "UPDATE session SET IsExpired = 1 WHERE session_id = '$key'";172 $SQL = sprintf("UPDATE session SET IsExpired = 1 WHERE session_id = '%s'", $db->escape_string($key));
177 173
178 $result = $db->query("$SQL"); 174 $result = $db->query("$SQL");
179 175
@@ -193,26 +189,32 @@
193 {189 {
194 $db =& $this->db;190 $db =& $this->db;
195 191
196 $SQL = "UPDATE session SET userID = $userid WHERE session_id = '$key' ";192 $SQL = sprintf("UPDATE session SET userID = %d WHERE session_id = '%s' ",$userid, $db->escape_string($key));
197 193
198 if(!$db->query($SQL)) {194 if(!$db->query($SQL))
195 {
199 trigger_error($db->error(), E_USER_NOTICE);196 trigger_error($db->error(), E_USER_NOTICE);
200 return(false);197 return(false);
201 }198 }
202 return true;199 return true;
203 }200 }
204 201
205 // Update the session (after login)202 /**
206 static function RegenerateSessionID() 203 * Updates the session ID with a new one
204 * @return
205 */
206 public function RegenerateSessionID($oldSessionID)
207 {207 {
208 $old_sess_id = session_id();208 $db =& $this->db;
209 209
210 session_regenerate_id(false);210 session_regenerate_id(false);
211 211
212 $new_sess_id = session_id();212 $new_sess_id = session_id();
213
214 $this->key = $new_sess_id;
213 215
214 $query = "UPDATE `session` SET `session_id` = '$new_sess_id' WHERE session_id = '$old_sess_id'";216 $query = sprintf("UPDATE session SET session_id = '%s' WHERE session_id = '%s'", $db->escape_string($new_sess_id), $db->escape_string($oldSessionID));
215 mysql_query($query);217 $db->query($query);
216 }218 }
217 219
218 function set_page($key, $lastpage) 220 function set_page($key, $lastpage)
@@ -221,9 +223,10 @@
221 223
222 $_SESSION['pagename'] = $lastpage;224 $_SESSION['pagename'] = $lastpage;
223 225
224 $SQL = "UPDATE session SET LastPage = '$lastpage' WHERE session_id = '$key' ";226 $SQL = sprintf("UPDATE session SET LastPage = '%s' WHERE session_id = '%s' ", $db->escape_string($lastpage), $db->escape_string($key));
225 227
226 if(!$db->query($SQL)) {228 if(!$db->query($SQL))
229 {
227 trigger_error($db->error(), E_USER_NOTICE);230 trigger_error($db->error(), E_USER_NOTICE);
228 return(false);231 return(false);
229 }232 }
@@ -236,7 +239,7 @@
236239
237 $this->isExpired = $isExpired;240 $this->isExpired = $isExpired;
238 241
239 $SQL = "UPDATE session SET IsExpired = $this->isExpired WHERE session_id = '$this->key'";242 $SQL = sprintf("UPDATE session SET IsExpired = $this->isExpired WHERE session_id = '%s'", $db->escape_string($this->key));
240 243
241 if (!$db->query($SQL))244 if (!$db->query($SQL))
242 {245 {
@@ -248,7 +251,7 @@
248 {251 {
249 $db =& $this->db;252 $db =& $this->db;
250 253
251 $SQL = "UPDATE session SET securityToken = '$token' WHERE session_id = '$this->key'";254 $SQL = sprintf("UPDATE session SET securityToken = '%s' WHERE session_id = '%s'", $db->escape_string($token), $db->escape_string($this->key));
252 255
253 if (!$db->query($SQL))256 if (!$db->query($SQL))
254 {257 {
255258
=== modified file 'server/lib/pages/layout.class.php'
--- server/lib/pages/layout.class.php 2009-04-27 19:28:08 +0000
+++ server/lib/pages/layout.class.php 2009-06-20 12:00:21 +0000
@@ -1194,8 +1194,12 @@
1194 $paddingTop = $regionHeight / 2 - 16;1194 $paddingTop = $regionHeight / 2 - 16;
1195 $paddingTop = $paddingTop . "px";1195 $paddingTop = $paddingTop . "px";
11961196
1197 $regionTransparency = '<div class="regionTransparency" style="width:100%; height:100%;">';
1198 $regionTransparency .= '</div>';
1199
1197 $doubleClickLink = "XiboFormRender($(this).attr('href'))";1200 $doubleClickLink = "XiboFormRender($(this).attr('href'))";
1198 $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\">1201 $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\">
1202 $regionTransparency
1199 <div class='preview' style='$previewStyle'>1203 <div class='preview' style='$previewStyle'>
1200 <div class='previewContent'></div>1204 <div class='previewContent'></div>
1201 <div class='previewNav' style='display:none;'></div>1205 <div class='previewNav' style='display:none;'></div>
@@ -1435,7 +1439,7 @@
1435 while ($modulesItem = $enabledModules->GetNextModule())1439 while ($modulesItem = $enabledModules->GetNextModule())
1436 {1440 {
1437 $mod = Kit::ValidateParam($modulesItem['Module'], _STRING);1441 $mod = Kit::ValidateParam($modulesItem['Module'], _STRING);
1438 $caption = 'Add ' . $mod;1442 $caption = '+ ' . $mod;
1439 $mod = strtolower($mod);1443 $mod = strtolower($mod);
1440 $title = Kit::ValidateParam($modulesItem['Description'], _STRING);1444 $title = Kit::ValidateParam($modulesItem['Description'], _STRING);
1441 $img = Kit::ValidateParam($modulesItem['ImageUri'], _STRING);1445 $img = Kit::ValidateParam($modulesItem['ImageUri'], _STRING);
@@ -1445,7 +1449,7 @@
1445 $buttons .= <<<HTML1449 $buttons .= <<<HTML
1446 <div class="regionicons">1450 <div class="regionicons">
1447 <a class="XiboFormButton" title="$title" href="$uri">1451 <a class="XiboFormButton" title="$title" href="$uri">
1448 <img class="dash_button" src="$img" />1452 <img class="dash_button moduleButtonImage" src="$img" />
1449 <span class="dash_text">$caption</span></a>1453 <span class="dash_text">$caption</span></a>
1450 </div>1454 </div>
1451HTML;1455HTML;
@@ -1456,7 +1460,7 @@
1456 <div id="buttons">1460 <div id="buttons">
1457 <div class="regionicons">1461 <div class="regionicons">
1458 <a class="XiboFormButton" href="index.php?p=content&q=LibraryAssignForm&layoutid=$this->layoutid&regionid=$regionid" title="Library">1462 <a class="XiboFormButton" href="index.php?p=content&q=LibraryAssignForm&layoutid=$this->layoutid&regionid=$regionid" title="Library">
1459 <img class="region_button" src="img/forms/library.gif"/>1463 <img class="region_button moduleButtonImage" src="img/forms/library.gif"/>
1460 <span class="region_text">Library</span></a>1464 <span class="region_text">Library</span></a>
1461 </div>1465 </div>
1462 $buttons1466 $buttons
@@ -1635,7 +1639,7 @@
1635 $type = (string) $node->getAttribute("type");1639 $type = (string) $node->getAttribute("type");
1636 $mediaDurationText = (string) $node->getAttribute("duration");1640 $mediaDurationText = (string) $node->getAttribute("duration");
1637 1641
1638 $return .= "<div class='info' style='display:none; position:absolute; top: 15px; left: 150px; background-color:#FFF; z-index: 50;'>1642 $return .= "<div class='info regionTransparency' style='display:none; position:absolute; top: 15px; left: 150px; background-color:#FFF; z-index: 50;'>
1639 <h5>Media Information</h5>1643 <h5>Media Information</h5>
1640 <ul>1644 <ul>
1641 <li>Type: $type</li>1645 <li>Type: $type</li>
16421646
=== modified file 'server/lib/pages/report.class.php'
--- server/lib/pages/report.class.php 2009-03-13 10:10:07 +0000
+++ server/lib/pages/report.class.php 2009-07-07 19:44:46 +0000
@@ -210,9 +210,7 @@
210 <td>$ip</td>210 <td>$ip</td>
211 <td>$browser</td>211 <td>$browser</td>
212 <td>212 <td>
213 <div class="buttons">213 <button class="XiboFormButton" href="index.php?p=report&q=ConfirmLogout&userid=$userID"><span>Logout</span></a>
214 <a class="neutral" href="index.php?p=report&q=ConfirmLogout&userid=$userID" onclick="return init_button(this,'Logout User', exec_filter_callback, set_form_size(450,150))"><span>Logout</span></a>
215 </div>
216 </td>214 </td>
217 </tr>215 </tr>
218END;216END;
@@ -234,14 +232,15 @@
234 $userID = Kit::GetParam('userid', _GET, _INT);232 $userID = Kit::GetParam('userid', _GET, _INT);
235 233
236 $form = <<<END234 $form = <<<END
237 <form class="dialog_form" method="post" action="index.php?p=report&q=LogoutUser">235 <form class="XiboForm" method="post" action="index.php?p=report&q=LogoutUser">
238 <input type="hidden" name="userid" value="userid" />236 <input type="hidden" name="userid" value="userid" />
239 <p>Are you sure you want to logout this user?</p>237 <p>Are you sure you want to logout this user?</p>
240 <input type="submit" value="Yes">238 <input type="submit" value="Yes">
241 <input type="submit" value="No" onclick="$('#div_dialog').dialog('close');return false; ">239 <input type="submit" value="No" onclick="$('#div_dialog').dialog('close');return false; ">
242 </form>240 </form>
243END;241END;
244 $arh->SetFormSubmitResponse($form);242
243 $arh->SetFormRequestResponse($form, 'Logout User', '450px', '300px');
245 $arh->Respond();244 $arh->Respond();
246 }245 }
247 246
248247
=== added file 'server/modules/embedded.module.php'
--- server/modules/embedded.module.php 1970-01-01 00:00:00 +0000
+++ server/modules/embedded.module.php 2009-06-20 10:05:53 +0000
@@ -0,0 +1,251 @@
1<?php
2/*
3 * Xibo - Digitial Signage - http://www.xibo.org.uk
4 * Copyright (C) 2009 Daniel Garner
5 *
6 * This file is part of Xibo.
7 *
8 * Xibo is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Affero General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * Xibo is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with Xibo. If not, see <http://www.gnu.org/licenses/>.
20 */
21class embedded extends Module
22{
23
24 public function __construct(database $db, user $user, $mediaid = '', $layoutid = '', $regionid = '')
25 {
26 // Must set the type of the class
27 $this->type = 'embedded';
28
29 // Must call the parent class
30 parent::__construct($db, $user, $mediaid, $layoutid, $regionid);
31 }
32
33 /**
34 * Return the Add Form as HTML
35 * @return
36 */
37 public function AddForm()
38 {
39 $db =& $this->db;
40 $user =& $this->user;
41
42 // Would like to get the regions width / height
43 $layoutid = $this->layoutid;
44 $regionid = $this->regionid;
45 $rWidth = Kit::GetParam('rWidth', _REQUEST, _STRING);
46 $rHeight = Kit::GetParam('rHeight', _REQUEST, _STRING);
47
48 $form = <<<FORM
49 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=AddMedia">
50 <input type="hidden" name="layoutid" value="$layoutid">
51 <input type="hidden" id="iRegionId" name="regionid" value="$regionid">
52 <table>
53 <tr>
54 <td><label for="duration" title="The duration in seconds this webpage should be displayed">Duration<span class="required">*</span></label></td>
55 <td><input id="duration" name="duration" type="text"></td>
56 </tr>
57 <tr>
58 <td colspan="2">
59 <label for="embedHtml" title="The HTML you want to Embed in this Layout.">Embed HTML<span class="required">*</span></label><br />
60 <textarea id="embedHtml" name="embedHtml"></textarea>
61 </td>
62 </tr>
63 <tr>
64 <td></td>
65 <td>
66 <input id="btnSave" type="submit" value="Save" />
67 <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" />
68 </td>
69 </tr>
70 </table>
71 </form>
72FORM;
73
74 $this->response->html = $form;
75 $this->response->dialogTitle = 'Add Embedded HTML';
76 $this->response->dialogSize = true;
77 $this->response->dialogWidth = '650px';
78 $this->response->dialogHeight = '450px';
79
80 return $this->response;
81 }
82
83 /**
84 * Return the Edit Form as HTML
85 * @return
86 */
87 public function EditForm()
88 {
89 $db =& $this->db;
90
91 $layoutid = $this->layoutid;
92 $regionid = $this->regionid;
93 $mediaid = $this->mediaid;
94
95 // Get the embedded HTML out of RAW
96 $rawXml = new DOMDocument();
97 $rawXml->loadXML($this->GetRaw());
98
99 Debug::LogEntry($db, 'audit', 'Raw XML returned: ' . $this->GetRaw());
100
101 // Get the HTML Node out of this
102 $textNodes = $rawXml->getElementsByTagName('embedHtml');
103 $textNode = $textNodes->item(0);
104 $embedHtml = $textNode->nodeValue;
105
106 //Output the form
107 $form = <<<FORM
108 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">
109 <input type="hidden" name="layoutid" value="$layoutid">
110 <input type="hidden" name="mediaid" value="$mediaid">
111 <input type="hidden" id="iRegionId" name="regionid" value="$regionid">
112 <table>
113 <tr>
114 <td><label for="duration" title="The duration in seconds this webpage should be displayed (may be overridden on each layout)">Duration<span class="required">*</span></label></td>
115 <td><input id="duration" name="duration" value="$this->duration" type="text"></td>
116 </tr>
117 <tr>
118 <td colspan="2">
119 <label for="embedHtml" title="The HTML you want to Embed in this Layout.">Embed HTML<span class="required">*</span></label><br />
120 <textarea id="embedHtml" name="embedHtml">$embedHtml</textarea>
121 </td>
122 </tr>
123 <tr>
124 <td></td>
125 <td>
126 <input id="btnSave" type="submit" value="Save" />
127 <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" />
128 </td>
129 </tr>
130 </table>
131 </form>
132FORM;
133
134 $this->response->html = $form;
135 $this->response->dialogTitle = 'Edit Embedded HTML';
136 $this->response->dialogSize = true;
137 $this->response->dialogWidth = '650px';
138 $this->response->dialogHeight = '450px';
139
140 return $this->response;
141 }
142
143 /**
144 * Add Media to the Database
145 * @return
146 */
147 public function AddMedia()
148 {
149 $db =& $this->db;
150
151 $layoutid = $this->layoutid;
152 $regionid = $this->regionid;
153 $mediaid = $this->mediaid;
154
155 //Other properties
156 $embedHtml = Kit::GetParam('embedHtml', _POST, _HTMLSTRING);
157 $duration = Kit::GetParam('duration', _POST, _INT, 0);
158
159 $url = "index.php?p=layout&layoutid=$layoutid&regionid=$regionid&q=RegionOptions";
160
161 //Validate the URL?
162 if ($embedHtml == "")
163 {
164 $this->response->SetError('Please enter some HTML to embed.');
165 $this->response->keepOpen = true;
166 return $this->response;
167 }
168
169 if ($duration == 0)
170 {
171 $this->response->SetError('You must enter a duration.');
172 $this->response->keepOpen = true;
173 return $this->response;
174 }
175
176 // Required Attributes
177 $this->mediaid = md5(uniqid());
178 $this->duration = $duration;
179
180 // Any Options
181 $this->SetRaw('<embedHtml><![CDATA[' . $embedHtml . ']]></embedHtml>');
182
183 // Should have built the media object entirely by this time
184 // This saves the Media Object to the Region
185 $this->UpdateRegion();
186
187 //Set this as the session information
188 setSession('content', 'type', $this->type);
189
190 // We want to load a new form
191 $this->response->loadForm = true;
192 $this->response->loadFormUri= $url;
193
194 return $this->response;
195 }
196
197 /**
198 * Edit Media in the Database
199 * @return
200 */
201 public function EditMedia()
202 {
203 $db =& $this->db;
204
205 $layoutid = $this->layoutid;
206 $regionid = $this->regionid;
207 $mediaid = $this->mediaid;
208
209 //Other properties
210 $embedHtml = Kit::GetParam('embedHtml', _POST, _HTMLSTRING);
211 $duration = Kit::GetParam('duration', _POST, _INT, 0);
212
213 $url = "index.php?p=layout&layoutid=$layoutid&regionid=$regionid&q=RegionOptions";
214
215 //Validate the URL?
216 if ($embedHtml == "")
217 {
218 $this->response->SetError('Please enter some HTML to embed.');
219 $this->response->keepOpen = true;
220 return $this->response;
221 }
222
223 if ($duration == 0)
224 {
225 $this->response->SetError('You must enter a duration.');
226 $this->response->keepOpen = true;
227 return $this->response;
228 }
229
230 // Required Attributes
231 $this->duration = $duration;
232
233 // Any Options
234 $this->SetRaw('<embedHtml><![CDATA[' . $embedHtml . ']]></embedHtml>');
235
236 // Should have built the media object entirely by this time
237 // This saves the Media Object to the Region
238 $this->UpdateRegion();
239
240 //Set this as the session information
241 setSession('content', 'type', $this->type);
242
243 // We want to load a new form
244 $this->response->loadForm = true;
245 $this->response->loadFormUri= $url;
246
247 return $this->response;
248 }
249}
250
251?>
0\ No newline at end of file252\ No newline at end of file
1253
=== modified file 'server/modules/flash.module.php'
--- server/modules/flash.module.php 2009-03-10 19:29:40 +0000
+++ server/modules/flash.module.php 2009-05-24 09:59:49 +0000
@@ -300,7 +300,8 @@
300 <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span>300 <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span>
301 </div>301 </div>
302 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">302 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">
303 <input type="hidden" name="MAX_FILE_SIZE" value="1048576000">303 <input type="hidden" name="hidFileID" id="hidFileID" value="" />
304 <input type="hidden" id="txtFileName" name="txtFileName" readonly="true" />
304 <input type="hidden" name="layoutid" value="$layoutid">305 <input type="hidden" name="layoutid" value="$layoutid">
305 <input type="hidden" name="regionid" value="$regionid">306 <input type="hidden" name="regionid" value="$regionid">
306 <input type="hidden" name="mediaid" value="$mediaid">307 <input type="hidden" name="mediaid" value="$mediaid">
@@ -727,8 +728,17 @@
727 728
728 $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid);729 $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid);
729 730
731 if (!$new_mediaid = $db->insert_query($SQL))
732 {
733 trigger_error($db->error());
734 trigger_error('Error inserting replacement media record.', E_USER_ERROR);
735 }
736
730 //What are we going to store this media as...737 //What are we going to store this media as...
731 $storedAs = $new_mediaid.".".$ext;738 $storedAs = $new_mediaid.".".$ext;
739
740 // File upload directory.. get this from the settings object
741 $databaseDir = Config::GetSetting($db, "LIBRARY_LOCATION");
732 742
733 //Now we need to move the file743 //Now we need to move the file
734 if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs))744 if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs))
@@ -754,9 +764,11 @@
754 return $this->response;764 return $this->response;
755 }765 }
756 766
757 //Update the existing record with the new record's id767 // Update the existing record with the new record's id
758 $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $mediaid ";768 $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $new_mediaid ";
759 $SQL .= " WHERE editedMediaID = $mediaid and mediaID <> $new_mediaid ";769 $SQL .= " WHERE IFNULL(editedMediaID,0) <> $new_mediaid AND mediaID = $mediaid ";
770
771 Debug::LogEntry($db, 'audit', $SQL);
760 772
761 if (!$db->query($SQL))773 if (!$db->query($SQL))
762 {774 {
763775
=== modified file 'server/modules/image.module.php'
--- server/modules/image.module.php 2009-03-08 00:23:29 +0000
+++ server/modules/image.module.php 2009-05-24 09:59:49 +0000
@@ -300,7 +300,8 @@
300 <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span>300 <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span>
301 </div>301 </div>
302 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">302 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">
303 <input type="hidden" name="MAX_FILE_SIZE" value="1048576000">303 <input type="hidden" name="hidFileID" id="hidFileID" value="" />
304 <input type="hidden" id="txtFileName" name="txtFileName" readonly="true" />
304 <input type="hidden" name="layoutid" value="$layoutid">305 <input type="hidden" name="layoutid" value="$layoutid">
305 <input type="hidden" name="regionid" value="$regionid">306 <input type="hidden" name="regionid" value="$regionid">
306 <input type="hidden" name="mediaid" value="$mediaid">307 <input type="hidden" name="mediaid" value="$mediaid">
@@ -729,9 +730,18 @@
729 $SQL .= "VALUES ('%s', 'image', '%s', '%s', %d, %d, 0) ";730 $SQL .= "VALUES ('%s', 'image', '%s', '%s', %d, %d, 0) ";
730 731
731 $SQL = sprintf($SQL, $db->escape_string($name), $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid);732 $SQL = sprintf($SQL, $db->escape_string($name), $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid);
733
734 if (!$new_mediaid = $db->insert_query($SQL))
735 {
736 trigger_error($db->error());
737 trigger_error('Error inserting replacement media record.', E_USER_ERROR);
738 }
732 739
733 //What are we going to store this media as...740 //What are we going to store this media as...
734 $storedAs = $new_mediaid.".".$ext;741 $storedAs = $new_mediaid.".".$ext;
742
743 // File upload directory.. get this from the settings object
744 $databaseDir = Config::GetSetting($db, "LIBRARY_LOCATION");
735 745
736 //Now we need to move the file746 //Now we need to move the file
737 if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs))747 if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs))
@@ -764,9 +774,11 @@
764 ResizeImage($databaseDir.$storedAs, $databaseDir."tn_".$storedAs, 80, 80);774 ResizeImage($databaseDir.$storedAs, $databaseDir."tn_".$storedAs, 80, 80);
765 }775 }
766 776
767 //Update the existing record with the new record's id777 // Update the existing record with the new record's id
768 $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $mediaid ";778 $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $new_mediaid ";
769 $SQL .= " WHERE editedMediaID = $mediaid and mediaID <> $new_mediaid ";779 $SQL .= " WHERE IFNULL(editedMediaID,0) <> $new_mediaid AND mediaID = $mediaid ";
780
781 Debug::LogEntry($db, 'audit', $SQL);
770 782
771 if (!$db->query($SQL))783 if (!$db->query($SQL))
772 {784 {
773785
=== modified file 'server/modules/module_user_general.php'
--- server/modules/module_user_general.php 2009-03-25 19:36:36 +0000
+++ server/modules/module_user_general.php 2009-07-07 20:01:49 +0000
@@ -89,8 +89,6 @@
89 89
90 $sql = sprintf("SELECT UserID, UserName, UserPassword, usertypeid, groupID FROM user WHERE UserName = '%s' AND UserPassword = '%s'", $db->escape_string($username), $db->escape_string($password));90 $sql = sprintf("SELECT UserID, UserName, UserPassword, usertypeid, groupID FROM user WHERE UserName = '%s' AND UserPassword = '%s'", $db->escape_string($username), $db->escape_string($password));
91 91
92 Debug::LogEntry($db, 'audit', $sql);
93
94 if(!$result = $db->query($sql)) trigger_error('A database error occurred while checking your login details.', E_USER_ERROR);92 if(!$result = $db->query($sql)) trigger_error('A database error occurred while checking your login details.', E_USER_ERROR);
9593
96 if ($db->num_rows($result)==0) 94 if ($db->num_rows($result)==0)
@@ -122,6 +120,7 @@
122 $db->query($SQL) or trigger_error("Can not write last accessed info.", E_USER_ERROR);120 $db->query($SQL) or trigger_error("Can not write last accessed info.", E_USER_ERROR);
123121
124 $session->setIsExpired(0);122 $session->setIsExpired(0);
123 $session->RegenerateSessionID(session_id());
125124
126 return true;125 return true;
127 }126 }
128127
=== modified file 'server/modules/powerpoint.module.php'
--- server/modules/powerpoint.module.php 2009-03-10 19:29:40 +0000
+++ server/modules/powerpoint.module.php 2009-05-24 09:59:49 +0000
@@ -300,7 +300,8 @@
300 <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span>300 <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span>
301 </div>301 </div>
302 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">302 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">
303 <input type="hidden" name="MAX_FILE_SIZE" value="1048576000">303 <input type="hidden" name="hidFileID" id="hidFileID" value="" />
304 <input type="hidden" id="txtFileName" name="txtFileName" readonly="true" />
304 <input type="hidden" name="layoutid" value="$layoutid">305 <input type="hidden" name="layoutid" value="$layoutid">
305 <input type="hidden" name="regionid" value="$regionid">306 <input type="hidden" name="regionid" value="$regionid">
306 <input type="hidden" name="mediaid" value="$mediaid">307 <input type="hidden" name="mediaid" value="$mediaid">
@@ -726,9 +727,18 @@
726 $SQL .= "VALUES ('%s', '%s', '%s', '%s', %d, %d, 0) ";727 $SQL .= "VALUES ('%s', '%s', '%s', '%s', %d, %d, 0) ";
727 728
728 $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid);729 $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid);
730
731 if (!$new_mediaid = $db->insert_query($SQL))
732 {
733 trigger_error($db->error());
734 trigger_error('Error inserting replacement media record.', E_USER_ERROR);
735 }
729 736
730 //What are we going to store this media as...737 //What are we going to store this media as...
731 $storedAs = $new_mediaid.".".$ext;738 $storedAs = $new_mediaid.".".$ext;
739
740 // File upload directory.. get this from the settings object
741 $databaseDir = Config::GetSetting($db, "LIBRARY_LOCATION");
732 742
733 //Now we need to move the file743 //Now we need to move the file
734 if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs))744 if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs))
@@ -754,9 +764,11 @@
754 return $this->response;764 return $this->response;
755 }765 }
756 766
757 //Update the existing record with the new record's id767 // Update the existing record with the new record's id
758 $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $mediaid ";768 $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $new_mediaid ";
759 $SQL .= " WHERE editedMediaID = $mediaid and mediaID <> $new_mediaid ";769 $SQL .= " WHERE IFNULL(editedMediaID,0) <> $new_mediaid AND mediaID = $mediaid ";
770
771 Debug::LogEntry($db, 'audit', $SQL);
760 772
761 if (!$db->query($SQL))773 if (!$db->query($SQL))
762 {774 {
763775
=== modified file 'server/modules/ticker.module.php'
--- server/modules/ticker.module.php 2009-03-13 09:30:23 +0000
+++ server/modules/ticker.module.php 2009-06-18 18:36:21 +0000
@@ -48,7 +48,7 @@
48 $rWidth = Kit::GetParam('rWidth', _REQUEST, _STRING);48 $rWidth = Kit::GetParam('rWidth', _REQUEST, _STRING);
49 $rHeight = Kit::GetParam('rHeight', _REQUEST, _STRING);49 $rHeight = Kit::GetParam('rHeight', _REQUEST, _STRING);
50 50
51 $direction_list = listcontent("none|None,left|Left,right|Right,up|Up,down|Down", "direction");51 $direction_list = listcontent("none|None,left|Left,right|Right,up|Up,down|Down,single|Single", "direction");
52 52
53 $form = <<<FORM53 $form = <<<FORM
54 <form class="XiboTextForm" method="post" action="index.php?p=module&mod=ticker&q=Exec&method=AddMedia">54 <form class="XiboTextForm" method="post" action="index.php?p=module&mod=ticker&q=Exec&method=AddMedia">
@@ -68,6 +68,12 @@
68 <td><input id="duration" name="duration" type="text"></td> 68 <td><input id="duration" name="duration" type="text"></td>
69 </tr>69 </tr>
70 <tr>70 <tr>
71 <td><label for="scrollSpeed" title="The scroll speed of the ticker.">Scroll Speed<span class="required">*</span> (lower is faster)</label></td>
72 <td><input id="scrollSpeed" name="scrollSpeed" type="text" value="30"></td>
73 <td><label for="updateInterval" title="The Interval at which the client should cache the feed.">Update Interval (mins)<span class="required">*</span></label></td>
74 <td><input id="updateInterval" name="updateInterval" type="text" value="360"></td>
75 </tr>
76 <tr>
71 <td colspan="4">77 <td colspan="4">
72 <textarea id="ta_text" name="ta_text">78 <textarea id="ta_text" name="ta_text">
73 [Title] - [Date] - [Description]79 [Title] - [Date] - [Description]
@@ -104,9 +110,11 @@
104 $regionid = $this->regionid;110 $regionid = $this->regionid;
105 $mediaid = $this->mediaid;111 $mediaid = $this->mediaid;
106 112
107 $direction = $this->GetOption('direction');113 $direction = $this->GetOption('direction');
108 $copyright = $this->GetOption('copyright');114 $copyright = $this->GetOption('copyright');
109 $uri = urldecode($this->GetOption('uri'));115 $scrollSpeed = $this->GetOption('scrollSpeed');
116 $updateInterval = $this->GetOption('updateInterval');
117 $uri = urldecode($this->GetOption('uri'));
110 118
111 // Get the text out of RAW119 // Get the text out of RAW
112 $rawXml = new DOMDocument();120 $rawXml = new DOMDocument();
@@ -119,7 +127,7 @@
119 $textNode = $textNodes->item(0);127 $textNode = $textNodes->item(0);
120 $text = $textNode->nodeValue;128 $text = $textNode->nodeValue;
121 129
122 $direction_list = listcontent("none|None,left|Left,right|Right,up|Up,down|Down", "direction", $direction);130 $direction_list = listcontent("none|None,left|Left,right|Right,up|Up,down|Down,single|Single", "direction", $direction);
123 131
124 //Output the form132 //Output the form
125 $form = <<<FORM133 $form = <<<FORM
@@ -141,6 +149,12 @@
141 <td><input id="duration" name="duration" value="$this->duration" type="text"></td> 149 <td><input id="duration" name="duration" value="$this->duration" type="text"></td>
142 </tr>150 </tr>
143 <tr>151 <tr>
152 <td><label for="scrollSpeed" title="The scroll speed of the ticker.">Scroll Speed<span class="required">*</span> (lower is faster)</label></td>
153 <td><input id="scrollSpeed" name="scrollSpeed" type="text" value="$scrollSpeed"></td>
154 <td><label for="updateInterval" title="The Interval at which the client should cache the feed.">Update Interval (mins)<span class="required">*</span></label></td>
155 <td><input id="updateInterval" name="updateInterval" type="text" value="$updateInterval"></td>
156 </tr>
157 <tr>
144 <td colspan="4">158 <td colspan="4">
145 <textarea id="ta_text" name="ta_text">$text</textarea>159 <textarea id="ta_text" name="ta_text">$text</textarea>
146 </td>160 </td>
@@ -179,6 +193,8 @@
179 $uri = Kit::GetParam('uri', _POST, _URI);193 $uri = Kit::GetParam('uri', _POST, _URI);
180 $direction = Kit::GetParam('direction', _POST, _WORD, 'none');194 $direction = Kit::GetParam('direction', _POST, _WORD, 'none');
181 $duration = Kit::GetParam('duration', _POST, _INT, 0);195 $duration = Kit::GetParam('duration', _POST, _INT, 0);
196 $scrollSpeed = Kit::GetParam('scrollSpeed', _POST, _INT, 30);
197 $updateInterval = Kit::GetParam('updateInterval', _POST, _INT, 360);
182 $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING);198 $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING);
183 $copyright = Kit::GetParam('copyright', _POST, _STRING);199 $copyright = Kit::GetParam('copyright', _POST, _STRING);
184 200
@@ -214,6 +230,8 @@
214 // Any Options230 // Any Options
215 $this->SetOption('direction', $direction);231 $this->SetOption('direction', $direction);
216 $this->SetOption('copyright', $copyright);232 $this->SetOption('copyright', $copyright);
233 $this->SetOption('scrollSpeed', $scrollSpeed);
234 $this->SetOption('updateInterval', $updateInterval);
217 $this->SetOption('uri', $uri);235 $this->SetOption('uri', $uri);
218236
219 $this->SetRaw('<template><![CDATA[' . $text . ']]></template>');237 $this->SetRaw('<template><![CDATA[' . $text . ']]></template>');
@@ -249,6 +267,8 @@
249 $direction = Kit::GetParam('direction', _POST, _WORD, 'none');267 $direction = Kit::GetParam('direction', _POST, _WORD, 'none');
250 $duration = Kit::GetParam('duration', _POST, _INT, 0);268 $duration = Kit::GetParam('duration', _POST, _INT, 0);
251 $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING);269 $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING);
270 $scrollSpeed = Kit::GetParam('scrollSpeed', _POST, _INT, 30);
271 $updateInterval = Kit::GetParam('updateInterval', _POST, _INT, 360);
252 $copyright = Kit::GetParam('copyright', _POST, _STRING);272 $copyright = Kit::GetParam('copyright', _POST, _STRING);
253 273
254 $url = "index.php?p=layout&layoutid=$layoutid&regionid=$regionid&q=RegionOptions";274 $url = "index.php?p=layout&layoutid=$layoutid&regionid=$regionid&q=RegionOptions";
@@ -282,6 +302,8 @@
282 // Any Options302 // Any Options
283 $this->SetOption('direction', $direction);303 $this->SetOption('direction', $direction);
284 $this->SetOption('copyright', $copyright);304 $this->SetOption('copyright', $copyright);
305 $this->SetOption('scrollSpeed', $scrollSpeed);
306 $this->SetOption('updateInterval', $updateInterval);
285 $this->SetOption('uri', $uri);307 $this->SetOption('uri', $uri);
286308
287 $this->SetRaw('<template><![CDATA[' . $text . ']]></template>');309 $this->SetRaw('<template><![CDATA[' . $text . ']]></template>');
288310
=== modified file 'server/modules/video.module.php'
--- server/modules/video.module.php 2009-04-01 18:31:33 +0000
+++ server/modules/video.module.php 2009-05-24 09:59:49 +0000
@@ -300,11 +300,12 @@
300 <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span>300 <img src="img/loading.gif"><span style="padding-left:10px">You may fill in the form while your file is uploading.</span>
301 </div>301 </div>
302 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">302 <form class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=EditMedia">
303 <input type="hidden" name="MAX_FILE_SIZE" value="1048576000">
304 <input type="hidden" name="layoutid" value="$layoutid">303 <input type="hidden" name="layoutid" value="$layoutid">
305 <input type="hidden" name="regionid" value="$regionid">304 <input type="hidden" name="regionid" value="$regionid">
306 <input type="hidden" name="mediaid" value="$mediaid">305 <input type="hidden" name="mediaid" value="$mediaid">
307 <input type="hidden" name="lkid" value="$lkid">306 <input type="hidden" name="lkid" value="$lkid">
307 <input type="hidden" name="hidFileID" id="hidFileID" value="" />
308 <input type="hidden" id="txtFileName" name="txtFileName" readonly="true" />
308 <input type="hidden" id="PHPSESSID" value="$sessionId" />309 <input type="hidden" id="PHPSESSID" value="$sessionId" />
309 <input type="hidden" id="SecurityToken" value="$securityToken" />310 <input type="hidden" id="SecurityToken" value="$securityToken" />
310 <table>311 <table>
@@ -713,9 +714,18 @@
713 $SQL .= "VALUES ('%s', '%s', '%s', '%s', %d, %d, 0) ";714 $SQL .= "VALUES ('%s', '%s', '%s', '%s', %d, %d, 0) ";
714 715
715 $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid);716 $SQL = sprintf($SQL, $db->escape_string($name), $this->type, $db->escape_string($duration), $db->escape_string($fileName), $permissionid, $userid);
717
718 if (!$new_mediaid = $db->insert_query($SQL))
719 {
720 trigger_error($db->error());
721 trigger_error('Error inserting replacement media record.', E_USER_ERROR);
722 }
716 723
717 //What are we going to store this media as...724 //What are we going to store this media as...
718 $storedAs = $new_mediaid.".".$ext;725 $storedAs = $new_mediaid.".".$ext;
726
727 // File upload directory.. get this from the settings object
728 $databaseDir = Config::GetSetting($db, "LIBRARY_LOCATION");
719 729
720 //Now we need to move the file730 //Now we need to move the file
721 if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs))731 if (!$result = rename($databaseDir."/temp/".$tmpName, $databaseDir.$storedAs))
@@ -731,7 +741,7 @@
731 }741 }
732 }742 }
733 743
734 //Update the media record to include this information744 // Update the media record to include this information
735 $SQL = "UPDATE media SET storedAs = '$storedAs' WHERE mediaid = $new_mediaid";745 $SQL = "UPDATE media SET storedAs = '$storedAs' WHERE mediaid = $new_mediaid";
736 if (!$db->query($SQL))746 if (!$db->query($SQL))
737 {747 {
@@ -741,9 +751,11 @@
741 return $this->response;751 return $this->response;
742 }752 }
743 753
744 //Update the existing record with the new record's id754 // Update the existing record with the new record's id
745 $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $mediaid ";755 $SQL = "UPDATE media SET isEdited = 1, editedMediaID = $new_mediaid ";
746 $SQL .= " WHERE editedMediaID = $mediaid and mediaID <> $new_mediaid ";756 $SQL .= " WHERE IFNULL(editedMediaID,0) <> $new_mediaid AND mediaID = $mediaid ";
757
758 Debug::LogEntry($db, 'audit', $SQL);
747 759
748 if (!$db->query($SQL))760 if (!$db->query($SQL))
749 {761 {
750762
=== modified file 'server/template/css/presentation.css'
--- server/template/css/presentation.css 2009-01-04 12:59:11 +0000
+++ server/template/css/presentation.css 2009-06-20 09:34:43 +0000
@@ -1153,6 +1153,21 @@
1153 margin-left:9px;1153 margin-left:9px;
1154}1154}
11551155
1156.timebar_embedded_left{
1157 background:url(../../img/forms/green_bar.gif) no-repeat;
1158 background-position:top left;
1159 height:59px;
1160 width:9px;
1161 float:left;
1162}
1163
1164.timebar_embedded_right{
1165 background:url(../../img/forms/green_bar.gif) no-repeat;
1166 background-position:top right;
1167 height:59px;
1168 margin-left:9px;
1169}
1170
1156.timebar_text_left{1171.timebar_text_left{
1157 background:url(../../img/forms/yellow_bar.gif) no-repeat;1172 background:url(../../img/forms/yellow_bar.gif) no-repeat;
1158 background-position:top left;1173 background-position:top left;
11591174
=== modified file 'server/template/css/xibo.css'
--- server/template/css/xibo.css 2009-03-22 17:58:21 +0000
+++ server/template/css/xibo.css 2009-06-20 12:00:21 +0000
@@ -41,3 +41,19 @@
41.ReportFault ol li {41.ReportFault ol li {
42 display: list-item;42 display: list-item;
43}43}
44
45.moduleButtonImage {
46 width: 65px;
47}
48
49#embedHtml {
50 width: 500px;
51 height: 310px;
52}
53
54.regionTransparency {
55 position: absolute;
56 background-color: #FFF;
57 opacity: .75;
58 filter: alpha(opacity=75);
59}
4460
=== modified file 'server/upgrade.php'
--- server/upgrade.php 2009-05-02 10:12:58 +0000
+++ server/upgrade.php 2009-06-15 08:16:19 +0000
@@ -249,6 +249,7 @@
249 backup_tables($db, '*');249 backup_tables($db, '*');
250 echo '</p>';250 echo '</p>';
251251
252 $sqlStatementCount = 0;
252 // Now loop over the entire upgrade. Run the SQLs and PHP interleaved.253 // Now loop over the entire upgrade. Run the SQLs and PHP interleaved.
253 for ($i=$_SESSION['upgradeFrom'] + 1; (($i <= $_SESSION['upgradeTo']) && ($fault==false)) ; $i++) {254 for ($i=$_SESSION['upgradeFrom'] + 1; (($i <= $_SESSION['upgradeTo']) && ($fault==false)) ; $i++) {
254 if (file_exists('install/database/' . $i . '.sql')) {255 if (file_exists('install/database/' . $i . '.sql')) {
@@ -260,11 +261,12 @@
260 $sql_file = split_sql_file($sql_file, $delimiter);261 $sql_file = split_sql_file($sql_file, $delimiter);
261 262
262 foreach ($sql_file as $sql) {263 foreach ($sql_file as $sql) {
263 print ".";264 print ".";
265 $sqlStatementCount++;
264 flush();266 flush();
265 if (! $db->query($sql)) {267 if (! $db->query($sql)) {
266 $fault = true;268 $fault = true;
267 reportError("0", "An error occured populating the database.<br /><br />MySQL Error:<br />" . $db->error());269 reportError("0", "An error occured populating the database.<br /><br />MySQL Error:<br />" . $db->error() . "<br /><br />SQL executed:<br />" . $sql . "<br /><br />Statement number: " . $sqlStatementCount);
268 }270 }
269 }271 }
270 echo '</p>';272 echo '</p>';
271273
=== modified file 'server/xmds.php'
--- server/xmds.php 2009-03-30 18:34:54 +0000
+++ server/xmds.php 2009-06-03 11:55:05 +0000
@@ -374,7 +374,12 @@
374 if (Config::GetSetting($db,'PHONE_HOME') == 'On') {374 if (Config::GetSetting($db,'PHONE_HOME') == 'On') {
375 // Find out when we last PHONED_HOME :D375 // Find out when we last PHONED_HOME :D
376 // If it's been > 28 days since last PHONE_HOME then376 // If it's been > 28 days since last PHONE_HOME then
377 if (Config::GetSetting($db,'PHONE_HOME_DATE') < (time() - (60 * 60 * 24 * 28))) {377 if (Config::GetSetting($db,'PHONE_HOME_DATE') < (time() - (60 * 60 * 24 * 28))) {
378
379 if ($displayInfo['isAuditing'] == 1)
380 {
381 Debug::LogEntry($db, "audit", "PHONE_HOME [IN]", "xmds", "RequiredFiles");
382 }
378383
379 // Retrieve number of displays384 // Retrieve number of displays
380 $SQL = "SELECT COUNT(*)385 $SQL = "SELECT COUNT(*)
@@ -397,9 +402,7 @@
397 if ($displayInfo['isAuditing'] == 1) 402 if ($displayInfo['isAuditing'] == 1)
398 {403 {
399 Debug::LogEntry($db, "audit", "PHONE_HOME_URL " . $PHONE_HOME_URL , "xmds", "RequiredFiles"); 404 Debug::LogEntry($db, "audit", "PHONE_HOME_URL " . $PHONE_HOME_URL , "xmds", "RequiredFiles");
400 }405 }
401
402 @file_get_contents($PHONE_HOME_URL);
403 406
404 // Set PHONE_HOME_TIME to NOW.407 // Set PHONE_HOME_TIME to NOW.
405 $SQL = "UPDATE `setting`408 $SQL = "UPDATE `setting`
@@ -410,6 +413,13 @@
410 {413 {
411 trigger_error($db->error());414 trigger_error($db->error());
412 }415 }
416
417 @file_get_contents($PHONE_HOME_URL);
418
419 if ($displayInfo['isAuditing'] == 1)
420 {
421 Debug::LogEntry($db, "audit", "PHONE_HOME [OUT]", "xmds", "RequiredFiles");
422 }
413 //endif423 //endif
414 }424 }
415 }425 }

Subscribers

People subscribed via source and target branches