mirror of
https://github.com/openvk/openvk
synced 2025-07-07 00:09:48 +03:00
Merge branch 'master' into l10n-test
This commit is contained in:
commit
106d5fd1b5
14 changed files with 118 additions and 79 deletions
|
@ -303,6 +303,11 @@ class User extends RowModel
|
|||
{
|
||||
return $this->getRecord()->notification_offset;
|
||||
}
|
||||
|
||||
function getBirthday(): int
|
||||
{
|
||||
return $this->getRecord()->birthday;
|
||||
}
|
||||
|
||||
function updateNotificationOffset(): void
|
||||
{
|
||||
|
|
|
@ -79,6 +79,9 @@ final class AuthPresenter extends OpenVKPresenter
|
|||
|
||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
$this->assertCaptchaCheckPassed();
|
||||
|
||||
if(!OPENVK_ROOT_CONF['openvk']['preferences']['registration']['enable'] && !$referer)
|
||||
$this->flashFail("err", "Подозрительная попытка регистрации", "Регистрация отключена системным администратором.");
|
||||
|
||||
if(!$this->ipValid())
|
||||
$this->flashFail("err", "Подозрительная попытка регистрации", "Вы пытались зарегистрироваться из подозрительного места.");
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<div class="link">
|
||||
<a href="/login">вход</a>
|
||||
</div>
|
||||
<div class="link">
|
||||
<div n:if="OPENVK_ROOT_CONF['openvk']['preferences']['registration']['enable']" class="link">
|
||||
<a href="/reg">регистрация</a>
|
||||
</div>
|
||||
<div class="link">
|
||||
|
@ -190,7 +190,7 @@
|
|||
<input type="hidden" name="jReturnTo" value="{$_SERVER['REQUEST_URI']}" />
|
||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input type="submit" value="{_'log_in'}" class="button" style="display: inline-block;" />
|
||||
<a href="/reg" class="button" style="display: inline-block;" >{_registration}</a><br><br>
|
||||
<a n:if="OPENVK_ROOT_CONF['openvk']['preferences']['registration']['enable']" href="/reg" class="button" style="display: inline-block;" >{_registration}</a><br><br>
|
||||
<a href="/restore.pl">Забыли пароль?</a>
|
||||
</form>
|
||||
{/ifset}
|
||||
|
|
|
@ -21,6 +21,6 @@
|
|||
</ul>
|
||||
<center>
|
||||
<a class="button" style="margin-right: 5px;cursor: pointer;" href="/login">{_"log_in"}</a>
|
||||
<a class="button" style="cursor: pointer;" href="/reg">{_"registration"}</a></center>
|
||||
<a n:if="OPENVK_ROOT_CONF['openvk']['preferences']['registration']['enable']" class="button" style="cursor: pointer;" href="/reg">{_"registration"}</a></center>
|
||||
</div>
|
||||
{/block}
|
||||
|
|
|
@ -387,7 +387,7 @@
|
|||
<td class="e">
|
||||
Vladimir Barinov (veselcraft), Alexandra Katunina (jill_senpai), Konstantin Kichulkin (kosfurler),
|
||||
Nikita Volkov (sup_ban), Daniil Myslivets (myslivets), Alexander Kotov (l-lacker),
|
||||
Alexey Assemblerov (BiosNod), Ponywka and Ilya Prokopenko (dsrev)
|
||||
Alexey Assemblerov (BiosNod), Ponywka and Ilya Prokopenko (dsrev), Vladimir Lapskiy (0x7d5)
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -18,77 +18,89 @@
|
|||
{/block}
|
||||
|
||||
{block content}
|
||||
<p n:if="!is_null($referer)" align="center">
|
||||
<strong>{$referer->getFullName()}</strong> приглашает вас в OpenVK!
|
||||
</p>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<table cellspacing="7" cellpadding="0" width="40%" border="0" align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"name"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="first_name" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"surname"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="last_name" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"gender"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
{var femalePreferred = OPENVK_ROOT_CONF["openvk"]["preferences"]["femaleGenderPriority"]}
|
||||
<select name="sex" required>
|
||||
<option n:attr="selected => !$femalePreferred" value="male">{_"male"}</option>
|
||||
<option n:attr="selected => $femalePreferred" value="female">{_"female"}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"email"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="email" name="email" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"password"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="password" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>CAPTCHA: </span>
|
||||
</td>
|
||||
<td>
|
||||
{captcha_template()|noescape}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input type="submit" value="{_'registration'}" class="button" />
|
||||
<a href="/login">{_"log_in"}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['enable'] || $referer}
|
||||
<p n:if="!is_null($referer)" align="center">
|
||||
<strong>{$referer->getFullName()}</strong> приглашает вас в OpenVK!
|
||||
</p>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<table cellspacing="7" cellpadding="0" width="40%" border="0" align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"name"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="first_name" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"surname"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="last_name" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"gender"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
{var femalePreferred = OPENVK_ROOT_CONF["openvk"]["preferences"]["femaleGenderPriority"]}
|
||||
<select name="sex" required>
|
||||
<option n:attr="selected => !$femalePreferred" value="male">{_"male"}</option>
|
||||
<option n:attr="selected => $femalePreferred" value="female">{_"female"}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"email"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="email" name="email" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{_"password"}: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="password" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>CAPTCHA: </span>
|
||||
</td>
|
||||
<td>
|
||||
{captcha_template()|noescape}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input type="submit" value="{_'registration'}" class="button" />
|
||||
<a href="/login">{_"log_in"}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{else}
|
||||
<center>
|
||||
<img src="/assets/packages/static/openvk/img/oof.apng" alt="Регистрация закрыта." style="width: 20%;" />
|
||||
<p>
|
||||
Регистрация отключена системным администратором. При возможности попросите приглашение у вашего знакомого, если он зарегистрирован на этом сайте.
|
||||
{if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['reason']}
|
||||
<br/><br/><b>{php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['reason']}</b>
|
||||
{/if}
|
||||
</p>
|
||||
</center>
|
||||
{/if}
|
||||
{/block}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -2,7 +2,6 @@ services:
|
|||
- openvk\Web\Presenters\AwayPresenter
|
||||
- openvk\Web\Presenters\AboutPresenter
|
||||
- openvk\Web\Presenters\AuthPresenter
|
||||
- openvk\Web\Presenters\AudiosPresenter
|
||||
- openvk\Web\Presenters\UserPresenter
|
||||
- openvk\Web\Presenters\WallPresenter
|
||||
- openvk\Web\Presenters\CommentPresenter
|
||||
|
|
0
install/automated/freebsd-12/install
Executable file → Normal file
0
install/automated/freebsd-12/install
Executable file → Normal file
|
@ -38,6 +38,8 @@
|
|||
"was_online_m" = "was online";
|
||||
/* For male and female */
|
||||
|
||||
"years" = "y.o";
|
||||
|
||||
"was_online_f" = "was online";
|
||||
"all_title" = "All";
|
||||
"information" = "Information";
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
"status" = "Статус";
|
||||
"no_information_provided" = "Информация отсутствует.";
|
||||
"deceased_person" = "Страница покойного человека";
|
||||
"years" = "лет";
|
||||
|
||||
"relationship" = "Семейное положение";
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@ openvk:
|
|||
maxViolations: 50
|
||||
maxViolationsAge: 120
|
||||
autoban: true
|
||||
registration:
|
||||
enable: true
|
||||
reason: "" # reason for disabling registration
|
||||
support:
|
||||
supportName: "Moderator"
|
||||
adminAccount: 1 # Change this ok
|
||||
|
|
Loading…
Reference in a new issue