

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";



CREATE TABLE IF NOT EXISTS `classset` (
  `id` int(11) NOT NULL auto_increment,
  `classid` char(4) NOT NULL default '',
  `gradeid` char(4) NOT NULL default '',
  `classname` char(20) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_adminlog` (
  `adminlogid` int(15) NOT NULL auto_increment,
  `action` varchar(50) NOT NULL default '',
  `script` varchar(255) NOT NULL default '',
  `date` varchar(10) NOT NULL default '',
  `ipaddress` varchar(16) NOT NULL default '',
  PRIMARY KEY  (`adminlogid`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=224 ;

CREATE TABLE IF NOT EXISTS `#schooloa@_articles` (
  `articleid` int(11) NOT NULL auto_increment,
  `title` varchar(100) NOT NULL default '',
  `includepic` tinyint(1) NOT NULL default '0',
  `subheading` varchar(250) NOT NULL default '',
  `titlefontcolor` varchar(9) NOT NULL default '',
  `titlefonttype` tinyint(1) NOT NULL default '0',
  `content` longtext NOT NULL,
  `linkurl` varchar(80) NOT NULL default '0',
  `manageid` tinyint(4) NOT NULL default '0',
  `inputer` varchar(20) NOT NULL default '',
  `author` varchar(20) NOT NULL default '',
  `copyfromname` varchar(100) NOT NULL default '',
  `copyfromurl` varchar(100) NOT NULL default '',
  `hits` int(11) NOT NULL default '0',
  `typeid` tinyint(4) NOT NULL default '0',
  `addtime` int(11) NOT NULL default '0',
  `outtime` int(20) NOT NULL default '0',
  `pass` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`articleid`),
  KEY `title` (`title`,`manageid`,`typeid`),
  FULLTEXT KEY `content` (`content`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_b_content` (
  `id` int(11) NOT NULL auto_increment,
  `user` tinyint(4) NOT NULL default '0',
  `address` varchar(20) NOT NULL default '0',
  `content` varchar(200) NOT NULL default '0',
  `type` tinyint(4) NOT NULL default '0',
  `intime` int(10) NOT NULL default '0',
  `retime` int(10) NOT NULL default '0',
  `state` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_b_manage` (
  `id` tinyint(4) NOT NULL auto_increment,
  `admin` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_classtable` (
  `id` int(11) NOT NULL auto_increment,
  `classtitle` varchar(20) NOT NULL default '',
  `teacher` varchar(20) NOT NULL default '',
  `classnum` tinyint(4) NOT NULL default '0',
  `week` tinyint(4) NOT NULL default '0',
  `class` varchar(20) NOT NULL default '',
  `inyear` varchar(20) NOT NULL default '',
  `inputer` tinyint(4) NOT NULL default '0',
  `state` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_favorite` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(100) NOT NULL default '',
  `typeid` tinyint(4) NOT NULL default '0',
  `weburl` varchar(100) NOT NULL default '',
  `note` varchar(200) NOT NULL default '',
  `isshare` tinyint(2) NOT NULL default '0',
  `userid` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=12 ;



INSERT INTO `#schooloa@_favorite` (`id`, `title`, `typeid`, `weburl`, `note`, `isshare`, `userid`) VALUES
(2, '雅虎中国', 1, 'http://www.yahoo.com.cn', '大型新闻搜索网站', 1, 1),
(3, '新浪网站', 1, 'http://www.sina.com.cn', '门户网站', 1, 1),
(4, '绿色下载', 3, 'http://www.greendown.cn', '各种绿色软件下载,更新速度快', 1, 1),
(5, '叮当音乐网', 2, 'http://www.mtv123.com', '在线欣赏的音乐,更新比较快', 1, 1),
(6, '中国unix社区', 4, 'http://www.chinaunix.net', '非常好的unix/linux论坛', 0, 1),
(7, '网易', 1, 'http://www.163.com', '大型新闻综合网站', 1, 1),
(8, '黄嘴企鹅', 9, 'http://www.linuxsir.org', '超好的linux论坛', 1, 1),
(10, '中国unix', 4, 'http://www.chinaunix.net', '中国非常好的unix\\\\linux论坛', 1, 73),
(11, 'java', 0, 'http://hi.baidu.com/89806/blog/item/d26850c69205371c9c163d1d.html', '', 0, 1);



CREATE TABLE IF NOT EXISTS `#schooloa@_file` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(100) NOT NULL default '',
  `path` varchar(150) NOT NULL default '',
  `inputer` int(10) NOT NULL default '0',
  `sender` int(10) NOT NULL default '0',
  `intime` varchar(20) NOT NULL default '',
  `hash` varchar(32) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_images` (
  `imageid` int(10) NOT NULL auto_increment,
  `postid` varchar(16) NOT NULL default '0',
  `imagepath` varchar(80) default '0',
  `imagesize` varchar(10) default '0',
  `number` tinyint(6) default '0',
  `money` tinyint(2) default '0',
  `other` varchar(20) default '0',
  UNIQUE KEY `softid` (`imageid`),
  KEY `softid_2` (`imageid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_j_borrow` (
  `id` int(11) NOT NULL auto_increment,
  `pid` int(11) NOT NULL default '0',
  `author` int(11) NOT NULL default '0',
  `bortime` int(11) NOT NULL default '0',
  `retime` int(11) NOT NULL default '0',
  `bornumber` tinyint(4) NOT NULL default '0',
  `state` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_j_manage` (
  `id` tinyint(4) NOT NULL auto_increment,
  `admin` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=6 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_j_product` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL default '0',
  `content` varchar(250) NOT NULL default '0',
  `type` tinyint(4) NOT NULL default '0',
  `grade` tinyint(4) NOT NULL default '0',
  `subject` tinyint(4) NOT NULL default '0',
  `intime` int(10) NOT NULL default '0',
  `sumnumber` int(11) NOT NULL default '0',
  `innumber` int(11) NOT NULL default '0',
  `outnumber` int(11) NOT NULL default '0',
  `prenumber` int(11) NOT NULL default '0',
  `bornumber` int(11) NOT NULL default '0',
  `state` tinyint(2) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_j_type` (
  `id` int(11) NOT NULL auto_increment,
  `name` char(20) NOT NULL default '0',
  `type` char(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_leave` (
  `id` int(11) NOT NULL auto_increment,
  `typeid` tinyint(4) NOT NULL default '0',
  `leaver` varchar(20) NOT NULL default '0',
  `passer` varchar(20) NOT NULL default '0',
  `leavetypeid` tinyint(4) NOT NULL default '0',
  `reason` varchar(250) NOT NULL default '',
  `stime` varchar(40) NOT NULL default '',
  `etime` varchar(40) NOT NULL default '',
  `intime` varchar(40) NOT NULL default '',
  `pass` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_letter` (
  `id` int(11) NOT NULL auto_increment,
  `inputer` int(10) NOT NULL default '0',
  `username` varchar(10) NOT NULL default '',
  `address` varchar(100) NOT NULL default '',
  `work` varchar(100) NOT NULL default '',
  `tel1` varchar(20) NOT NULL default '',
  `tel2` varchar(20) NOT NULL default '',
  `tel3` varchar(20) NOT NULL default '',
  `qq` varchar(20) NOT NULL default '',
  `email` varchar(40) NOT NULL default '',
  `msn` varchar(40) NOT NULL default '',
  `typeid` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=1;



CREATE TABLE IF NOT EXISTS `#schooloa@_loginlog` (
  `loginlogid` int(15) NOT NULL auto_increment,
  `username` varchar(100) NOT NULL default '',
  `password` varchar(100) NOT NULL default '',
  `date` varchar(10) NOT NULL default '',
  `ipaddress` varchar(16) NOT NULL default '',
  `result` int(11) NOT NULL default '0',
  PRIMARY KEY  (`loginlogid`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_message` (
  `id` int(11) NOT NULL auto_increment,
  `send` varchar(20) NOT NULL default '0',
  `receive` varchar(20) NOT NULL default '0',
  `sendtime` varchar(20) NOT NULL default '0',
  `title` varchar(100) NOT NULL default '',
  `content` varchar(200) NOT NULL default '0',
  `state` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `receive` (`receive`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_schedule` (
  `id` int(11) NOT NULL auto_increment,
  `inputer` tinyint(4) NOT NULL default '0',
  `title` varchar(80) NOT NULL default '',
  `content` varchar(250) NOT NULL default '',
  `intime` varchar(20) NOT NULL default '',
  `pretime` varchar(20) NOT NULL default '0',
  `typeid` tinyint(4) NOT NULL default '0',
  `state` tinyint(4) NOT NULL default '0',
  `articleid` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `articleid` (`articleid`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=2 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_soft` (
  `softid` int(10) NOT NULL auto_increment,
  `softname` varchar(40) default '0',
  `postid` varchar(16) NOT NULL default '0',
  `softpath` varchar(80) default '0',
  `softsize` varchar(10) default '0',
  `number` tinyint(6) default '0',
  `money` tinyint(2) default '0',
  `other` varchar(20) default '0',
  UNIQUE KEY `softid` (`softid`),
  KEY `softid_2` (`softid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_s_content` (
  `id` int(11) NOT NULL auto_increment,
  `userid` int(11) NOT NULL default '0',
  `grade` tinyint(4) NOT NULL default '0',
  `nonum` varchar(10) NOT NULL default '0',
  `title` varchar(50) NOT NULL default '',
  `content` varchar(200) NOT NULL default '0',
  `note` tinyint(4) NOT NULL default '0',
  `notecontent` varchar(50) NOT NULL default '0',
  `intime` int(10) NOT NULL default '0',
  `state` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_s_manage` (
  `id` tinyint(4) NOT NULL auto_increment,
  `admin` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_type` (
  `id` int(11) NOT NULL auto_increment,
  `uid` int(11) NOT NULL default '0',
  `cid` varchar(250) NOT NULL default '',
  `path` varchar(40) NOT NULL default '',
  `layerid` tinyint(4) NOT NULL default '0',
  `typename` varchar(20) NOT NULL default '',
  `actionurl` varchar(100) default NULL,
  `tid` tinyint(4) NOT NULL default '99',
  `isshow` tinyint(2) NOT NULL default '1',
  `isright` tinyint(4) NOT NULL default '0',
  `enablecontribute` tinyint(2) NOT NULL default '1',
  `templatetitle` varchar(40) NOT NULL default '0',
  `typepic` varchar(80) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `path` (`path`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=35 ;



INSERT INTO `#schooloa@_type` (`id`, `uid`, `cid`, `path`, `layerid`, `typename`, `actionurl`, `tid`, `isshow`, `isright`, `enablecontribute`, `templatetitle`, `typepic`) VALUES
(1, 0, '|1|2|3|4|5|22|23|25|26|27|12|29|', '|0|', 1, '我的办公桌', '', 1, 0, 0, 0, '', 'mytable.gif'),
(2, 1, '|2|', '|0|1|', 2, '短信箱', 'index.php?filename=message', 1, 1, 0, 0, '', 'sms.gif'),
(3, 1, '|3|', '|0|1|', 2, '日程安排', 'index.php?filename=schedule', 2, 1, 0, 0, '', 'calendar.gif'),
(4, 1, '|4|22|23|', '|0|1|', 2, '通讯录', '', 4, 0, 0, 0, '', 'address.gif'),
(5, 1, '|5|', '|0|1|', 2, '文件柜', 'index.php?filename=fileg', 5, 1, 0, 0, '', 'file_folder.gif'),
(6, 0, '|6|7|8|9|10|11|12|', '|0|', 1, '行政管理', '', 2, 0, 0, 0, '', 'training.gif'),
(7, 6, '|7|', '|0|6|', 2, '行政通知', 'index.php?filename=list&action=class', 1, 1, 1, 1, '', 'notify2.gif'),
(8, 6, '|8|', '|0|6|', 2, '工作安排', 'index.php?filename=list&action=class', 2, 1, 1, 1, '', 'linkman.gif'),
(9, 6, '|9|', '|0|6|', 2, '资料下载', 'index.php?filename=list&action=class', 3, 1, 1, 1, '', 'histroy.gif'),
(10, 6, '|10|', '|0|6|', 2, '会议通知', 'index.php?filename=list&action=class', 4, 1, 1, 1, '', 'netmeeting.gif'),
(11, 6, '|11|', '|0|6|', 2, '公病事假', 'index.php?filename=leave', 5, 1, 1, 0, '', 'book.gif'),
(12, 1, '|12|', '|0|1|', 2, '收藏夹', 'index.php?filename=favorite', 7, 1, 0, 0, '', 'calendar2.gif'),
(13, 0, '|13|14|15|16|17|24|', '|0|', 1, '教学管理', '', 3, 0, 0, 0, 'message', '1score.gif'),
(14, 33, '|14|', '|0|36|', 2, '讨论区', 'index.php?filename=blank', 1, 1, 0, 0, '', 'bbs.gif'),
(15, 33, '|15|', '|0|36|', 2, '网络会议', 'index.php?filename=blank', 2, 1, 0, 0, '', 'netchat.gif'),
(16, 33, '|16|', '|0|36|', 2, '网络硬盘', 'plugins/u/index.php?filename=main', 3, 1, 0, 0, '', 'netdisk.gif'),
(17, 33, '|17|38|', '|0|36|', 2, '网络调查', 'index.php?filename=blank', 5, 1, 0, 0, '', 'query.gif'),
(18, 0, '|18|19|28|31|', '|0|', 1, '教务管理', '', 4, 0, 0, 0, '', 'asset.gif'),
(19, 18, '|19|', '|0|18|', 2, '公共教室预约', 'plugins/yyxt/index.php?gtypeid=1', 6, 1, 0, 0, '', 'person_info.gif'),
(20, 32, '|20|', '|0|35|', 2, '网上报修', 'plugins/bxxt/index.php', 2, 1, 0, 0, '', 'histroy.gif'),
(21, 32, '|21|', '|0|35|', 2, '电教资料借记', 'plugins/jjxt/index.php', 3, 1, 0, 0, '', 'new_email.gif'),
(22, 4, '|22|', '|0|1|4|', 3, '个人通讯录', 'index.php?filename=letter&action=person', 1, 1, 0, 0, '', 'address.gif'),
(23, 4, '|23|', '|0|1|4|', 3, '单位通讯录', 'index.php?filename=letter&action=public', 2, 1, 0, 0, '', 'contract.gif'),
(24, 13, '|24|', '|0|13|', 2, '课程表', 'index.php?filename=classtable', 1, 1, 1, 0, '', 'contract.gif'),
(25, 1, '|25|26|27|', '|0|1|', 2, '文章管理', '', 6, 0, 0, 0, '', 'diary.gif'),
(26, 25, '|26|', '|0|1|25|', 3, '发表文章', 'index.php?filename=article&action=add', 1, 0, 1, 0, '', 'vote.gif'),
(27, 25, '|27|', '|0|1|25|', 3, '文章列表', 'index.php?filename=article&action=list', 2, 0, 1, 0, '', 'new_email.gif'),
(28, 18, '|28|', '|0|18|', 2, '实验室预约', 'plugins/yyxt/index.php?gtypeid=2', 5, 1, 0, 0, '', 'linkman.gif'),
(29, 1, '|29|', '|0|1|', 2, '待办提醒', 'index.php?filename=schedule&typeid=29&action=t', 3, 1, 0, 0, '', 'clock.gif'),
(30, 13, '|30|', '|0|13|', 2, '成绩管理', 'plugins/xjglxt/index.php?filename=result&action=list', 3, 1, 1, 0, '', 'statistic.gif'),
(31, 18, '|31|', '|0|18|', 2, '演示实验登记', 'plugins/sydj/index.php', 8, 1, 0, 0, '', 'new_email.gif'),
(32, 0, '|32|19|20|21|', '|0|', 1, '后勤管理', '', 5, 0, 0, 0, '', '@sale.gif'),
(33, 0, '|33|14|15|16|17|34|', '|0|', 1, '网络管理', '', 6, 0, 0, 0, '', 'world_time.gif'),
(34, 33, '|34|', '|0|33|', 2, '内网ftp', '?filename=ftp', 4, 1, 0, 0, '', 'menu_url.gif');



CREATE TABLE IF NOT EXISTS `#schooloa@_u_file` (
  `id` bigint(20) NOT NULL auto_increment,
  `filename` varchar(100) NOT NULL default '',
  `uid` int(11) NOT NULL default '0',
  `userid` int(11) NOT NULL default '0',
  `size` varchar(10) NOT NULL default '',
  `path` varchar(100) NOT NULL default '',
  `extend` varchar(6) NOT NULL default '',
  `addtime` int(11) NOT NULL default '0',
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `id_2` (`id`),
  KEY `userid` (`userid`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;





CREATE TABLE IF NOT EXISTS `#schooloa@_u_folder` (
  `id` bigint(20) NOT NULL auto_increment,
  `foldername` varchar(20) NOT NULL default '',
  `layerid` tinyint(6) NOT NULL default '0',
  `uid` bigint(20) NOT NULL default '0',
  `cid` varchar(250) NOT NULL default '0',
  `isshare` tinyint(6) NOT NULL default '0',
  `password` varchar(20) NOT NULL default '',
  `userid` int(11) NOT NULL default '0',
  `addtime` int(11) NOT NULL default '0',
  UNIQUE KEY `id` (`id`),
  KEY `userid` (`userid`),
  KEY `userid_2` (`userid`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_x_result` (
  `id` int(11) NOT NULL auto_increment,
  `stname` varchar(20) NOT NULL default '',
  `stnumber` varchar(10) NOT NULL default '0',
  `yw` varchar(5) NOT NULL default '0',
  `sx` varchar(5) NOT NULL default '0',
  `wy` varchar(5) NOT NULL default '0',
  `kx` varchar(5) NOT NULL default '0',
  `sz` varchar(5) NOT NULL default '0',
  `ls` varchar(5) NOT NULL default '0',
  `cjsum` float NOT NULL default '0',
  `resultid` int(11) NOT NULL default '0',
  `state` tinyint(2) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_x_resultset` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL default '',
  `gradeid` varchar(10) NOT NULL default '0',
  `rtype` varchar(100) NOT NULL default '',
  `intime` varchar(30) NOT NULL default '',
  `userid` int(11) NOT NULL default '0',
  `state` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_y_class` (
  `id` tinyint(4) NOT NULL auto_increment,
  `name` varchar(40) NOT NULL default '',
  `address` varchar(80) NOT NULL default '',
  `typeid` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;




CREATE TABLE IF NOT EXISTS `#schooloa@_y_content` (
  `id` int(11) NOT NULL auto_increment,
  `classid` tinyint(4) NOT NULL default '0',
  `teacher` varchar(10) NOT NULL default '0',
  `grade` varchar(18) NOT NULL default '0',
  `subject` varchar(10) NOT NULL default '',
  `nonumber` tinyint(4) NOT NULL default '0',
  `content` varchar(80) NOT NULL default '',
  `inputtime` int(10) NOT NULL default '0',
  `ordertime` int(10) NOT NULL default '0',
  `state` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `#schooloa@_y_setting` (
  `id` int(4) NOT NULL auto_increment,
  `name` varchar(20) NOT NULL default '',
  `type` varchar(4) NOT NULL default '',
  `other` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=16 ;



INSERT INTO `#schooloa@_y_setting` (`id`, `name`, `type`, `other`) VALUES
(1, '星期一', 'w', '1'),
(2, '星期二', 'w', '2'),
(3, '星期三', 'w', '3'),
(4, '星期四', 'w', '4'),
(5, '星期五', 'w', '5'),
(6, '星期六', 'w', '6'),
(7, '星期日', 'w', '7'),
(8, '第一节', 'n', '1'),
(9, '第二节', 'n', '2'),
(10, '第三节', 'n', '3'),
(11, '第五节', 'n', '5'),
(12, '第六节', 'n', '6'),
(13, '第七节', 'n', '7'),
(14, '第八节', 'n', '8'),
(15, '第四节', 'n', '4');



CREATE TABLE IF NOT EXISTS `#schooloa@_y_type` (
  `id` tinyint(4) NOT NULL auto_increment,
  `title` varchar(60) NOT NULL default '',
  `note` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=3 ;



INSERT INTO `#schooloa@_y_type` (`id`, `title`, `note`) VALUES
(1, '多媒体教室预定', ''),
(2, '实验室教室预定', '');




CREATE TABLE IF NOT EXISTS `management` (
  `id` tinyint(4) NOT NULL auto_increment,
  `manageid` tinyint(4) NOT NULL default '0',
  `managename` varchar(20) NOT NULL default '',
  `managetel` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=16 ;



INSERT INTO `management` (`id`, `manageid`, `managename`, `managetel`) VALUES
(1, 1, '校长室', ''),
(2, 2, '教务处', ''),
(3, 3, '政教处', ''),
(4, 4, '办公室', ''),
(5, 5, '团委', ''),
(6, 6, '总务处', ''),
(7, 7, '财会室', ''),
(8, 8, '语文组', ''),
(9, 9, '数学组', ''),
(10, 10, '外语组', ''),
(11, 11, '科学组', ''),
(12, 12, '社会组', ''),
(13, 13, '综合组', ''),
(14, 14, '网络中心', ''),
(15, 15, '工会', '');



CREATE TABLE IF NOT EXISTS `members` (
  `userid` int(11) NOT NULL auto_increment,
  `username` varchar(20) NOT NULL default '',
  `realname` varchar(50) default NULL,
  `password` varchar(32) NOT NULL default '',
  `groupid` tinyint(1) NOT NULL default '0',
  `webgroupid` tinyint(4) NOT NULL default '0',
  `admining` int(6) default '0',
  `school` varchar(50) default NULL,
  `subjectid` tinyint(6) NOT NULL default '0',
  `manageid` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`userid`),
  KEY `username` (`username`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `subject` (
  `id` tinyint(4) NOT NULL auto_increment,
  `subjectid` tinyint(4) NOT NULL default '0',
  `subjectname` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=11 ;


INSERT INTO `subject` (`id`, `subjectid`, `subjectname`) VALUES
(1, 1, '语文'),
(2, 2, '数学'),
(3, 3, '外语'),
(4, 4, '科学'),
(5, 5, '社会'),
(6, 6, '音乐'),
(7, 7, '体育'),
(8, 8, '劳技'),
(9, 9, '美术'),
(10, 10, '电脑');



CREATE TABLE IF NOT EXISTS `usergroup` (
  `id` int(11) NOT NULL auto_increment,
  `groupid` tinyint(4) NOT NULL default '0',
  `grouptitle` varchar(20) NOT NULL default '',
  `usize` int(11) NOT NULL default '0',
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=100 ;



INSERT INTO `usergroup` (`id`, `groupid`, `grouptitle`, `usize`) VALUES
(1, 1, '网管员', 400),
(2, 2, '管理员', 200),
(5, 3, '普通管理员', 150),
(3, 4, '本校教师', 100),
(4, 6, '注册会员', 50),
(99, 99, '待审会员', 1);


CREATE TABLE IF NOT EXISTS `userinfo` (
  `id` int(11) NOT NULL auto_increment,
  `userid` int(11) NOT NULL default '0',
  `sex` tinyint(4) NOT NULL default '0',
  `address` varchar(100) NOT NULL default '',
  `work` varchar(100) NOT NULL default '',
  `tel1` varchar(20) NOT NULL default '',
  `tel2` varchar(20) NOT NULL default '',
  `tel3` varchar(20) NOT NULL default '',
  `qq` varchar(20) NOT NULL default '',
  `email` varchar(40) NOT NULL default '',
  `msn` varchar(40) NOT NULL default '',
  `tableleft` varchar(50) NOT NULL default '',
  `tableright` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;





CREATE TABLE IF NOT EXISTS `userright` (
  `id` tinyint(4) NOT NULL auto_increment,
  `rightid` tinyint(4) NOT NULL default '0',
  `rightname` varchar(20) NOT NULL default '',
  `rights` varchar(250) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=gbk AUTO_INCREMENT=7 ;



INSERT INTO `userright` (`id`, `rightid`, `rightname`, `rights`) VALUES
(1, 1, '', '7|1|1|1|1|1:8|1|1|1|1|1:9|1|1|1|1|1:10|1|1|1|1|1:11|1|1|1|1|1:24|1|1|1|1|1:26|1|1|1|1|1:27|1|1|1|1|1:33|1|1|1|1|0'),
(2, 3, '', '7|1|1|1|1|1:8|1|1|1|1|1:9|1|1|1|1|1:10|1|1|1|1|1:11|1|1|1|1|0:24|1|1|1|1|0:26|1|1|1|1|0:27|1|1|1|1|0:33|1|1|1|1|0'),
(3, 2, '', '7|1|1|1|0|1:8|1|1|1|0|1:9|1|1|1|0|1:10|1|1|1|0|1:11|1|1|1|0|1:24|1|1|1|0|1:26|1|1|1|1|1:27|1|1|1|1|1:33|1|1|1|1|0'),
(4, 4, '', '7|1|0|0|0|0:8|1|0|0|0|0:9|1|0|0|0|0:10|1|0|0|0|0:11|1|1|1|1|0:24|1|0|0|0|0:26|0|0|0|0|0:27|0|0|0|0|0:33|1|1|1|1|0'),
(5, 6, '', '7|1|0|0|0|0:8|1|0|0|0|0:9|1|0|0|0|0:10|1|0|0|0|0:11|1|0|0|0|0:12|1|0|0|0|0:26|0|0|0|0|0:27|0|0|0|0|0'),
(6, 99, '', '7|0|0|0|0|0:8|0|0|0|0|0:9|0|0|0|0|0:10|0|0|0|0|0:11|0|0|0|0|0:24|0|0|0|0|0:26|0|0|0|0|0:27|0|0|0|0|0');
