functions.php
changeset 13 b5db2345c397
parent 9 63a257541313
child 14 7a1573676cc4
--- a/functions.php	Wed Mar 26 10:24:20 2008 -0400
+++ b/functions.php	Wed Mar 26 11:10:20 2008 -0400
@@ -44,6 +44,18 @@
 }
 
 /**
+ * Print a stylized warning message, compatible with Linux consoles
+ * @param string message message
+ */
+
+function warning($msg)
+{
+  $h = @fopen('php://stderr', 'w');
+  fwrite($h, "\x1B[33;1m[Greyhound] \x1B[0m\x1B[33mWarning:\x1B[0m $msg\n");
+  fclose($h);
+}
+
+/**
  * Performs an action with DCOP.
  * @param string DCOP component, e.g. player, playlist, playlistbrowser, ...
  * @param string Action to perform, e.g. stop, play, ...