Файл: plugins/user_garem/garem.php
Строк: 34
<?
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_garem` WHERE `id_user` = $ank[id]"),0)==1){
$cms_g=mysql_fetch_assoc(mysql_query("SELECT * FROM `cms_garem` WHERE `id_user` = $ank[id] LIMIT 1"));
$cms_user = get_user($cms_g['id_garem']);
echo "<div class='".($set['web']==true?'main':'nav2')."'><img src='/style/icons/garem_k.gif' alt=''> В гареме у <a href='/id$cms_user[id]'>$cms_user[nick]</a>";
if ($user['id']==$ank['id'] && mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_garem` WHERE `id_user` = $user[id]"),0)==1)
echo " [<a href='/plugins/user_garem/exit/'>Выкупиться</a>]";
echo "</div>";
}
//******************************************************************************
$garem_c = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_garem` WHERE `id_garem`= $ank[id]"),0);
echo "<div class='".($set['web']==true?'main':'nav2')."'><img src='/style/icons/garem.png' alt=''> <a href='/plugins/user_garem/id-$ank[id]/'>Гарем</a> ($garem_c)</div>n";
if (isset($user) && $user['pol'] != $ank['pol'] && mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_garem` WHERE `id_user`= '$ank[id]' AND `id_garem`= '$user[id]'"),0)==0)
echo "<div class='".($set['web']==true?'main':'nav2')."'><img src='/style/icons/garem_k.gif' alt=''> <a href='/plugins/user_garem/id-$ank[id]/kupit/'>Украсть к себе в гарем</a></div>n";
$k_garem = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_garem` WHERE `id_garem` = '$ank[id]'"),0);
if ($k_garem && $set['web']){
$q_g = mysql_query("SELECT `id_user`,`id`,`id_garem`,`time` FROM `cms_garem` WHERE `id_garem` = '$ank[id]' ORDER BY id DESC LIMIT 6");
$r = 0;
?>
<style>
.module_body { padding: 5px; overflow: hidden; }
.fl_l { float: left; }
.module_body .people_cell { width: 68px; overflow: hidden; padding: 6px 0px; text-align: center; }
</style>
<div class="module_body clear_fix main">
<?
while ($post = mysql_fetch_assoc($q_g)){ $r++;
$garem = get_user($post['id_user']);
if ($r == 3)echo '<div class="people_row">';
?>
<div class="fl_l people_cell">
<a class="ava" href="/id<?=$garem['id']?>">
<?=avatar($garem['id'], false, 50, 50);?>
</a>
</div>
<?
if ($r == 3)echo '</div>';
}
?>
</div>
<?
}