$blocks = '5';
echo '<div class="block" style="max-width: ' . round(100 / $blocks) . '%">block</div>';
обьявляете переменную $blocks и выводите блоки.
$blocks = '5';
echo '<div class="block" style="max-width: ' . round(100 / $blocks) . '%">block</div>';
////////панель оповещаний
////////////////////// Новые письма (mail4you by seg0ro и сергафан) ///////////////////////
echo '<div class="content">';
if ($user_id) {
$in_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `mail` WHERE `to_id`='".$user_id."' AND `read`!='1' "), 0);
if ($in_new > 0) { $kol-opov=kol-opov + 1;
if($kol-opov==1){
echo '<a href="'.$home.'/mail/?act=new"><div class="block1" style="width:'.$razmer.'">' . $home . '/theme/' . $set_user['skin'] . '/images/sms.png" alt=""/> + test</div></a>';
}
}
}
//////
if ($headmod != "pradd" && $user_id) {
$countnew = mysql_result(mysql_query("SELECT COUNT(*) FROM `privat` WHERE `user` = '$login' AND `type` = 'in' AND `chit` = 'no'"), 0);
if ($countnew > 0) { $kol-opov=kol-opov + 1;
elseif($kol-opov=2){
echo '<a href="'.$home.'/mail/?act=new"><div class="block1" style="width:'.$razmer.'">' . $home . '/theme/' . $set_user['skin'] . '/images/sms.png" alt=""/> + test</div></a>';
echo '<a href="'.$home.'/str/pradd.php?act=in&new"><div class="block1" style="width:'.$razmer.'">' . $home . '/theme/' . $set_user['skin'] . '/images/sms.png" alt=""/> + test</div></a>';
}
}
}
////////
$total_forum = forum_new();
if ($total_forum > 0) $kol-opov=kol-opov + 1;
elseif($kol-opov=3){
echo '<a href="'.$home.'/mail/?act=new"><div class="block1" style="width:'.$razmer.'">' . $home . '/theme/' . $set_user['skin'] . '/images/sms.png" alt=""/> + test</div></a>';
echo '<a href="'.$home.'/str/pradd.php?act=in&new"><div class="block1" style="width:'.$razmer.'">' . $home . '/theme/' . $set_user['skin'] . '/images/sms.png" alt=""/> + test</div></a>';
echo '<a href="'.$home.'/forum/index.php?act=new"><div class="block1" style="width:'.$razmer.'">' . $home . '/theme/' . $set_user['skin'] . '/images/sms.png" alt=""/> + test</div></a>';
}
echo '</div>';
///////////////////////////////////////////////////////////////////////////////////////
~XeOn~ (12.11.2011/14:53)ага спс точно без доллора да писать?
Dagestan_ец, if ($total_forum > 0) $kol-opov=$kol-opov + 1;
elseif($kol-opov=3){