Location: PHPKode > scripts > User Feedback > message.php
<?php
/*Message class version 1.0
 * First declare a instance of the class at the beginning of your program.
 * Second place the display function wherever you want your messages to be displayed.
 * Then you can place write messages everywhere between those 2 pieces of code.
 * Its pretty usefull for giving people feedback, after thety created for instance a blogpost.
 * Tips and suggestions are always welcome at hide@address.com
 * */

	class message {
		
		private $messages = array();
		
		public function write($contents,$state){
			if($state == true){
				$message = '<div class="message_box" style="background-color:#dbffd1;color:#0F0;padding:5px;border-bottom:#006600 solid 1px;text-align:center;">';
			}elseif($state == false){
				$message = '<div class="error_box" style="background-color:#F99;color:#F00;padding:5px;border-bottom:#FFFFFF solid 1px;text-align:center;">';
			}else{
				$message = '<div class="error_box" style="background-color:#F99;color:#F00;padding:5px;border-bottom:#FFFFFF solid 1px;text-align:center;">u bent vergeten state parameter in te vullen';
			}
			$message = $message . $contents . "</div>";
			array_push($this->messages, $message);	
		}
		
		public function display() {
			for ($i=0; $i<=count($this->messages)-1; $i++)
  			{
				echo $this->messages[$i];
			};
		}
	}
?>
Return current item: User Feedback