<?php
/*
Plugin Name: 模板设置插件
*/
defined('EMLOG_ROOT') || exit('access denied!');

if (!class_exists('TplOptions', false)) {
    include __DIR__ . '/tpl_options.php';
}

//插件激活回调函数
function callback_init() {
    $tplOptions = TplOptions::getInstance();
    $table = $tplOptions->getTable('data');
    //emMsg($table);
    $add = "";
    $sql = "
    CREATE TABLE IF NOT EXISTS `$table` (
        `id` int(11) NOT NULL PRIMARY KEY AUTOINCREMENT,
        `template` varchar(64) NOT NULL,
        `name` varchar(64) NOT NULL,
        `depend` varchar(64) NOT NULL DEFAULT '',
        `data` longtext NOT NULL
     )" . $add;
    $tplOptions->getDb()->query($sql);
}
