<?php
//用户查询
function user($shibie,$word,$ser){
$sql="SELECT {$word},{$shibie} FROM user WHERE {$word}='{$ser}' ";
    $logininfo = mysql_query($sql);
    if($logininfo && mysql_num_rows($logininfo)>0){
    list($a,$b) = mysql_fetch_row($logininfo);
    }
	if($shibie=='head' && $b==NULL){
	  $b='http://'.$_SERVER['HTTP_HOST'].'/style/nohead.jpg';
	  }
    mysql_free_result($logininfo);
    return $b;


}
function user2($shibie,$xid,$wapid){
$sql="SELECT {$shibie},xid,site_u FROM user WHERE xid='{$xid}' AND site_u='{$wapid}'";
    $logininfo = mysql_query($sql);
    if($logininfo && mysql_num_rows($logininfo)>0){
    list($a,$b,$c) = mysql_fetch_row($logininfo);
    }
	if($shibie=='head' && $b==NULL){
	  $b='http://'.HTTP_HOST.'/style/nohead.jpg';
	  }
    mysql_free_result($logininfo);
    return $a;


}
?>