getcount($thsql); if($tc>0){ $thwhere= "thname like '%$key%'"; $th=array('thid','th15','thname','thfl','th17'); $arr[] = selecttable('zx_th', $th, $thwhere, $plussql); $sname[]='物品('.$tc.')'; $st[]=1; $stable[]=" 物品小图  物品名字  物品分类  物品说明 "; } //装备 $eqsql="select eqid from zx_eq where eqname like '%$key%'"; $ec=$db->getcount($eqsql); if($ec>0){ $eqwhere= "eqname like '%$key%'"; $eq=array('eqid','eqlimg','eqname','eqdjxz','eqsell','eqbuy','eqsm'); $arr[] = selecttable('zx_eq', $eq, $eqwhere, $plussql); $sname[]="装备(".$ec.")"; $st[]=2; $stable[]=" 装备小图片  装备名字  装备等级  装备出售价格  装备购买价格  装备说明 "; } //生产 $yisql="select yid from zx_sc where yiname like '%$key%'"; $yc=$db->getcount($yisql); if($yc>0){ $yiwhere= "yiname like '%$key%'"; $yi=array('yid','yiname','yilc','yiscwp1','yiscwp2','yiscwp3'); $arr[] = selecttable('zx_sc', $yi, $yiwhere, $plussql); $sname[]="生产(".$yc.")"; $st[]=3; $stable[]=" 生产名字  生产分类  生产生成物品1  生产生成物品2  生产生成物品3 "; } // //合成 //$sysql="select synid from zx_syn where synname like '%$key%'"; //$sc=$db->getcount($sysql); //if($sc>0){ //$sywhere= "synname like '%$key%'"; //$sy=array('synid','synlx','synname','synscwp1','synzcl','synfcl1','synfcl2','synfcl3','synfcl4'); //$arr[] = selecttable('zx_syn', $sy, $sywhere, $plussql); //$sname[]="合成(".$sc.")"; //$st[]=4; //$stable[]=" // 合成物品名字  // 生成物品  // 主材料  // 辅助材料 "; //} //材料 //$misql="select mineid from zx_kw where minename like '%$key%'"; //$mc=$db->getcount($misql); //if($mc>0){ //$miwhere= "minename like '%$key%'"; //$mi=array('mineid','minename','minesort','mineneit','minehdgl'); //$arr[] = selecttable('zx_mine', $mi, $miwhere, $plussql); //$sname[]="矿物(".$mc.")"; //$st[]=5; //$stable[]=" // 矿物名字  // 矿物分类  // 采集所需物品  // 采集所获物品  // 采集概率 "; //} //怪物 $itsql="select itid from zx_item where itname like '%$key%'"; $ic=$db->getcount($itsql); if($ic>0){ $itwhere= "itname like '%$key%'"; $it=array('itid','itname','itlevel'); $arr[] = selecttable('zx_item', $it, $itwhere, $plussql); $sname[]="怪物(".$ic.")"; $st[]=6; $stable[]=" 怪物名字  怪物等级 "; } //宠物 $psql="select petid from zx_pets where petname like '%$key%'"; $pc=$db->getcount($psql); if($pc>0){ $pwhere= "petname like '%$key%'"; $pet=array('petid','petimg','petname'); $arr[] = selecttable('zx_pets', $pet, $pwhere, $plussql); $sname[]="宠物(".$pc.")"; $st[]=7; $stable[]=" 宠物图标  宠物名字  宠物来源 "; } //NPC $nsql="select npcid from zx_npc where npcname like '%$key%'"; $nc=$db->getcount($nsql); if($nc>0){ $nwhere= "npcname like '%$key%'"; $npc=array('npcid','NPCDistribute','npcid','npcname','npcsort','mapX','mapY'); $arr[] = selecttable('zx_npc', $npc, $nwhere, $plussql); $sname[]="NPC(".$nc.")"; $st[]=8; $stable[]=" NPC名字  NPC分类  坐标 "; } //技能 //$jsql="select jnid from zx_jn where jnname like '%$key%'"; //$jc=$db->getcount($jsql); //if($jc>0){ //$jnwhere= "jnname like '%$key%'"; //$jn=array('jnid','jnlimg','jnname','jnfl','jnms'); //$arr[] = selecttable('zx_jn', $jn, $jnwhere, $plussql); //$sname[]="技能(".$jc.")"; //$st[]=9; //$stable[]=" // 技能图标  // 技能名  // 技能类别  // 技能描述 "; //} //变身卡 //$cardsql="select cardid from zx_card where cardname like '%$key%'"; //$cc=$db->getcount($cardsql); //if($cc>0){ //$cardwhere= "cardname like '%$key%'"; //$card=array('cardid','cardname','cardlimg','cardlevel','cardbssx1','cardbssx2','cardbssx3','cardbssx4','cardbssx5','cardbssx6','cardsm'); //$arr[] = selecttable('zx_card', $card, $cardwhere, $plussql); //$sname[]="变身卡(".$cc.")"; //$st[]=10; //$stable[]=" // 图标  // 名字  // 等级  // 变身属性  // 说明 "; //} //仙号 //$xhsql="select xhid from zx_xh where xhname like '%$key%'"; //$xc=$db->getcount($xhsql); //if($xc>0){ //$xhwhere= "xhname like '%$key%'"; //$xh=array('xhid','xhname','xhjs','xhfrom'); //$arr[] = selecttable('zx_xh', $xh, $xhwhere, $plussql); //$sname[]="仙号(".$xc.")"; //$st[]=11; //$stable[]=" // 仙号名字   // 仙号介绍 "; //} //任务 //$rwsql="select rwid from zx_rw where rwname like '%$key%'"; //$rwc=$db->getcount($rwsql); //if($rwc>0){ //$rwwhere= "rwname like '%$key%'"; //$rw=array('rwid','rwname','rwlb','rwxzdj','rwfbnpc','rwsm'); //$arr[] = selecttable('zx_rw', $rw, $rwwhere, $plussql); //$sname[]="任务(".$rwc.")"; //$st[]=12; //$stable[]=" // 任务名字  // 任务分类  // 任务等级  // 接任务NPC  // 任务说明 "; //} } function svalue($st,$listvalue){ if($st==1){ $sm=str_replace('#r','',$listvalue['th17']); $sm=preg_replace('/\^([0-9a-f]{6})/isU','',$sm); echo "   ".$listvalue['thname']."  ".$listvalue['thfl']."  ".$sm."  "; } if($st==2){ echo "   ".$listvalue['eqname']."  ".$listvalue['eqdjxz']."  ".$listvalue['eqsell']."  ".$listvalue['eqbuy']."  ".$listvalue['eqsm']."  "; } if($st==3){ if($listvalue['yiscwp1']!=0)$wp1=pgb($listvalue['yiscwp1']); if($listvalue['yiscwp2']!=0)$wp2=pgb($listvalue['yiscwp2']); if($listvalue['yiscwp3']!=0)$wp3=pgb($listvalue['yiscwp3']); echo " ".$listvalue['yiname']."  ".$listvalue['yilc']."  ".$wp1['name']."  ".$wp2['name']."  ".$wp3['name']."  "; } //if($st==4){ //if($listvalue['synfcl1']=='0')$listvalue['synfcl1']=''; //if($listvalue['synfcl2']=='0')$listvalue['synfcl2']=''; //if($listvalue['synfcl3']=='0')$listvalue['synfcl3']=''; //if($listvalue['synfcl4']=='0')$listvalue['synfcl4']=''; //$wptemp=pgb($listvalue['synscwp1']); //$cltemp=pgb($listvalue['synzcl']); //$fcltemp=pgb($listvalue['synfcl1']); // //echo " // ".$listvalue['synname']."  // ".$wptemp['name']."  // ".$cltemp['name']."  // ".$fcltemp['name']."  // "; //} if($st==5){ echo " ".$listvalue['minename']."  ".$listvalue['minesort']."  ".$listvalue['mineneit']."  ".$listvalue['mineaccess']."  ".round($listvalue['minecjgl']*100,7)."%  "; } if($st==6){ echo " ".$listvalue['itname']."  ".$listvalue['itlevel']."  "; } if($st==7){ echo "   ".$listvalue['petname']."  捕捉  "; } if($st==8){ echo " ".$listvalue['npcname']."  ".$listvalue['npcsort']."  ".$listvalue['NPCDistribute'].":".$listvalue['mapX'].",".$listvalue['mapY']."  "; } //if($st==9){ //echo " // //   // ".$listvalue['jnname']."  // ".$listvalue['jnfl']."  // ".$listvalue['jnms']."  // "; //} //if($st==10){ // if($listvalue['cardbssx1']=='0')$listvalue['cardbssx1']=''; // if($listvalue['cardbssx2']=='0')$listvalue['cardbssx2']=''; // if($listvalue['cardbssx3']=='0')$listvalue['cardbssx3']=''; // if($listvalue['cardbssx4']=='0')$listvalue['cardbssx4']=''; // if($listvalue['cardbssx5']=='0')$listvalue['cardbssx5']=''; // if($listvalue['cardbssx6']=='0')$listvalue['cardbssx6']=''; // echo " // //   // ".$listvalue['cardname']."  // ".$listvalue['cardlevel']."  // ".$listvalue['cardbssx1'].$listvalue['cardbssx2'].$listvalue['cardbssx3'].$listvalue['cardbssx4'].$listvalue['cardbssx5'].$listvalue['cardbssx6']."  // ".$listvalue['cardsm']."  // "; //} //if($st==11){ //echo " // // ".$listvalue['xhname']."  // ".$listvalue['xhfrom']."  // "; //} //if($st==12){ // if($listvalue['rwfbnpc']!=''){ // $npc=gv($listvalue['rwfbnpc'],'npc'); // }else{ // $npc=''; // } // echo " // // ".$listvalue['rwname']."  // ".$listvalue['rwlb']."  // ".$listvalue['rwxzdj']."  // ".$npc."  // ".$listvalue['rwsm']."  // "; //} } ?>
".$lnvalue.""; $nn=$nn+1; } echo "
"; $nn2=0; foreach ($stable as $stvalue) { if($nn2==0){ $on2='block'; }else{ $on2='none'; } echo "
".$stvalue.""; foreach ($arr[$nn2] as $listvalue) { svalue($st[$nn2],$listvalue); } $nn2=$nn2+1; echo "
"; } }else{ echo "对不起。搜索不到数据!
"; } ?>