<?
require_once("msg.class.php") ;
# Return html code instead to response (print) directly to browser
$mode = "return" ; // Default
# $mode = "echo" ;
# Create new error message Object (Alternatives are 'confirmation' or 'warning')
# This option will determine what css class must be used
$msg = new Msg("error", $mode) ;
# URL to Css file (eg. http://mysite/css/msg.css)
$msg->setCss_file("msg.css") ;
# URL to icon file (eg. http://mysite/img/icon_error.gif)
$msg->setIcon_file("icon_error.gif") ; // Optional
# Set Width and Height in pixels
$msg->setWidth(275) ;
$msg->setHeight(110) ;
# Set box position ( If not seted, i'll try center according to client screen resolution )
# $msg->setTop(1) ;
# $msg->setLeft(1) ;
# Enable exit by clicking outside of message box (false = default)
# $msg->exitOnBg(true) ;
# The message itself
$msg->setMsg("- Error message #7700, please contact Suport") ;
# Box title
$msg->setTitle("Authentication problems") ;
# Ok button text
$msg->setOk_msg(" OK ") ;
# Generate box
$html_box = $msg->generateBox() ;
?>
<html>
<?=$html_box?>
<body bgcolor='lightgreen'>
<h2>Infobox Example</h2>
</body>
</html>