@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | if (count($next_ids) > 0) { |
117 | 117 | $next = $next_ids[0]; |
118 | 118 | } else { |
119 | - $next = $this->querySingle('SELECT MAX(id) FROM window') + 1; |
|
119 | + $next = $this->querySingle('SELECT MAX(id) FROM window')+1; |
|
120 | 120 | } |
121 | 121 | return $next; |
122 | 122 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | // TODO: Support more than one address for a given username. |
141 | 141 | $this->exec("INSERT OR IGNORE INTO user VALUES (NULL, '$username', 1, 0)"); |
142 | 142 | $usercount = $this->querySingle("SELECT COUNT(*) FROM user"); |
143 | - $userid = $this->querySingle("SELECT userid from user where name='".$username."'"); |
|
143 | + $userid = $this->querySingle("SELECT userid from user where name='" . $username . "'"); |
|
144 | 144 | $this->exec("INSERT INTO address VALUES ('$userid', '$address', '$device')"); |
145 | 145 | trace("user $username connected with $device, $usercount user(s) now connected"); |
146 | 146 | if ($usercount == 1) { |
@@ -233,13 +233,13 @@ discard block |
||
233 | 233 | |
234 | 234 | public function getWindowState($window_id) |
235 | 235 | { |
236 | - $state = @$this->querySingle('SELECT state FROM window WHERE win_id="'.$window_id.'"'); |
|
236 | + $state = @$this->querySingle('SELECT state FROM window WHERE win_id="' . $window_id . '"'); |
|
237 | 237 | return $state; |
238 | 238 | } |
239 | 239 | |
240 | 240 | public function setWindowState($window_id, $state) |
241 | 241 | { |
242 | - $this->exec('UPDATE window SET state="'.$state.'" WHERE win_id="'.$window_id.'"'); |
|
242 | + $this->exec('UPDATE window SET state="' . $state . '" WHERE win_id="' . $window_id . '"'); |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | public function insertWindow($window) |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | |
258 | 258 | public function deleteWindow($window_id) |
259 | 259 | { |
260 | - $this->exec('DELETE FROM window WHERE win_id="'.$window_id.'"'); |
|
260 | + $this->exec('DELETE FROM window WHERE win_id="' . $window_id . '"'); |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | /* |
@@ -268,12 +268,12 @@ discard block |
||
268 | 268 | |
269 | 269 | public function deleteDebug($table, $id, $gt) |
270 | 270 | { |
271 | - $this->exec('DELETE FROM '.$table.' WHERE '.$id.' >"'.$gt.'"'); |
|
271 | + $this->exec('DELETE FROM ' . $table . ' WHERE ' . $id . ' >"' . $gt . '"'); |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | public function updateWindow($window_id, $field, $value) |
275 | 275 | { |
276 | - $this->exec('UPDATE window SET '.$field.'="'.$value.'" WHERE win_id="'.$window_id.'"'); |
|
276 | + $this->exec('UPDATE window SET ' . $field . '="' . $value . '" WHERE win_id="' . $window_id . '"'); |
|
277 | 277 | } |
278 | 278 | } |
279 | 279 |
@@ -72,18 +72,18 @@ discard block |
||
72 | 72 | $hostname = $this->parseHostname($buffer); |
73 | 73 | $exit = $this->parseExit($buffer); |
74 | 74 | |
75 | - if ($ip!="") { |
|
75 | + if ($ip != "") { |
|
76 | 76 | $client["ip"] = $ip; |
77 | 77 | } |
78 | - if ($hostname!="") { |
|
78 | + if ($hostname != "") { |
|
79 | 79 | $client["hostname"] = $hostname; |
80 | 80 | } |
81 | - if ($exit!=0) { |
|
81 | + if ($exit != 0) { |
|
82 | 82 | $client["exit"] = $exit; |
83 | 83 | } |
84 | 84 | |
85 | 85 | if (strstr($buffer, 'create_image') && $client["ip"] != "" && |
86 | - $client["hostname"]!="" ) { |
|
86 | + $client["hostname"] != "") { |
|
87 | 87 | |
88 | 88 | // add client |
89 | 89 | $this->addClient($client["ip"], $client["hostname"]); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | } |
104 | 104 | |
105 | - $halt=$this->_CONNECTIONS; |
|
105 | + $halt = $this->_CONNECTIONS; |
|
106 | 106 | |
107 | 107 | if ($halt == -1) { |
108 | 108 | exit(0); |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | $ip = ""; |
122 | 122 | $line = $buffer; |
123 | 123 | if (strpos($line, "Reverse VNC connection from IP")) { |
124 | - $line=trim($line); |
|
125 | - $item=explode(":", $line); |
|
126 | - $ip=trim($item[1]); |
|
127 | - $ip=preg_replace('/\W\W\d{4}\/\d{2}\/\d{2} \d{2}/', '', $ip); |
|
124 | + $line = trim($line); |
|
125 | + $item = explode(":", $line); |
|
126 | + $ip = trim($item[1]); |
|
127 | + $ip = preg_replace('/\W\W\d{4}\/\d{2}\/\d{2} \d{2}/', '', $ip); |
|
128 | 128 | } |
129 | 129 | |
130 | - if ($ip!="") { |
|
130 | + if ($ip != "") { |
|
131 | 131 | print("\nFOUND IP: " . $ip . "\n"); |
132 | 132 | } |
133 | 133 | |
@@ -139,13 +139,13 @@ discard block |
||
139 | 139 | $hostname = ""; |
140 | 140 | $line = $buffer; |
141 | 141 | if (strpos($line, "Hostname")) { |
142 | - $line=trim($line); |
|
143 | - $item=explode(":", $line); |
|
144 | - $hostname=trim($item[1]); |
|
145 | - $hostname=preg_replace('/\.uni\-mannheim\.de/', '', $hostname); |
|
142 | + $line = trim($line); |
|
143 | + $item = explode(":", $line); |
|
144 | + $hostname = trim($item[1]); |
|
145 | + $hostname = preg_replace('/\.uni\-mannheim\.de/', '', $hostname); |
|
146 | 146 | } |
147 | 147 | |
148 | - if ($hostname!="") { |
|
148 | + if ($hostname != "") { |
|
149 | 149 | print("\nFOUND HOSTNAME: " . $hostname . "\n"); |
150 | 150 | } |
151 | 151 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $exit = 1; |
160 | 160 | } |
161 | 161 | |
162 | - if ($exit!=0) { |
|
162 | + if ($exit != 0) { |
|
163 | 163 | print("\nCLIENT HAS DISCONNECTED " . $exit . "\n"); |
164 | 164 | } |
165 | 165 | |
@@ -175,9 +175,9 @@ discard block |
||
175 | 175 | "exit" => 0 |
176 | 176 | ); |
177 | 177 | if (count($this->_VNC_CLIENTS) == 0) { |
178 | - $id=1; |
|
178 | + $id = 1; |
|
179 | 179 | } else { |
180 | - $id=count($this->_VNC_CLIENTS) + 1; |
|
180 | + $id = count($this->_VNC_CLIENTS)+1; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | $this->_VNC_CLIENTS[$id] = $vncclient; |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | $this->_CONNECTIONS++; |
193 | 193 | |
194 | - print("\n active connections: ".$this->_CONNECTIONS+1); |
|
194 | + print("\n active connections: " . $this->_CONNECTIONS+1); |
|
195 | 195 | print("\n all saved clients: " . serialize($this->_VNC_CLIENTS)); |
196 | 196 | |
197 | 197 | } |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | foreach ($inactive_vnc_window_ids as $inactive_win_id) { |
305 | 305 | // define vnc-id |
306 | - $inactive_vnc_id = $db->querySingle("SELECT file FROM window WHERE win_id='".$inactive_win_id."'"); |
|
306 | + $inactive_vnc_id = $db->querySingle("SELECT file FROM window WHERE win_id='" . $inactive_win_id . "'"); |
|
307 | 307 | |
308 | 308 | // delete from database (send to control.php) |
309 | 309 | $curl = curl_init(); |
@@ -38,17 +38,17 @@ discard block |
||
38 | 38 | var $error = 0; // public variable that holds error code (0 if no error) |
39 | 39 | |
40 | 40 | //private: |
41 | - var $BYTEORDER = 0; // 0: low endian, 1: big endian |
|
41 | + var $BYTEORDER = 0; // 0: low endian, 1: big endian |
|
42 | 42 | var $STREAM = NULL; |
43 | 43 | var $short_circuit = false; |
44 | 44 | var $enable_cache = false; |
45 | - var $originals = NULL; // offset of original table |
|
46 | - var $translations = NULL; // offset of translation table |
|
47 | - var $pluralheader = NULL; // cache header field for plural forms |
|
48 | - var $total = 0; // total string count |
|
49 | - var $table_originals = NULL; // table for original strings (offsets) |
|
50 | - var $table_translations = NULL; // table for translated strings (offsets) |
|
51 | - var $cache_translations = NULL; // original -> translation mapping |
|
45 | + var $originals = NULL; // offset of original table |
|
46 | + var $translations = NULL; // offset of translation table |
|
47 | + var $pluralheader = NULL; // cache header field for plural forms |
|
48 | + var $total = 0; // total string count |
|
49 | + var $table_originals = NULL; // table for original strings (offsets) |
|
50 | + var $table_translations = NULL; // table for translated strings (offsets) |
|
51 | + var $cache_translations = NULL; // original -> translation mapping |
|
52 | 52 | |
53 | 53 | |
54 | 54 | /* Methods */ |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | function readint() { |
64 | 64 | if ($this->BYTEORDER == 0) { |
65 | 65 | // low endian |
66 | - $input=unpack('V', $this->STREAM->read(4)); |
|
66 | + $input = unpack('V', $this->STREAM->read(4)); |
|
67 | 67 | return array_shift($input); |
68 | 68 | } else { |
69 | 69 | // big endian |
70 | - $input=unpack('N', $this->STREAM->read(4)); |
|
70 | + $input = unpack('N', $this->STREAM->read(4)); |
|
71 | 71 | return array_shift($input); |
72 | 72 | } |
73 | 73 | } |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | function readintarray($count) { |
86 | 86 | if ($this->BYTEORDER == 0) { |
87 | 87 | // low endian |
88 | - return unpack('V'.$count, $this->STREAM->read(4 * $count)); |
|
88 | + return unpack('V' . $count, $this->STREAM->read(4 * $count)); |
|
89 | 89 | } else { |
90 | 90 | // big endian |
91 | - return unpack('N'.$count, $this->STREAM->read(4 * $count)); |
|
91 | + return unpack('N' . $count, $this->STREAM->read(4 * $count)); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | function __construct($Reader, $enable_cache = true) { |
102 | 102 | // If there isn't a StreamReader, turn on short circuit mode. |
103 | - if (! $Reader || isset($Reader->error) ) { |
|
103 | + if (!$Reader || isset($Reader->error)) { |
|
104 | 104 | $this->short_circuit = true; |
105 | 105 | return; |
106 | 106 | } |
@@ -154,13 +154,13 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | if ($this->enable_cache) { |
157 | - $this->cache_translations = array (); |
|
157 | + $this->cache_translations = array(); |
|
158 | 158 | /* read all strings in the cache */ |
159 | 159 | for ($i = 0; $i < $this->total; $i++) { |
160 | - $this->STREAM->seekto($this->table_originals[$i * 2 + 2]); |
|
161 | - $original = $this->STREAM->read($this->table_originals[$i * 2 + 1]); |
|
162 | - $this->STREAM->seekto($this->table_translations[$i * 2 + 2]); |
|
163 | - $translation = $this->STREAM->read($this->table_translations[$i * 2 + 1]); |
|
160 | + $this->STREAM->seekto($this->table_originals[$i * 2+2]); |
|
161 | + $original = $this->STREAM->read($this->table_originals[$i * 2+1]); |
|
162 | + $this->STREAM->seekto($this->table_translations[$i * 2+2]); |
|
163 | + $translation = $this->STREAM->read($this->table_translations[$i * 2+1]); |
|
164 | 164 | $this->cache_translations[$original] = $translation; |
165 | 165 | } |
166 | 166 | } |
@@ -174,13 +174,13 @@ discard block |
||
174 | 174 | * @return string Requested string if found, otherwise '' |
175 | 175 | */ |
176 | 176 | function get_original_string($num) { |
177 | - $length = $this->table_originals[$num * 2 + 1]; |
|
178 | - $offset = $this->table_originals[$num * 2 + 2]; |
|
179 | - if (! $length) |
|
177 | + $length = $this->table_originals[$num * 2+1]; |
|
178 | + $offset = $this->table_originals[$num * 2+2]; |
|
179 | + if (!$length) |
|
180 | 180 | return ''; |
181 | 181 | $this->STREAM->seekto($offset); |
182 | 182 | $data = $this->STREAM->read($length); |
183 | - return (string)$data; |
|
183 | + return (string) $data; |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | /** |
@@ -191,13 +191,13 @@ discard block |
||
191 | 191 | * @return string Requested string if found, otherwise '' |
192 | 192 | */ |
193 | 193 | function get_translation_string($num) { |
194 | - $length = $this->table_translations[$num * 2 + 1]; |
|
195 | - $offset = $this->table_translations[$num * 2 + 2]; |
|
196 | - if (! $length) |
|
194 | + $length = $this->table_translations[$num * 2+1]; |
|
195 | + $offset = $this->table_translations[$num * 2+2]; |
|
196 | + if (!$length) |
|
197 | 197 | return ''; |
198 | 198 | $this->STREAM->seekto($offset); |
199 | 199 | $data = $this->STREAM->read($length); |
200 | - return (string)$data; |
|
200 | + return (string) $data; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $start = 0; |
216 | 216 | $end = $this->total; |
217 | 217 | } |
218 | - if (abs($start - $end) <= 1) { |
|
218 | + if (abs($start-$end) <= 1) { |
|
219 | 219 | // We're done, now we either found the string, or it doesn't exist |
220 | 220 | $txt = $this->get_original_string($start); |
221 | 221 | if ($string == $txt) |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | return $this->find_string($string, $end, $start); |
228 | 228 | } else { |
229 | 229 | // Divide table in two parts |
230 | - $half = (int)(($start + $end) / 2); |
|
230 | + $half = (int) (($start+$end) / 2); |
|
231 | 231 | $cmp = strcmp($string, $this->get_original_string($half)); |
232 | 232 | if ($cmp == 0) |
233 | 233 | // string is exactly in the middle => return it |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $res .= ') : ('; |
295 | 295 | break; |
296 | 296 | case ';': |
297 | - $res .= str_repeat( ')', $p) . ';'; |
|
297 | + $res .= str_repeat(')', $p) . ';'; |
|
298 | 298 | $p = 0; |
299 | 299 | break; |
300 | 300 | default: |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | $this->load_tables(); |
331 | 331 | |
332 | 332 | // cache header field for plural forms |
333 | - if (! is_string($this->pluralheader)) { |
|
333 | + if (!is_string($this->pluralheader)) { |
|
334 | 334 | if ($this->enable_cache) { |
335 | 335 | $header = $this->cache_translations[""]; |
336 | 336 | } else { |
@@ -351,15 +351,15 @@ discard block |
||
351 | 351 | */ |
352 | 352 | function select_string($n) { |
353 | 353 | $string = $this->get_plural_forms(); |
354 | - $string = str_replace('nplurals',"\$total",$string); |
|
355 | - $string = str_replace("n",$n,$string); |
|
356 | - $string = str_replace('plural',"\$plural",$string); |
|
354 | + $string = str_replace('nplurals', "\$total", $string); |
|
355 | + $string = str_replace("n", $n, $string); |
|
356 | + $string = str_replace('plural', "\$plural", $string); |
|
357 | 357 | |
358 | 358 | $total = 0; |
359 | 359 | $plural = 0; |
360 | 360 | |
361 | 361 | eval("$string"); |
362 | - if ($plural >= $total) $plural = $total - 1; |
|
362 | + if ($plural >= $total) $plural = $total-1; |
|
363 | 363 | return $plural; |
364 | 364 | } |
365 | 365 | |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | |
389 | 389 | |
390 | 390 | if ($this->enable_cache) { |
391 | - if (! array_key_exists($key, $this->cache_translations)) { |
|
391 | + if (!array_key_exists($key, $this->cache_translations)) { |
|
392 | 392 | return ($number != 1) ? $plural : $single; |
393 | 393 | } else { |
394 | 394 | $result = $this->cache_translations[$key]; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | var $_pos; |
50 | 50 | var $_str; |
51 | 51 | |
52 | - function __construct($str='') { |
|
52 | + function __construct($str = '') { |
|
53 | 53 | $this->_str = $str; |
54 | 54 | $this->_pos = 0; |
55 | 55 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | function read($bytes) { |
58 | 58 | $data = substr($this->_str, $this->_pos, $bytes); |
59 | 59 | $this->_pos += $bytes; |
60 | - if (strlen($this->_str)<$this->_pos) |
|
60 | + if (strlen($this->_str) < $this->_pos) |
|
61 | 61 | $this->_pos = strlen($this->_str); |
62 | 62 | |
63 | 63 | return $data; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | function seekto($pos) { |
67 | 67 | $this->_pos = $pos; |
68 | - if (strlen($this->_str)<$this->_pos) |
|
68 | + if (strlen($this->_str) < $this->_pos) |
|
69 | 69 | $this->_pos = strlen($this->_str); |
70 | 70 | return $this->_pos; |
71 | 71 | } |
@@ -89,9 +89,9 @@ discard block |
||
89 | 89 | function __construct($filename) { |
90 | 90 | if (file_exists($filename)) { |
91 | 91 | |
92 | - $this->_length=filesize($filename); |
|
92 | + $this->_length = filesize($filename); |
|
93 | 93 | $this->_pos = 0; |
94 | - $this->_fd = fopen($filename,'rb'); |
|
94 | + $this->_fd = fopen($filename, 'rb'); |
|
95 | 95 | if (!$this->_fd) { |
96 | 96 | $this->error = 3; // Cannot read file, probably permissions |
97 | 97 | return false; |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | function __construct($filename) { |
147 | 147 | if (file_exists($filename)) { |
148 | 148 | |
149 | - $length=filesize($filename); |
|
150 | - $fd = fopen($filename,'rb'); |
|
149 | + $length = filesize($filename); |
|
150 | + $fd = fopen($filename, 'rb'); |
|
151 | 151 | |
152 | 152 | if (!$fd) { |
153 | 153 | $this->error = 3; // Cannot read file, probably permissions |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | // LC_MESSAGES is not available if php-gettext is not loaded |
36 | 36 | // while the other constants are already available from session extension. |
37 | 37 | if (!defined('LC_MESSAGES')) { |
38 | - define('LC_MESSAGES', 5); |
|
38 | + define('LC_MESSAGES', 5); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | require('streams.php'); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (preg_match("/^(?P<lang>[a-z]{2,3})" // language code |
78 | 78 | ."(?:_(?P<country>[A-Z]{2}))?" // country code |
79 | 79 | ."(?:\.(?P<charset>[-A-Za-z0-9_]+))?" // charset |
80 | - ."(?:@(?P<modifier>[-A-Za-z0-9_]+))?$/", // @ modifier |
|
80 | + ."(?:@(?P<modifier>[-A-Za-z0-9_]+))?$/", // @ modifier |
|
81 | 81 | $locale, $matches)) { |
82 | 82 | |
83 | 83 | if (isset($matches["lang"])) $lang = $matches["lang"]; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | /** |
114 | 114 | * Utility function to get a StreamReader for the given text domain. |
115 | 115 | */ |
116 | -function _get_reader($domain=null, $category=5, $enable_cache=true) { |
|
116 | +function _get_reader($domain = null, $category = 5, $enable_cache = true) { |
|
117 | 117 | global $text_domains, $default_domain, $LC_CATEGORIES; |
118 | 118 | if (!isset($domain)) $domain = $default_domain; |
119 | 119 | if (!isset($text_domains[$domain]->l10n)) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $locale = _setlocale(LC_MESSAGES, 0); |
122 | 122 | $bound_path = isset($text_domains[$domain]->path) ? |
123 | 123 | $text_domains[$domain]->path : './'; |
124 | - $subpath = $LC_CATEGORIES[$category] ."/$domain.mo"; |
|
124 | + $subpath = $LC_CATEGORIES[$category] . "/$domain.mo"; |
|
125 | 125 | |
126 | 126 | $locale_names = get_list_of_locales($locale); |
127 | 127 | $input = null; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | /** |
155 | 155 | * Checks if the current locale is supported on this system. |
156 | 156 | */ |
157 | -function _check_locale_and_function($function=false) { |
|
157 | +function _check_locale_and_function($function = false) { |
|
158 | 158 | global $EMULATEGETTEXT; |
159 | 159 | if ($function and !function_exists($function)) |
160 | 160 | return false; |
@@ -164,10 +164,10 @@ discard block |
||
164 | 164 | /** |
165 | 165 | * Get the codeset for the given domain. |
166 | 166 | */ |
167 | -function _get_codeset($domain=null) { |
|
167 | +function _get_codeset($domain = null) { |
|
168 | 168 | global $text_domains, $default_domain, $LC_CATEGORIES; |
169 | 169 | if (!isset($domain)) $domain = $default_domain; |
170 | - return (isset($text_domains[$domain]->codeset))? $text_domains[$domain]->codeset : ini_get('mbstring.internal_encoding'); |
|
170 | + return (isset($text_domains[$domain]->codeset)) ? $text_domains[$domain]->codeset : ini_get('mbstring.internal_encoding'); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
@@ -22,7 +22,7 @@ |
||
22 | 22 | if (file_exists($filepath)) { |
23 | 23 | // file exists: return file for download |
24 | 24 | header('Content-Type: application/octet-stream'); |
25 | - header('Content-Disposition: attachment; filename="'.addslashes($filename).'"'); |
|
25 | + header('Content-Disposition: attachment; filename="' . addslashes($filename) . '"'); |
|
26 | 26 | readfile($filepath); |
27 | 27 | } else { |
28 | 28 | // file does not exist: 404 Not Found |
@@ -92,7 +92,7 @@ |
||
92 | 92 | if (is_dir($pictures)) { |
93 | 93 | $filelist = scandir($pictures); |
94 | 94 | sort($filelist, SORT_NATURAL); |
95 | - foreach($filelist as $file) { |
|
95 | + foreach ($filelist as $file) { |
|
96 | 96 | $picture = "$pictures/$file"; |
97 | 97 | if (is_file($picture)) { |
98 | 98 | echo("<li style=\"background-image: url('$picture'); background-repeat: no-repeat\"></li>\n"); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | // Shortcuts for combinations of controls. |
91 | 91 | const CURSOR = 15; // UP | DOWN | LEFT | RIGHT |
92 | - const ZOOM = 48; // ZOOMIN | ZOOMOUT |
|
92 | + const ZOOM = 48; // ZOOMIN | ZOOMOUT |
|
93 | 93 | const ALL = 2047; |
94 | 94 | |
95 | 95 | // up down left right zoomin zoomout home end prior next download |
@@ -108,27 +108,27 @@ discard block |
||
108 | 108 | // $params; |
109 | 109 | // echo $ftype; |
110 | 110 | if ($ftype === 'pdf') { |
111 | - $fhandler='/usr/bin/zathura'; |
|
111 | + $fhandler = '/usr/bin/zathura'; |
|
112 | 112 | |
113 | 113 | } elseif ($ftype === 'gif' || $ftype === 'jpg' || $ftype === 'png') { |
114 | - $fhandler='/usr/bin/eog'; |
|
114 | + $fhandler = '/usr/bin/eog'; |
|
115 | 115 | |
116 | 116 | } elseif ($ftype === 'doc' || $ftype === 'docx' || $ftype === 'odt' || $ftype === 'txt') { |
117 | - $fhandler='/usr/bin/libreoffice --writer -o -n --nologo --norestore --view'; |
|
117 | + $fhandler = '/usr/bin/libreoffice --writer -o -n --nologo --norestore --view'; |
|
118 | 118 | |
119 | 119 | } elseif ($ftype === 'ppt' || $ftype === 'pptx' || $ftype === 'pps' || $ftype === 'ppsx' || $ftype === 'odp') { |
120 | 120 | // optional --show (presentation mode) |
121 | - $fhandler='/usr/bin/libreoffice --impress -o -n --nologo --norestore --view'; |
|
121 | + $fhandler = '/usr/bin/libreoffice --impress -o -n --nologo --norestore --view'; |
|
122 | 122 | |
123 | 123 | } elseif ($ftype === 'xls' || $ftype === 'xlsx' || $ftype === 'ods') { |
124 | - $fhandler='/usr/bin/libreoffice --calc -o -n --nologo --norestore --view'; |
|
124 | + $fhandler = '/usr/bin/libreoffice --calc -o -n --nologo --norestore --view'; |
|
125 | 125 | |
126 | 126 | } elseif ($ftype === 'html' || $ftype === 'url') { |
127 | - $fhandler='/usr/bin/dwb --override-restore'; |
|
127 | + $fhandler = '/usr/bin/dwb --override-restore'; |
|
128 | 128 | |
129 | 129 | } elseif ($ftype === 'mpg' || $ftype === 'mpeg' || $ftype === 'avi' || |
130 | 130 | $ftype === 'mp3' || $ftype === 'mp4') { |
131 | - $fhandler='/usr/bin/cvlc --no-audio'; |
|
131 | + $fhandler = '/usr/bin/cvlc --no-audio'; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /* |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $section = $w['section']; |
193 | 193 | if ($section >= 1 && $section <= $maxSection && $enabled) { |
194 | 194 | // Show window, set size and position. |
195 | - $wi = $section - 1; |
|
195 | + $wi = $section-1; |
|
196 | 196 | $dx = $screenWidth / $dim[$wi][2]; |
197 | 197 | $dy = $screenHeight / $dim[$wi][3]; |
198 | 198 | $x = $dim[$wi][0] * $dx; |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | if ($windownumber != 'vncwin') { |
323 | 323 | // This is the normal case. |
324 | 324 | // Special handling is needed when called with window=vncwin, see below. |
325 | - $window = $windownumber - 1; |
|
325 | + $window = $windownumber-1; |
|
326 | 326 | |
327 | 327 | // TODO: $win_id und $windowname können vermutlich zusammengefasst werden. |
328 | 328 | $win_id = $db->getWindowIDBySection($windownumber); |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | trace("+++ DELETE VNC Client FROM DAEMON +++"); |
389 | 389 | // call via daemon: ?window=vncwin&delete=VNC&vncid=123 |
390 | 390 | trace("vnc delete in control"); |
391 | - $win_id = $_REQUEST['vncid']; // = hexWindow in database, but not on screen |
|
391 | + $win_id = $_REQUEST['vncid']; // = hexWindow in database, but not on screen |
|
392 | 392 | trace("VNC cia Daemon ... id=$win_id"); |
393 | 393 | |
394 | 394 | } elseif (strstr($delete, "http")) { |