富贵资源网 Design By www.hznty.com
数据库结构
复制代码 代码如下:
-- 表的结构 `bigclass`
--
CREATE TABLE `bigclass` (
`bigclassid` int(11) NOT NULL auto_increment,
`bigclassname` varchar(200) collate utf8_unicode_ci NOT NULL,
`sort` int(11) NOT NULL,
`suoshu` int(1) NOT NULL,
PRIMARY KEY (`bigclassid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=19 ;
-- 表的结构 `smallclass`
--
CREATE TABLE `smallclass` (
`smallclassid` int(11) NOT NULL auto_increment,
`smallclassname` varchar(200) collate utf8_unicode_ci NOT NULL,
`bigclassid` int(11) NOT NULL,
`sort` int(11) NOT NULL,
PRIMARY KEY (`smallclassid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=7 ;
-- 表的结构 `minclass`
--
CREATE TABLE `minclass` (
`minclassid` int(10) NOT NULL auto_increment,
`minclassname` varchar(200) NOT NULL,
`bigclassid` int(10) NOT NULL,
`smallclassid` int(10) NOT NULL,
`sort` int(10) NOT NULL,
PRIMARY KEY (`minclassid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
代码如下
复制代码 代码如下:
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<?
//类别选择
mysql_select_db($database_lr, $lr);
$sql = "select * from smallclass order by sort";
$result = mysql_query( $sql );
$count = 0;
while($res = mysql_fetch_row($result)){
?>
subcat[<?=$count?>] = new Array("<?=$res[1]?>","<?=$res[4]?>","<?=$res[0]?>");
<?
$count++;
}
?>
onecount=<?php echo $count?>
//联动函数
function changelocation(bigclassid)
{
document.myform.smallclassid.length = 0;
var bigclassid=bigclassid;
var i;
document.myform.smallclassid.options[0] = new Option('请选择二级分类','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == bigclassid)
{
document.myform.smallclassid.options[document.myform.smallclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<?php
mysql_select_db($database_lr, $lr);
$sql2 = "select * from minclass order by sort";
$result2 = mysql_query( $sql2 );
$count2 = 0;
?>
<script language = "JavaScript">
//如果这个数组中含有双引号则不能使用。即二级和三级类不能含有双引号
var onecount2;
onecount2=0;
subcat2 = new Array();
<?php
$count2 = 0;
while($res2 = mysql_fetch_row($result2)){
?>
subcat2[<?php echo $count2?>] = new Array("<?php echo $res2[1]?>","<?php echo $res2[3]?>","<?php echo $res2[0]?>");
<?php
$count2++;
}
?>
onecount2=<?php echo $count2?>;
function changelocation2(smallclassid)
{
document.myform.minclassid.length = 0;
var smallclassid=smallclassid;
var j;
document.myform.minclassid.options[0] = new Option('请选择三级分类','');
for (j=0;j < onecount2; j++)
{
if (subcat2[j][1] == smallclassid)
{
document.myform.minclassid.options[document.myform.minclassid.length] = new Option(subcat2[j][0], subcat2[j][2]);
}
}
}
</script>
<select name="bigclassid" onChange="changelocation(document.myform.bigclassid.options[document.myform.bigclassid.selectedIndex].value)" size="1">
<option selected value="">请指定一级分类</option>
<?
$sql = "select * from bigclass order by sort";
$result = mysql_query( $sql );
while($res = mysql_fetch_row($result)){
?>
<option value="<? echo $res[0]; ?>"><? echo $res[1]?></option>
<? } ?>
</select>
<select name="smallclassid" onChange="changelocation2(document.myform.smallclassid.options[document.myform.smallclassid.selectedIndex].value)" size="1">
<option selected value="">请指定二级分类</option>
</select>
<select name="minclassid" size="1">
<option selected value="">==所有三级分类==</option>
</select>
复制代码 代码如下:
-- 表的结构 `bigclass`
--
CREATE TABLE `bigclass` (
`bigclassid` int(11) NOT NULL auto_increment,
`bigclassname` varchar(200) collate utf8_unicode_ci NOT NULL,
`sort` int(11) NOT NULL,
`suoshu` int(1) NOT NULL,
PRIMARY KEY (`bigclassid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=19 ;
-- 表的结构 `smallclass`
--
CREATE TABLE `smallclass` (
`smallclassid` int(11) NOT NULL auto_increment,
`smallclassname` varchar(200) collate utf8_unicode_ci NOT NULL,
`bigclassid` int(11) NOT NULL,
`sort` int(11) NOT NULL,
PRIMARY KEY (`smallclassid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=7 ;
-- 表的结构 `minclass`
--
CREATE TABLE `minclass` (
`minclassid` int(10) NOT NULL auto_increment,
`minclassname` varchar(200) NOT NULL,
`bigclassid` int(10) NOT NULL,
`smallclassid` int(10) NOT NULL,
`sort` int(10) NOT NULL,
PRIMARY KEY (`minclassid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
代码如下
复制代码 代码如下:
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<?
//类别选择
mysql_select_db($database_lr, $lr);
$sql = "select * from smallclass order by sort";
$result = mysql_query( $sql );
$count = 0;
while($res = mysql_fetch_row($result)){
?>
subcat[<?=$count?>] = new Array("<?=$res[1]?>","<?=$res[4]?>","<?=$res[0]?>");
<?
$count++;
}
?>
onecount=<?php echo $count?>
//联动函数
function changelocation(bigclassid)
{
document.myform.smallclassid.length = 0;
var bigclassid=bigclassid;
var i;
document.myform.smallclassid.options[0] = new Option('请选择二级分类','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == bigclassid)
{
document.myform.smallclassid.options[document.myform.smallclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<?php
mysql_select_db($database_lr, $lr);
$sql2 = "select * from minclass order by sort";
$result2 = mysql_query( $sql2 );
$count2 = 0;
?>
<script language = "JavaScript">
//如果这个数组中含有双引号则不能使用。即二级和三级类不能含有双引号
var onecount2;
onecount2=0;
subcat2 = new Array();
<?php
$count2 = 0;
while($res2 = mysql_fetch_row($result2)){
?>
subcat2[<?php echo $count2?>] = new Array("<?php echo $res2[1]?>","<?php echo $res2[3]?>","<?php echo $res2[0]?>");
<?php
$count2++;
}
?>
onecount2=<?php echo $count2?>;
function changelocation2(smallclassid)
{
document.myform.minclassid.length = 0;
var smallclassid=smallclassid;
var j;
document.myform.minclassid.options[0] = new Option('请选择三级分类','');
for (j=0;j < onecount2; j++)
{
if (subcat2[j][1] == smallclassid)
{
document.myform.minclassid.options[document.myform.minclassid.length] = new Option(subcat2[j][0], subcat2[j][2]);
}
}
}
</script>
<select name="bigclassid" onChange="changelocation(document.myform.bigclassid.options[document.myform.bigclassid.selectedIndex].value)" size="1">
<option selected value="">请指定一级分类</option>
<?
$sql = "select * from bigclass order by sort";
$result = mysql_query( $sql );
while($res = mysql_fetch_row($result)){
?>
<option value="<? echo $res[0]; ?>"><? echo $res[1]?></option>
<? } ?>
</select>
<select name="smallclassid" onChange="changelocation2(document.myform.smallclassid.options[document.myform.smallclassid.selectedIndex].value)" size="1">
<option selected value="">请指定二级分类</option>
</select>
<select name="minclassid" size="1">
<option selected value="">==所有三级分类==</option>
</select>
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?