<?php
/**
 * Plugin Name: Irontec - Cuadro De Mando
 * Plugin URI: http://www.irontec.com
 * Description: Plugin Cuadro De Mando
 * Version: 1.0
 * Author: Daniel
 * Author URI: http://www.irontec.com
 */

global $wpdb;
/**
 * Define plugin version and plugin url
 */
define( 'IRON_CuadroDeMando_VERSION', '1.0' );
define( 'IRON_CuadroDeMando_URL', WP_PLUGIN_URL . '/CuadroDeMando' );

/**
 * Activation hook
 */
register_activation_hook( __FILE__, 'iron_CuandroDeMando_activation' );

/**
 * Activation of the plugin.
 */
function iron_CuandroDeMando_activation() {
    iron_CuandroDeMando_install_db();
}

/**
 * Installation of the DB tables
 */
function iron_CuandroDeMando_install_db () {
    
    global $wpdb;
/*
        if ( !empty($wpdb->charset) )
                $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";

                $sql[] = "CREATE TABLE ".$wpdb->prefix."newsletter (
							  `id` bigint(20) NOT NULL AUTO_INCREMENT,
							  `name` text,
							  `subject` text,
							  `header` text,
							  `text` text,
							  `footer` text,
							  `nposts` enum('5','10','15') DEFAULT '5',
							  `type` enum('auto','manual','thema') DEFAULT 'manual',
							  `frequency` enum('user','daily','weekly','monthly') DEFAULT 'user',
							  `send` enum('si','no') DEFAULT 'no',
							  `grupo` enum('all','newsletter','registered_users') DEFAULT 'all',
							  `status` enum('active','inactive') DEFAULT 'inactive',
							  PRIMARY KEY (`id`)
						) ENGINE=MyISAM DEFAULT CHARSET=utf8;";

                require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
                dbDelta($sql);
*/
}

require_once( dirname(__FILE__) . '/admin/admin_pages.php');

?>