All pastes #2460254 Raw Edit

Miscellany

public unlisted text v1 · immutable
#2460254 ·published 2013-09-30 19:37 UTC
rendered paste body
<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Alerts{
    
    /**
     * 
     * @param type $message
     * @return \strıng
     */
    public function red_alert($message,$style = 'normal'){
        if($style == 'bold'){
            $style_open_tag = '<strong>';
            $style_close_tag = '</strong>';
        }
        $message_template = '<div class="alert alert-error"><button data-dismiss="alert" class="close" type="button">×</button>'.@$style_open_tag.$message.@$style_close_tag.'</div>';
        
        return $message_template;
    }
    
    /**
     * 
     * @param type $message
     * @param type $style
     * @return \strıng
     */
    public function yellow_alert($message,$style = 'normal'){
        if($style == 'bold'){
            $style_open_tag = '<strong>';
            $style_close_tag = '</strong>';
        }
        $message_template = '<div class="alert alert-block"><button data-dismiss="alert" class="close" type="button">×</button>'.@$style_open_tag.$message.@$style_close_tag.'</div>';
        
        return $message_template;
    }
    
    /**
     * 
     * @param type $message
     * @param type $style
     * @return \strıng
     */
    public function green_alert($message,$style = 'normal'){
        if($style == 'bold'){
            $style_open_tag = '<strong>';
            $style_close_tag = '</strong>';
        }
        $message_template = '<div class="alert alert-success"><button data-dismiss="alert" class="close" type="button">×</button>'.@$style_open_tag.$message.@$style_close_tag.'</div>';
        
        return $message_template;
    }
    
    /**
     * 
     * @param type $message
     * @param type $style
     * @return \strıng
     */
    public function blue_alert($message,$style = 'normal'){
        if($style == 'bold'){
            $style_open_tag = '<strong>';
            $style_close_tag = '</strong>';
        }
        $message_template = '<div class="alert alert-info"><button data-dismiss="alert" class="close" type="button">×</button>'.@$style_open_tag.$message.@$style_close_tag.'</div>';
        
        return $message_template;
    }
}