Вход Регистрация
Файл: soc-set/moduls/fermer/inc/popul.php
Строк: 49
<?php

/*Считаем Обеспеченность*/

$r_house=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='house' AND `uid`='".$ank['id']."'");
$r_court=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='court' AND `uid`='".$ank['id']."'");
$r_shed=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='shed' AND `uid`='".$ank['id']."'");
$r_fence=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='fence' AND `uid`='".$ank['id']."'");
$r_door=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='door' AND `uid`='".$ank['id']."'");
$akses=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses' AND `uid`='".$ank['id']."'");
$akses_two=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses_two' AND `uid`='".$ank['id']."'");
$akses_three=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses_three' AND `uid`='".$ank['id']."'");
if(
$shik_house=mysql_fetch_assoc($r_house)){}else{$shik_house['shik']='0';};
if(
$shik_court=mysql_fetch_assoc($r_court)){}else{$shik_court['shik']='0';};
if(
$shik_shed=mysql_fetch_assoc($r_shed)){}else{$shik_shed['shik']='0';};
if(
$shik_fence=mysql_fetch_assoc($r_fence)){}else{$shik_fence['shik']='0';};
if(
$shik_door=mysql_fetch_assoc($r_door)){}else{$shik_door['shik']='0';};
if(
$shik_ak=mysql_fetch_assoc($akses)){}else{$shik_ak['shik']='0';};
if(
$shik_ak_t=mysql_fetch_assoc($akses_two)){}else{$shik_ak_t['shik']='0';};
if(
$shik_ak_th=mysql_fetch_assoc($akses_three)){}else{$shik_ak_th['shik']='0';};

$ank_shikk=$shik_house['shik']+$shik_court['shik']+$shik_shed['shik']+$shik_fence['shik']+$shik_door['shik']+$shik_ak['shik']+$shik_ak_t['shik']+$shik_ak_th['shik'];


/*Считаем Деловитость*/

$r_house=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='house' AND `uid`='".$ank['id']."'");
$r_court=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='court' AND `uid`='".$ank['id']."'");
$r_shed=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='shed' AND `uid`='".$ank['id']."'");
$r_fence=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='fence' AND `uid`='".$ank['id']."'");
$r_door=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='door' AND `uid`='".$ank['id']."'");
$akses=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses' AND `uid`='".$ank['id']."'");
$akses_two=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses_two' AND `uid`='".$ank['id']."'");
$akses_three=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses_three' AND `uid`='".$ank['id']."'");
if(
$del_house=mysql_fetch_assoc($r_house)){}else{$del_house['del']='0';};
if(
$del_court=mysql_fetch_assoc($r_court)){}else{$del_court['del']='0';};
if(
$del_shed=mysql_fetch_assoc($r_shed)){}else{$del_shed['del']='0';};
if(
$del_fence=mysql_fetch_assoc($r_fence)){}else{$del_fence['del']='0';};
if(
$del_door=mysql_fetch_assoc($r_door)){}else{$del_door['del']='0';};
if(
$del_ak=mysql_fetch_assoc($akses)){}else{$del_ak['del']='0';};
if(
$del_ak_t=mysql_fetch_assoc($akses_two)){}else{$del_ak_t['del']='0';};
if(
$del_ak_th=mysql_fetch_assoc($akses_three)){}else{$del_ak_th['del']='0';};

$ank_delov=$del_house['del']+$del_court['del']+$del_shed['del']+$del_fence['del']+$del_door['del']+$del_ak['del']+$del_ak_t['del']+$del_ak_th['del'];


/*Считаем Красоту*/

$r_house=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='house' AND `uid`='".$ank['id']."'");
$r_court=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='court' AND `uid`='".$ank['id']."'");
$r_shed=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='shed' AND `uid`='".$ank['id']."'");
$r_fence=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='fence' AND `uid`='".$ank['id']."'");
$r_door=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='door' AND `uid`='".$ank['id']."'");
$akses=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses' AND `uid`='".$ank['id']."'");
$akses_two=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses_two' AND `uid`='".$ank['id']."'");
$akses_three=mysql_query("SELECT * FROM `k_user_house` WHERE `type`='akses_three' AND `uid`='".$ank['id']."'");
if(
$glam_house=mysql_fetch_assoc($r_house)){}else{$glam_house['glam']='0';};
if(
$glam_court=mysql_fetch_assoc($r_court)){}else{$glam_court['glam']='0';};
if(
$glam_shed=mysql_fetch_assoc($r_shed)){}else{$glam_shed['glam']='0';};
if(
$glam_fence=mysql_fetch_assoc($r_fence)){}else{$glam_fence['glam']='0';};
if(
$glam_door=mysql_fetch_assoc($r_door)){}else{$glam_door['glam']='0';};
if(
$glam_ak=mysql_fetch_assoc($akses)){}else{$glam_ak['glam']='0';};
if(
$glam_ak_t=mysql_fetch_assoc($akses_two)){}else{$glam_ak_t['glam']='0';};
if(
$glam_ak_th=mysql_fetch_assoc($akses_three)){}else{$glam_ak_th['glam']='0';};
$ank_glamur=$glam_house['glam']+$glam_court['glam']+$glam_shed['glam']+$glam_fence['glam']+$glam_door['glam']+$glam_ak['glam']+$glam_ak_t['glam']+$glam_ak_th['glam'];

/*напоследок посчитаем Соц.статус, пригодится Гг */

$socstatus=$ank_shikk+$ank_delov+$ank_glamur;




?>
Онлайн: 2
Реклама