Parašė Soo-2· 2009 Sau. 5 21:01:54
#1
sukuriau viena toki puslapi, nariai.php..
kaip jame nustatyti kad fronto dydis, spalva ir t.t. butu is style.css ??
prisijungimo_istorija {
font-size : 8px;
font-color : #ffffff;
}
kazkaip su class='prisijungimo_istorija'
bet as nelabai zinau..
va tas puslapis:
<?php
include "maincore.php";
include "subheader.php";
include "side_left.php";
include LOCALE.LOCALESET."user_fields.php";
nariai_o("Nariai");
$result = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 0,20");
echo "<table width='100%'>
<tr>
<td><b>Nikas:</b></td>
<td><b>Vieta:</b></td>
<td><b>Skype:</b></td>
<td><b>Matytas:</b></td>
</tr>\n";
$x = 0;
while ($data = dbarray($result)) {
$x = $x+1;
$cell = $x%2 == 0 ? "tbl1" : "tbl2";
$stat = dbcount("(*)","online","online_user = '".$data['user_id']."'") ? "<font color='#009900'>Prisijungęs</font>" : "<font color='#990000'>Atsijungęs</font>";
$stat = time()-$data['user_lastvisit'];
$stat1 = time()-$data['user_lastvisit'];
$iW = sprintf("%2d",floor($stat/604800));
$iD = sprintf("%2d",floor($stat/(60*60*24)));
$iH = sprintf("%02d",floor((($stat%604800)%86400)/3600));
$iM = sprintf("%02d",floor(((($stat%604800)%86400)%3600)/60));
$iS = sprintf("%02d",floor((((($stat%604800)%86400)%3600)%60)));
if ($stat1 < 60){
$stat= "Online";
} elseif ($stat1 < 360){
$stat= "Offline";
} elseif ($iW > 0){
$stat = $iW;
} elseif ($iD > 0){
$stat = $iD;
} else {
$stat = $iH.":".$iM.":".$iS;
}
echo "<tr>
<td class='$cell'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>
<td class='$cell'>".($data['user_location'] ? $data['user_location'] : "---")."</td>
<td class='$cell'>".($data['user_aim'] ? $data['user_aim'] : "---")."</td>
<td class='$cell'>$stat</td>
</tr>\n";
}
echo "</table>\n";
nariai_c();
include "side_right.php";
include "footer.php";
?>
Redagavo Soo-2· 2009 Sau. 5 21:01:09