equal
deleted
inserted
replaced
1 <?php |
1 <?php |
2 |
2 |
3 /** |
3 /** |
4 * Utility functions |
4 * Utility functions |
5 * |
5 * |
6 * Web control interface script for Amarok |
6 * Greyhound - real web management for Amarok |
7 * Copyright (C) 2008 Dan Fuhry |
7 * Copyright (C) 2008 Dan Fuhry |
8 * |
8 * |
9 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
9 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
10 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
10 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
11 * |
11 * |
22 * @param string Error message |
22 * @param string Error message |
23 */ |
23 */ |
24 |
24 |
25 function burnout($msg) |
25 function burnout($msg) |
26 { |
26 { |
27 echo "\x1B[31;1m[WebControl] fatal: \x1B[37;1m"; |
27 echo "\x1B[31;1m[Greyhound] fatal: \x1B[37;1m"; |
28 echo "$msg\x1B[0m\n"; |
28 echo "$msg\x1B[0m\n"; |
29 exit(1); |
29 exit(1); |
30 } |
30 } |
31 |
31 |
32 /** |
32 /** |
34 * @param string Status message |
34 * @param string Status message |
35 */ |
35 */ |
36 |
36 |
37 function status($msg) |
37 function status($msg) |
38 { |
38 { |
39 echo "\x1B[32;1m[WebControl] \x1B[32;0m$msg\x1B[0m\n"; |
39 echo "\x1B[32;1m[Greyhound] \x1B[32;0m$msg\x1B[0m\n"; |
40 } |
40 } |
41 |
41 |
42 /** |
42 /** |
43 * Performs an action with DCOP. |
43 * Performs an action with DCOP. |
44 * @param string DCOP component, e.g. player, playlist, playlistbrowser, ... |
44 * @param string DCOP component, e.g. player, playlist, playlistbrowser, ... |