Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TINY SYSTEM MESSAGE GATHERER
<?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
You can’t perform that action at this time.