include("./initdb.php");
function interface()
{
include("csearch.htm");
}
function result()
{
global $Table,$DB_web,$post_var;
if(!empty($post_var['dalx']))
{
$condition1=" AND dalx = '".$post_var['dalx']."'";
}
if(!empty($post_var['qzh']))
{
$condition2=" AND qzh like '%".$post_var['qzh']."%'";
}
if(!empty($post_var['mlh']))
{
$condition3=" AND mlh like '%".$post_var['mlh']."%'";
}
if(!empty($post_var['ajh']))
{
$condition4=" AND ajh like '%".$post_var['ajh']."%'";
}
if(!empty($post_var['jh']))
{
$condition5=" AND jh like '%".$post_var['jh']."%'";
}
if(!empty($post_var['tm']))
{
$condition6=" AND tm like '%".$post_var['tm']."%'";
}
if(!empty($post_var['zrz']))
{
$condition7=" AND zrz like '%".$post_var['zrz']."%'";
}
if(!empty($post_var['ztc']))
{
$condition8=" AND ztc like '%".$post_var['ztc']."%'";
}
if(!empty($post_var['flh']))
{
$condition9=" AND flh like '%".$post_var['flh']."%'";
}
if(!empty($post_var['swh']))
{
$condition10=" AND swh like '%".$post_var['swh']."%'";
}
if(!empty($post_var['bgqx']))
{
$condition11=" AND bgqx = '".$post_var['bgqx']."'";
}
if(!empty($post_var['zzjg']))
{
$condition12=" AND zzjg like '%".$post_var['zzjg']."%'";
}
if(!empty($post_var['dm']))
{
$condition13=" AND dm like '%".$post_var['dm']."%'";
}
if(!empty($post_var['rw']))
{
$condition14=" AND rw like '%".$post_var['rw']."%'";
}
if(!empty($post_var['hy']))
{
$condition15=" AND hy like '%".$post_var['hy']."%'";
}
if(!empty($post_var['cwsj']))
{
$condition16=" AND cwsj like '%".$post_var['cwsj']."%'";
}
if(!empty($post_var['cdrom']))
{
$condition17=" AND cdrom like '%".$post_var['cdrom']."%'";
}
$condition=" where 1=1 ".$condition1.$condition2.$condition3.$condition4.$condition5.$condition6.$condition7.$condition8.$condition9.$condition10.$condition11.$condition12.$condition13.$condition14.$condition15.$condition16.$condition17;
$sqlnum="select * from $Table[bli] ".$condition;
$resultnum=$DB_web->query($sqlnum);
$intTotalNum=$DB_web->num_rows($resultnum);
if($intTotalNum>0)
{
//---------------------------------
//处理翻页函数参数
getParam($pcurrpage,$intLineNum,$offset,$intTotalNum,15,$currpage);
$limits=" AND id in(SELECT id FROM (SELECT rownum as numrow,id FROM $Table[bli] $condition order by id asc) WHERE numrow>$offset and numrow<=($offset+$intLineNum))";
//$limits=" LIMIT $offset,$intLineNum";
$intWhileNum="10";
$bgcolor="f5f5f5";
$btnColor="#E8E8FF";
$prama="";
//翻页函数
$pages=showPages($pcurrpage,$intTotalNum,$intLineNum,$intWhileNum,$prama,$bgcolor,$btnColor);
//---------------------------------
echo"
";
echo"";
echo"
".$pages."
";
echo"
";
}
else
{
echo"
没有任何信息!
";
}
}
function process()
{
global $post_var;
switch($post_var['func'])
{
case "result":
result();
break;
default:
interface();
break;
}
}
include("head.htm");
process();
include("foot.htm");
?>