mirror of
https://github.com/claradex/nativegallery.git
synced 2024-11-15 03:31:10 +03:00
fixes
This commit is contained in:
parent
2efc146a7e
commit
51f3d115a1
4 changed files with 4 additions and 4 deletions
|
@ -19,7 +19,7 @@ class Upload
|
||||||
{
|
{
|
||||||
$user = new \App\Models\User(Auth::userid());
|
$user = new \App\Models\User(Auth::userid());
|
||||||
if (NGALLERY['root']['photo']['upload']['premoderation'] === true) {
|
if (NGALLERY['root']['photo']['upload']['premoderation'] === true) {
|
||||||
if ($user->content('premoderation') === true) {
|
if ($user->content('premoderation') === "true") {
|
||||||
$moderated = 1;
|
$moderated = 1;
|
||||||
} else {
|
} else {
|
||||||
$moderated = 0;
|
$moderated = 0;
|
||||||
|
|
|
@ -98,7 +98,7 @@ class Register
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
DB::query('INSERT INTO users VALUES (\'0\', :username, :email, :password, :photourl, 5, 0, :online, 0, :content)', array(':username' => ltrim($username), ':password' => password_hash(ltrim($password), PASSWORD_BCRYPT), ':photourl'=>'/static/img/avatar.png', ':email' => $email, ':content' => $content, ':online'=>time()));
|
DB::query('INSERT INTO users VALUES (\'0\', :username, :email, :password, :photourl, 5, 0, :online, 0, 0, :content)', array(':username' => ltrim($username), ':password' => password_hash(ltrim($password), PASSWORD_BCRYPT), ':photourl'=>'/static/img/avatar.png', ':email' => $email, ':content' => $content, ':online'=>time()));
|
||||||
$cstrong = True;
|
$cstrong = True;
|
||||||
$token = GenerateRandomStr::gen_uuid();
|
$token = GenerateRandomStr::gen_uuid();
|
||||||
$user_id = DB::query('SELECT id FROM users WHERE username=:username', array(':username' => $username))[0]['id'];
|
$user_id = DB::query('SELECT id FROM users WHERE username=:username', array(':username' => $username))[0]['id'];
|
||||||
|
|
|
@ -83,7 +83,7 @@ use \App\Models\User;
|
||||||
<td class="c">
|
<td class="c">
|
||||||
';
|
';
|
||||||
if ($p['moderated'] === 0) {
|
if ($p['moderated'] === 0) {
|
||||||
echo ' <div class="cmt-submit"><a href="/api/admin/images/setvisibility?id='.$p['id'].'&mod=1" id="sbmt">Принять</a></div><div style="font-size: 11px;"><a href="/api/admin/images/setvisibility?id='.$p['id'].'&mod=1" style="background-color:red !important; margin-top: 15px;" type="submit" id="sbmt">Отклонить</a></div>';
|
echo ' <div class="cmt-submit"><a href="/api/admin/images/setvisibility?id='.$p['id'].'&mod=1" id="sbmt">Принять</a></div><div style="font-size: 11px;"><a href="/api/admin/images/setvisibility?id='.$p['id'].'&mod=2" style="background-color:red !important; margin-top: 15px;" type="submit" id="sbmt">Отклонить</a></div>';
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
</td>';
|
</td>';
|
||||||
|
|
|
@ -44,7 +44,7 @@ $user = new User(Auth::userid());
|
||||||
<div id="formtable">
|
<div id="formtable">
|
||||||
<?php
|
<?php
|
||||||
if (NGALLERY['root']['photo']['upload']['premoderation'] === true) {
|
if (NGALLERY['root']['photo']['upload']['premoderation'] === true) {
|
||||||
if ($user->content('premoderation') === true) {
|
if ($user->content('premoderation') === "true") {
|
||||||
echo ' <div style="float:left; border:solid 1px #3b7dc1; padding:6px 10px 7px; margin-bottom:13px; background-color:#0199ff44"><b>Поздравляем, ' . $user->i('username') . '!</b><br>Администрацией ' . NGALLERY['root']['title'] . ' была одобрена возможность прямой загрузки фотографий для Вас.<br>Вы можете моментально загрузить любую фотографию, минуя премодерацию. Enjoy!</div>';
|
echo ' <div style="float:left; border:solid 1px #3b7dc1; padding:6px 10px 7px; margin-bottom:13px; background-color:#0199ff44"><b>Поздравляем, ' . $user->i('username') . '!</b><br>Администрацией ' . NGALLERY['root']['title'] . ' была одобрена возможность прямой загрузки фотографий для Вас.<br>Вы можете моментально загрузить любую фотографию, минуя премодерацию. Enjoy!</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue