Profile: Added birthday

This commit is contained in:
0x7d5 2021-09-13 21:34:02 +05:00
parent af6849edcc
commit bbf113bfd5
6 changed files with 23 additions and 1 deletions

View file

@ -303,6 +303,11 @@ class User extends RowModel
{
return $this->getRecord()->notification_offset;
}
function getBirthday(): int
{
return $this->getRecord()->birthday;
}
function updateNotificationOffset(): void
{

View file

@ -102,7 +102,9 @@ final class UserPresenter extends OpenVKPresenter
$user->setLast_Name(empty($this->postParam("last_name")) ? "" : $this->postParam("last_name"));
$user->setPseudo(empty($this->postParam("pseudo")) ? NULL : $this->postParam("pseudo"));
$user->setStatus(empty($this->postParam("status")) ? NULL : $this->postParam("status"));
if (strtotime($this->postParam("birthday")) > 10)
$user->setBirthday(strtotime($this->postParam("birthday")));
if ($this->postParam("marialstatus") <= 8 && $this->postParam("marialstatus") >= 0)
$user->setMarital_Status($this->postParam("marialstatus"));

View file

@ -130,6 +130,14 @@
</select>
</td>
</tr>
<tr>
<td width="120" valign="top">
<span class="nobold">День рождения: </span>
</td>
<td>
<input name="birthday" value={gmdate("Y-m-d", $user->getBirthday())} type="date"/>
</td>
</tr>
<tr>
<td>

View file

@ -357,6 +357,10 @@
<td class="label"><span class="nobold">{_"politViews"}:</span></td>
<td class="data">{var $pviews = $user->getPoliticalViews()}{_"politViews_$pviews"}</td>
</tr>
<tr>
<td class="label"><span class="nobold">{_"birth_date"}:</span></td>
<td class="data">{date('d F Y',$user->getBirthday())}, {date('Y') - date('Y', $user->getBirthday())} {_"years"}</td>
</tr>
</tbody>
</table>
</div>

View file

@ -36,6 +36,8 @@
"online" = "Online";
"was_online" = "was online";
"was_online_m" = "was online";
"years" = "y.o";
%{ For male and female %}
"was_online_f" = "was online";

View file

@ -43,6 +43,7 @@
"status" = "Статус";
"no_information_provided" = "Информация отсутствует.";
"deceased_person" = "Страница покойного человека";
"years" = "лет";
"relationship" = "Семейное положение";