Файл: user/anketa/information.php
Строк: 366
<?php
/* DCMS Special
* Дата последнего редактирования 21.12.2015
* Модифицировал densnet
*/
only_reg();
echo "<div class='collection'>";
echo "<div class='list-group-item'>";
echo "<a href='/user/anketa/?name=$ank[nick]'><i class='material-icons'>chat</i> Общие сведения</a>";
echo "<div class = 'hr'></div>";
if ($ank['ank_surname'] == NULL) {
$ank_surname = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:grey;' href = '?mod=information&ank'>?</a>";
} else {
$ank_surname = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>$ank[ank_surname]</a>";
}
if ($ank['ank_name'] == NULL) {
$ank_name = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:grey;' href = '?mod=information&ank'>?</a>";
} else {
$ank_name = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>$ank[ank_name]</a>";
}
if ($ank['ank_patronymic'] == NULL) {
$ank_patronymic = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:grey;' href = '?mod=information&ank'>?</a>";
} else {
$ank_patronymic = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>$ank[ank_patronymic]</a>";
}
if ($ank['sex'] == 1) {
$sex = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>Мужской</a>";
} elseif ($ank['sex'] == 0) {
$sex = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>Женский</a>";
} else {
$sex = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:grey;' href = '?mod=information&ank'>?</a>";
}
if ($ank['ank_m_r'] == 1) {
$ank['mes'] = 'Января';
} elseif ($ank['ank_m_r'] == 2) {
$ank['mes'] = 'Февраля';
} elseif ($ank['ank_m_r'] == 3) {
$ank['mes'] = 'Марта';
} elseif ($ank['ank_m_r'] == 4) {
$ank['mes'] = 'Апреля';
} elseif ($ank['ank_m_r'] == 5) {
$ank['mes'] = 'Мая';
} elseif ($ank['ank_m_r'] == 6) {
$ank['mes'] = 'Июня';
} elseif ($ank['ank_m_r'] == 7) {
$ank['mes'] = 'Июля';
} elseif ($ank['ank_m_r'] == 8) {
$ank['mes'] = 'Августа';
} elseif ($ank['ank_m_r'] == 9) {
$ank['mes'] = 'Сентября';
} elseif ($ank['ank_m_r'] == 10) {
$ank['mes'] = 'Октября';
} elseif ($ank['ank_m_r'] == 11) {
$ank['mes'] = 'Ноября';
} elseif ($ank['ank_m_r'] == 12) {
$ank['mes'] = 'Декабря';
} else {
$ank['mes'] = '?';
}
if ($ank['ank_d_r'] != NULL && $ank['ank_m_r'] != NULL && $ank['ank_g_r'] != NULL) {
$ank_dr = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>$ank[ank_d_r] $ank[mes] $ank[ank_g_r]</a>";
} else {
$ank_dr = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>$ank[ank_d_r] $ank[mes] $ank[ank_g_r]</a>";
}
if ($ank['ank_g_r'] == NULL) {
$ank['ank_age'] = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:grey;' href = '?mod=information&ank'>?</a>";
} else {
$ank['ank_age'] = date("Y") - $ank['ank_g_r'];
if (date("n") < $ank['ank_m_r']) {
$ank['ank_age'] = $ank['ank_age'] - 1;
} elseif (date("n") == $ank['ank_m_r'] && date("j") < $ank['ank_d_r']) {
$ank['ank_age'] = $ank['ank_age'] - 1;
}
}
if ($ank['welcome'] == NULL) {
$welcome = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:grey;' href = '?mod=information&ank'>?</a>";
} else {
$welcome = "<a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>$ank[welcome]</a>";
}
echo "Статус: $welcome<br />";
echo "<div class = 'hr'></div>";
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$ank[id]' AND `time` > '$time'"), 0) != 0) {
$q = mysql_query("SELECT * FROM `ban` WHERE `id_user` = '$ank[id]' AND `time` > '$time' ORDER BY `time` DESC LIMIT 5");
while ($post = mysql_fetch_assoc($q)) {
echo "Забанен до " . date::time($post['time']) . ": <br />";
echo "Причина: " . toOutput($post['prich']) . "<br />";
}
} else {
$narush = mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$ank[id]'"), 0);
echo "<a href = '/user/ban.php?id=$ank[id]'>Нарушения:</a>" . (($narush == 0) ? " нет" : " $narush");
}
echo "<div class = 'hr'></div>";
echo "Должность на сайте: <a style = 'text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;'>$ank[group_name]</a><br />";
echo "Имя: $ank_name<br />";
echo "Фамилия: $ank_surname<br />";
echo "Отчество: $ank_patronymic<br />";
echo "Пол: $sex<br />";
echo "Дата рождения: $ank_dr<br />";
echo "Возраст: <a style = 'cursor:pointer;text-decoration:underline;color:#069;background-color:transparent;border:0;color:green;' href = '?mod=information&ank'>$ank[ank_age]</a><br />";
echo "</div>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=work'><i class='material-icons'>work</i> Работа и образование</a>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=locations'><i class='material-icons'>location_city</i> Место проживания</a>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=contacts'><i class='material-icons'>contact_phone</i> Контакты и ссылки</a>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=family'><i class='material-icons'>child_friendly</i> Семья и отношения</a>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=events'><i class='material-icons'>event</i> События из жизни</a>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=activity'><i class='material-icons'>important_devices</i> Активность</a>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=character_type'><i class='material-icons'>accessibility</i> Типаж</a>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=hobbies'><i class='material-icons'>pool</i> Интересы и увлечения</a>";
echo "<a class = 'list-group-item' href = '/user/anketa/?name=$ank[nick]&mod=position'><i class='material-icons'>local_library</i> Жизненная позиция</a>";
echo "</div>";