Помогите откоректировать вывод

205
.
BmD-music
мне нужно что бы 1ая группа картинок была впритык с аватаркой слева а 2ая группа справа.
информация о юзере была на норм расстоянии от 2ой группы.
echo'<table><tr><td>';
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='golova' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='golova' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/golova.gif\" width='30'  height='30'/></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30' /></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='body' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='body' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/body.gif\" width='30'  height='30'/></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30' /></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='weapon' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='weapon' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/weapon.gif\" width='30'  height='30'/></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30'/></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='ruki' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='ruki' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/ruki.gif\" width='30'  height='30'/></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30'/></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='shit' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='shit' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/shit.gif\" width='30'  height='30'/></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30'/ ></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='pants' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='pants' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/pants.gif\" width='30'  height='30' /></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30'  '/></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='nogi' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='nogi' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/nogi.gif\" width='30'  height='30'/></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30' /></a></br>";
}
echo'</td>';

if (is_file('foto/'.$usdata[usr].'.gif'))
{
echo'<td><img src="foto/'.$usdata[usr].'.gif" alt="pic" align="left"align="left" width="142" height="210" style="margin-right:10px;border:2px solid #383838"/></td>'; } else {
echo"<td><img src='pic/avatar/$usdata[storona]/$kl/$usdata[pol]/$st.png' align='left' width='142' height='210' style='margin-right:10px;border:2px solid #383838</td>' />"; }
echo'<td>';


$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='amulet' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='amulet and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/amulet.gif\" width='30'  height='30' ></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30' /></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='rpoyas' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='rpoyas' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/rpoyas.gif\" width='30'  height='30'  /></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30' /></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='poyas' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='poyas' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/poyas.gif\"  width='30' height='30' /></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30' height='30' /></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='kolco' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='kolco' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/kolco.gif\"  width='30' height='30' /></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30'  height='30'/></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='rkolco' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='rkolco' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/rkolco.gif\" width='30' height='30'  /></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30'  height='30'/></a></br>";
}
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='plash' and `image`='yes'");
$mag = mysql_fetch_array($req);
$u = explode("*",$mag[name]);
$req = mysql_query("SELECT id,name FROM `item` WHERE `usr` = '$nick' and `tip`='plash' and `image`='yes'");
$avto=mysql_num_rows($req);
if($avto==0){
echo"<img src=\"shmot/pusto/plash.gif\"  width='30' height='30'   /></br>";
}else{
$mag = mysql_fetch_array($req);
echo"<a href='inventar.php?mod=in&amp;id=$mag[id]'> <img src=\"shmot/$u[0].png\" width='30'  height='30'/></a></br>";
}
echo'</td>';
echo '<td align="left">';

if (!empty($usdata[zamujem])){
echo '<div style="border:1px solid #404040;padding:3px;background:1px #252525;height:0px auto;width:128px;">';
echo '<font color=#277C56><left><img src="pic/smiles/zakolco.png" alt="zakolco"/> В браке с <a href="/search.php?nick='.$usdata[zamujem].'&go=go">'.$usdata[zamujem].'</left></a></font><br/>';
echo '</div>';
}
echo"<font color=red><b>Жизни:</b> $usdata[hp]/$usdata[hpall]</font><br/>";
echo"<font color=#0094FF><b>Мана:</b> $usdata[mp]/$usdata[mpall]</font><br/>";

$reqbf = mysql_query("SELECT * FROM `baf` WHERE `usr`='$nick'");
$avto=mysql_num_rows($reqbf);
while($mag = mysql_fetch_array($reqbf))
{
$at=$mag[bafat]+$at;
$df=$mag[pmdef]+$df;
if (!empty($mag[bafat])){$bafat="<font color=grey><small>+[".number_format($at, 0, ',', "`")."]</small></font>";}
if (!empty($mag[pmdef])){$pmdef="<font color=grey><small>+[".number_format($df, 0, ',', "`")."]</small></font>";}
}

echo"<b>Физ. защ. (P.Def):</b> ".number_format($usdata[pdef], 0, ',', "`")." <font color=grey> $pmdef</font>";
echo"<br/>";
echo"<b>Маг. защ. (M.Def):</b> ".number_format($usdata[mdef], 0, ',', "`")." <font color=grey> $pmdef</font>";
echo'<br/>';
echo"<b>Физ атака (P.Att):</b> ".number_format($usdata[patt], 0, ',', "`")." <font color=grey> $bafat</font>";
echo'<br/>';
echo"<b>Маг атака (M.Att):</b> ".number_format($usdata[matt], 0, ',', "`")." <font color=grey> $bafat</font>";
if(!empty($usdata[clan])){
$req = mysql_query("SELECT * FROM `clan` WHERE `lider` = '$usdata[clan]' LIMIT 1");
$clan = mysql_fetch_array($req);
echo"<br/>В клане: <b><a href=\"clan.php?id=$clan[id]\">$clan[name]</a></b><br/>";}else{
echo"<br/>";}
$req = mysql_query("SELECT * FROM `karma` WHERE `usr` = '$nick'");
$avto=mysql_num_rows($req);
echo'<b>Рейтинг: '.$avto.'</b><br/>';
$req = mysql_query("SELECT * FROM `karma` WHERE `usr` = '$nick' and `from`='$log' LIMIT 1");
$avto=mysql_num_rows($req);
if($avto==0 and $udata[lvl]>=101 and $log!=$nick){
echo"<a href=\"karma.php?usr=$nick\">[увеличить рейтинг]</a><br/>";
}
echo'<br/>Побед: '.$usdata[wins].'<br/>';
echo'Поражений: '.$usdata[loses].' <br/>';

$reqs= mysql_query("SELECT id,name FROM `pit` WHERE `usr` = ''.$nick.'' and `status`='on'");
$avtos=mysql_num_rows($reqs);
if($avtos==1){
$pit = mysql_fetch_array($reqs);
echo"Питомец: <b><a href=\"pit.php?id=$pit[id]\">$pit[name]</a></b><br/>";
}
$laikas = 150;
$dabar = time();
$timeout = $dabar - $laikas;
$asd = mysql_num_rows(mysql_query("SELECT laikas, usr FROM online WHERE laikas > '$timeout' AND usr='$nick'"));
////////////////////////////
if($asd==0 && $usdata[dostup]<3){
echo"Статус: <font color=red>Off</font><br/>";
echo"Последнее посещение: $usdata[lvisit]<br/><br/>";
}else{
$reqs = mysql_query("SELECT * FROM `mesto` WHERE `usr` = '$nick' LIMIT 1");
$mesto = mysql_fetch_array($reqs);//место
if($mesto[city]==0){
echo"Локация: <b>Город</b><br/>";
}elseif($mesto[city]==1){
$reqs = mysql_query("SELECT * FROM `mesto` WHERE `usr` = '$nick' LIMIT 1");
$wor = mysql_fetch_array($reqs);//место
echo"Локация: <b> $wor[mesto] </b><br/>";
}else{
echo"Локация: <b>Замок</b><br/>";
}
echo"Статус: <font color=lime><b>On</b></font><br/><br/>";
}

echo'</td></tr></table>';
.
собсно скрин проблемы
Прикрепленные файлы:
.
¤
BmD-music, во первых подобные куски кода надо под спойлер, и скрин нельзя полегче сделать?
.
VARG, закройте пожалуйста тему.
разобрался,спасибо FROSTY
Всего: 4