www.gusucode.com > 仿51.com的php源码 1.1 > vip_getindexfriendleft.php
<?php header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); ?> <?php include("include/dbclass.php"); $dbc=new DbConn(); $user=$_GET["user"]; $type=$_GET["Type"]; $sql="select * from userdata where User_Account='$user'"; $rs=$dbc->getRs($sql); if($rs==null) { echo "没有资料! "; exit(); } ?> <?php if((int)$_COOKIE["ucpreviewhomepage"]==1) { $cssid=$_COOKIE["tplhomepageid"]; } else { $cssid=$rs["DefaultStyle"]; } ?> <meta http-equiv="Content-Type" content="text/html; charset=GB2312" /> <link href="Style/<?php echo $cssid; ?>/Style_<?php echo $cssid; ?>.css" rel="stylesheet" type="text/css" /> <title> 我是<?php echo $rs["nickname"]; ?> </title> <style> body{ background:transparent; } </style> <script language='JavaScript'> function killErrors() { return true; } window.onerror = killErrors; String.prototype.Trim = function(){return this.replace(/^\s+|\s+$/g,"");} </script> <body> <div id='friend_style_body' class='lebo t' style="padding:15px;padding-left:5px;padding-right:0px"> <script type='text/javascript'> var time = new Date(); var now = time.getTime()/1000; </script> <?php $sql1="select * from myfriend where User_Account='$user' and OrderType='0' order by IntOrder desc limit 0,8"; $result=$dbc->query($sql1); while ($row=@mysql_fetch_array($result)) { ?> <?php if((int)$cssid>200){?> <div style='width:85px;height:100px;float:left;text-align:center;' > <TABLE align='center'> <TR> <TD valign='center'> <script src='1e/<?php echo $row["myfriendname"]; ?>/<?php echo $row["myfriendname"]; ?>.js'></script> <div style='width:80px;height:90px;overflow:hidden;border:solid 1px cccccc'> <div><a href='/home.php?user=<?php echo $row["myfriendname"]; ?>' target='_blank' ><script>document.write('<img style="width:80px;height:90px" alt=\''+<?php echo $row["myfriendname"]; ?>_nickname+'\' border=0 src=\''+<?php echo $row["myfriendname"]; ?>_photo+'\'>')</script></a></div></div><div style='margin-top:5px;width:80px;overflow:hidden;height:30px;margin-bottom:10px;'><a target='_blank' href='home.php?user=<?php echo $row["myfriendname"]; ?>' class='friend_a_font'><script>var a = <?php echo $row["myfriendname"]; ?>_nickname; if(a.Trim()!=''){ document.write(a); }else{ document.write("<?php echo $row["myfriendname"]; ?>"); }</script></div> </TD> </TR> </TABLE> </div> <?php }else{?> <div style='width:130px;height:130px;float:left;text-align:center;' > <TABLE align='center'> <TR> <TD valign='center'> <script src='1e/<?php echo $row["myfriendname"]; ?>/<?php echo $row["myfriendname"]; ?>.js'></script><div style='width:80px;height:90px;overflow:hidden;border:solid 1px cccccc'> <div><a href='home.php?user=<?php echo $row["myfriendname"]; ?>' target='_blank' ><script>document.write('<img style="width:80px;height:90px" alt=\''+<?php echo $row["myfriendname"]; ?>_nickname+'\' border=0 src=\''+<?php echo $row["myfriendname"]; ?>_photo+'\'>')</script></a></div></div><div style='margin-top:5px;width:80px;overflow:hidden;height:30px;margin-bottom:10px;'><a target='_blank' href='home.php?user=<?php echo $row["myfriendname"]; ?>' class='friend_a_font'><script>var a = <?php echo $row["myfriendname"]; ?>_nickname; if(a.Trim()!=''){ document.write(a); }else{ document.write("<?php echo $row["myfriendname"]; ?>"); }</script></div> </TD> </TR> </TABLE> </div> <?php }?> <?php }?> </div> </body> <script> if(document.body.scrollHeight){ parent.document.all("getindexfriendleft").style.height=document.body.scrollHeight; } </script> <SCRIPT LANGUAGE="JavaScript"> <!-- function getDisplayFriendsCount() { if (!document.getElementById('adBlockfriend1') && !document.getElementById('adBlockfriend2')) { return; } if (document.getElementById('adBlockfriend1').style.display != 'none' && document.getElementById('adBlockfriend2').style.display != 'none') { return; } if (document.getElementById('adBlockfriend1').style.display == 'none' && document.getElementById('adBlockfriend2').style.display == 'none') { return; } if (document.getElementById('adBlockfriend1').style.display == 'none'|| document.getElementById('adBlockfriend2').style.display == 'none') { displayLastOne(); return; } } function displayLastOne() { if (document.getElementById('lastfriend')) { document.getElementById('lastfriend').style.display = 'inline'; } } getDisplayFriendsCount(); //--> </SCRIPT>