Added som good classes
This commit is contained in:
parent
20496a4be0
commit
0f5bfbdba9
3 changed files with 147 additions and 0 deletions
22
class/info.php
Normal file
22
class/info.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
require_once("template.php");
|
||||
|
||||
class Info{
|
||||
var $type = array (
|
||||
"warning" => array("#F0FF69","#FFFB3E"),
|
||||
"error" => array("#FFDDCC","#FF0000"),
|
||||
"info" => array("#9BFB66","#039C00")
|
||||
);
|
||||
|
||||
function buildMessage($msg, $t="warning"){
|
||||
GLOBAL $template;
|
||||
$temp = new Template($template["message"]);
|
||||
$temp->replace_tags(array(
|
||||
"message_color" => $this->type[$t][0],
|
||||
"message_color_border" => $this->type[$t][1],
|
||||
"message" => $msg
|
||||
));
|
||||
return $temp->getOutput();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue