Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Iš online noriu pasidaryt reklamą

Parašė St1geR· 2010 Gru. 22 10:12:29
#1

Labas, pas mane temos headeryje yra sukurta panelė su online users tai noriu persidaryt kad būtų viena 468x60 reklama, štai kodas, gal galite perdaryti???


global $theme_width,$userdata,$settings,$locale,$data,$db_prefix,$lookup,$msg_count,$aidlink;
 
	echo "<table align='center' cellpadding='0' cellspacing='0' class='paneles'>\n<tr>
	<td align='right' width='510'>";
	echo "</td>
	<td align='right' width='160'>";
	echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>";
	$result=dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,06");
	if(dbrows($result)!=0){
	while($data=dbarray($result)){
	$lastseen=time()-$data['user_lastvisit'];
	$iW=sprintf("%2d",floor($lastseen/604800));
	$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
	$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
	$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
	$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
	if($lastseen<60){
	$lastseen=" <span style='color:#7eff00'><b>ONLINE</b></span>\n"; 
	}elseif($lastseen<360){
	$lastseen=" <span style='color:#ff0072'><b>OFFLINE</b></span>\n"; 
	}elseif($iW>0){
	if($iW==1) $Text="".$locale['XXX_007']."";
	elseif($iW==2 || $iW==3 || $iW==4) $Text="".$locale['XXX_011']."";
	else $Text="".$locale['XXX_008']."";
	$lastseen="$iW $Text";
	}elseif($iD>0){
	if($iD==1) $Text="".$locale['XXX_009']."";
	else $Text="".$locale['XXX_010']."";
	$lastseen="$iD $Text";
	}else{
	$lastseen="$iH:$iM:$iS";
	}
	echo "<tr>\n<td class='side-small' align='left'>» \n";
	echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n";
	echo trimlink($data['user_name'], 15)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";
	}
	}
	echo "</table>";
	echo "</td>
	<td align='right' width='110'>";
	echo "</td>
	</tr>
	</table>";