<?php
if(!defined('InEmpireCMS'))
{
        exit();
}

//------ 风云榜插件安装 ------

//建立浏览记录表
$empire->query(SetCreateTable("CREATE TABLE `{$dbtbpre}dongpo_top` (
  `no` int(10) unsigned NOT NULL auto_increment,
  `time` int(20) NOT NULL default '0',
  `classid` int(20) NOT NULL default '0',
  `id` int(20) NOT NULL default '0',
  `hit` int(255) NOT NULL default '1',
  PRIMARY KEY  (`no`),
  KEY `classid` (`classid`),
  KEY `id` (`id`),
  KEY `time` (`time`)
) TYPE=MyISAM;",$phome_db_dbchar));


//增加插件菜单
$empire->query("insert into `{$dbtbpre}enewsmenuclass` values(NULL,'阅读风云榜插件','0','0','2');");
$menuclassid=$empire->lastid();
$empire->query("insert into `{$dbtbpre}enewsmenu` values(NULL,'查看统计','../dongpo/top/view.php','0','$menuclassid');");
$fp=@fopen("install.off","w");
@fclose($fp);
?>