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

class Tools
{
    var $CI;
    var $elapsed_time = null;

    public static function like($url = '')
    {
        if ($url == "") {
            $url = $_SERVER['REQUEST_URI'];
        }
        ?>
        <iframe src="https://www.facebook.com/plugins/like.php?href=http://<?= $_SERVER['SERVER_NAME'] . $url ?>"
                scrolling="no" frameborder="0" style="border:none;width:230px;height:60px">
        </iframe>
        <?php
    }

    public function __construct()
    {
        $this->CI =& get_instance();
        $this->CI->Tools = $this;
    }

    public function meta_refresh($url = '', $closeWindow = false)
    {
        redirect(base_url() . "notifications/showMessage/$url/$closeWindow");
    }


}
