fetch1("select searchvar from {$dbtbpre}enewsmemberform where fid='$formid'"); if(empty($formr[searchvar])) { $formr[searchvar]=','; } $formr[searchvar].='username,'; $count=count($show); for($i=0;$i<$count;$i++) { if(empty($show[$i])) { continue; } $show[$i]=str_replace(',','',$show[$i]); if(!strstr($formr[searchvar],','.$show[$i].',')) { continue; } $show[$i]=RepPostVar($show[$i]); if(stristr(','.$searchf.',',','.$show[$i].',')) { continue; } $dh=empty($searchf)?'':','; $searchf.=$dh.$show[$i]; if($show[$i]=='username') { $f='u.`'.egetmf('username').'`'; } else { $f='ui.`'.$show[$i].'`'; } if(strlen($keyboard[$i])>$public_r['max_keyboard']) { printerror("MinKeyboard","",1); } $onewhere=UserSearchDoKeyboard($f,$hh[$i],$keyboard[$i]); if($onewhere) { $or=empty($uswhere)?'':' '.$andor.' '; $uswhere.=$or.'('.$onewhere.')'; $search.='&show[]='.$show[$i].'&hh[]='.RepPostStr($hh[$i],1).'&keyboard[]='.RepPostStr($keyboard[$i],1); } } if($uswhere) { $add.=$where.'('.$uswhere.')'; } } else { $searchf='username'; if($keyboard[0]) { if(strlen($keyboard[0])>$public_r['max_keyboard']) { printerror("MinKeyboard","",1); } $onewhere=UserSearchDoKeyboard('u.'.egetmf('username'),$hh[0],$keyboard[0]); if($onewhere) { $add.=$where.$onewhere; } } $search.='&hh[]='.RepPostStr($hh[0],1).'&keyboard[]='.RepPostStr($keyboard[0],1); } } $add=" LEFT JOIN {$dbtbpre}enewsmemberadd ui ON u.".egetmf('userid')."=ui.userid".$add; $page=(int)$_GET['page']; $page=RepPIntvar($page); $start=0; $line=$public_r['member_num'];//每页显示条数 $page_line=10;//每页显示链接数 $offset=$page*$line;//总偏移量 $totalnum=(int)$_GET['totalnum']; if(!$public_r['usetotalnum']) { $totalnum=0; } if($totalnum<1) { $totalquery="select count(*) as total from ".eReturnMemberTable()." u".$add; $num=$empire->gettotal($totalquery);//取得总条数 } else { $num=$totalnum; } if($public_r['usetotalnum']) { $search.='&totalnum='.$num; } //checkpageno eCheckListPageNo($page,$line,$num); //模板 $tempid=(int)$_GET['tempid']; if(empty($tempid)) { $tempid=1; } else { $search.='&tempid='.$tempid; } $tempfile=ECMS_PATH.'e/template/member/memberlist/'.$tempid.'.php'; if(!file_exists($tempfile)) { $tempfile=ECMS_PATH.'e/template/member/memberlist/1.php'; } $returnpage=page1($num,$line,$page_line,$start,$page,$search); @require($tempfile); db_close(); $empire=null; ?>