1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<?php
/**
* Plugin Name: Server Alert
* Plugin URI: http://azhari.harahap.us
* Version: 0.1
* Description: Send alert SMS when your server down
* Author: Azhari Harahap
* Author URI: http://azhari.harahap.us
*/
class Server_alert_plugin extends CI3_plugin_system {
use plugin_trait;
// ------------------------------------------------------------------------
/**
* Install Plugin
*
* Anything that needs to happen when this plugin gets installed
*
* @access public
* @since 0.1.0
* @return bool TRUE by default
*/
public static function install($data = NULL)
{
$CI = &get_instance();
$CI->load->helper('kalkun');
// check if table already exist
if ( ! $CI->db->table_exists('plugin_server_alert'))
{
$db_driver = $CI->db->platform();
$db_prop = get_database_property($db_driver);
execute_sql(APPPATH . 'plugins/server_alert/media/' . $db_prop['file'] . '_server_alert.sql');
}
return TRUE;
}
}
|