"" && is_numeric($_GET["uid"]))? $_GET["uid"] : $_SESSION['userid'];
if($suserid=="")
{
errmsg("please input userid","JavaScript:history.back(0)");
}
mysql_query("SET character_set_connection='utf8', character_set_results='utf8', character_set_client=binary");
$uname = ($suserid <>"")? get_username($suserid) : $_SESSION['username'] ;
mysql_query("SET character_set_connection='latin1', character_set_results='latin1', character_set_client=binary");
$_poplist=($_GET["list"]=="new")? 0 : 1;
$fie=" `postid`,`zoneid`,`catid`,`userid`,`Username`,`post_topic`,`postdate`,`Views` ";
$order = "order by `postid` DESC";
$whcase[] = " `userid` = ".$suserid;
if(is_numeric($_GET["zid"]))
{
$whcase[]="`zoneid` = ".$_GET["zid"] ;
$zoneurl="/".$_GET["zid"];
require_once("./include/catlist/catlist_".$_GET[zid].".php");
}
if(is_numeric($_GET["cid"]))
{
$whcase[]="`catid` = ".$_GET["cid"] ;
$caturl="/".$_GET["cid"];
}
if($_SESSION['userid'] <> $_GET["uid"] && $_GET["cid"]<>999)
{
$whcase[]="`catid` <> 999";
}
$poplistsize=10;
if(isset($whcase))
{
$where=" and ".join(" and ",$whcase);
}
$sql="Select {$fie} from `post_video` where `active` = 1 {$where} {$order} ";
$vidrs = mysql_query($sql);
$vidnum=@mysql_num_rows($vidrs);
while($vidrow=@mysql_fetch_assoc($vidrs))//video
{
$vidrow["zonename"]="vid";
$postlist[]=$vidrow;
if($_poplist)
$viewlist[count($postlist)-1]=$vidrow["Views"];
else
$viewlist[count($postlist)-1]=strtotime($vidrow["postdate"]);
}
$photors = mysql_query("Select {$fie} from `post_photo` where `active` = 1 {$where} {$order} ");
$photonum=@mysql_num_rows($photors);
while($photorow=@mysql_fetch_assoc($photors))//photo
{
$photorow["zonename"]="photo";
$postlist[]=$photorow;
if($_poplist)
$viewlist[count($postlist)-1]=$photorow["Views"];
else
$viewlist[count($postlist)-1]=strtotime($photorow["postdate"]);
}
mysql_query("SET character_set_connection='utf8', character_set_results='utf8', character_set_client=binary");
$webrs = mysql_query("Select {$fie} from `post_web` where `active` = 1 {$where} {$order} ");
mysql_query("SET character_set_connection='latin1', character_set_results='latin1', character_set_client=binary");
$webnum=@mysql_num_rows($webrs);
while($webrow=@mysql_fetch_assoc($webrs))//photo
{
$webrow["zonename"]="web";
$postlist[]=$webrow;
if($_poplist)
$viewlist[count($postlist)-1]=$webrow["Views"];
else
$viewlist[count($postlist)-1]=strtotime($webrow["postdate"]);
}
if(is_array($viewlist))
{
arsort ($viewlist);
reset ($viewlist);
$i=0;
$totla=$vidnum + $photonum+$webnum;
$pagenav=pageft($totla,$poplistsize,$siteurl."/userpost/{$suserid}{$zoneurl}{$caturl}",array());
}
?>
echo $uname ?> -
|
$zonerow)
{
if($zonerow[active])
{
$zonerow[zid] = $zid;
$zlist[] = $zonerow;
$zliststor[count($zlist)-1]=$zonerow["stor"];
}
asort ($zliststor);
reset ($zliststor);
}
unset($zonerow);
unset($zid);
foreach($zliststor as $k=>$v)
{
$zonerow=$zlist[$k];
$zid=$zonerow[zid];
if($zid==$_GET[zid])
{
?>
}else{
?>
}
}
?> |
$catrow)
{
$i++;
?> echo $catrow[name]; ?>
echo ($i%8 == 0)? " " :"";
}
}
?> |
/ ".$__zone[$_GET["zid"]][name]." / " : ""?>".$__catlist[$_GET["zid"]][$_GET["cid"]][name]." / " : ""?> |
|
|
|
|