Last active
August 29, 2015 13:56
-
-
Save dominikwilkowski/8968459 to your computer and use it in GitHub Desktop.
TINY SYSTEM MESSAGE GATHERER
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*****************************| SYSTEM MESSAGE FUNCTION |*****************************/ | |
/** | |
* TINY SYSTEM MESSAGE GATHERER | |
* | |
* addMsg($msg,$o) | |
* @param string $msg Message to be added | |
* @param int $o Urgency [0](default)=normal [1]=warning [2]=error [3]=no HTML wrapper | |
* | |
* getMsg() | |
* @return string All messages in HTML wrappers (unless $o=3) | |
*/ | |
class sysMsg { | |
var $msg; | |
var $o; | |
public function addMsg($msg,$o=0) { | |
if($o==3) $this->msg.=$msg; | |
else $this->msg.='<h5 class="'.($o==1 ? 'w' : ($o==2 ? 'e' : 'd')).'">'.$msg.'</h5>'; | |
} | |
public function getMsg() { | |
return $this->msg; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment