mirror of
https://github.com/openvk/openvk
synced 2024-11-13 10:39:24 +03:00
Profile: Added birthday
This commit is contained in:
parent
af6849edcc
commit
bbf113bfd5
6 changed files with 23 additions and 1 deletions
|
@ -303,6 +303,11 @@ class User extends RowModel
|
|||
{
|
||||
return $this->getRecord()->notification_offset;
|
||||
}
|
||||
|
||||
function getBirthday(): int
|
||||
{
|
||||
return $this->getRecord()->birthday;
|
||||
}
|
||||
|
||||
function updateNotificationOffset(): void
|
||||
{
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
"status" = "Статус";
|
||||
"no_information_provided" = "Информация отсутствует.";
|
||||
"deceased_person" = "Страница покойного человека";
|
||||
"years" = "лет";
|
||||
|
||||
"relationship" = "Семейное положение";
|
||||
|
||||
|
|
Loading…
Reference in a new issue