mirror of
https://github.com/standardebooks/web.git
synced 2025-07-19 12:54:48 -04:00
Add placeholders for ebooks
This commit is contained in:
parent
cf5f488cae
commit
1ab95df084
52 changed files with 1192 additions and 237 deletions
|
@ -15,6 +15,7 @@ class Benefits{
|
|||
public bool $CanReviewArtwork = false;
|
||||
public bool $CanReviewOwnArtwork = false;
|
||||
public bool $CanEditUsers = false;
|
||||
public bool $CanCreateEbookPlaceholders = false;
|
||||
|
||||
protected bool $_HasBenefits;
|
||||
|
||||
|
@ -27,6 +28,8 @@ class Benefits{
|
|||
$this->CanReviewOwnArtwork
|
||||
||
|
||||
$this->CanEditUsers
|
||||
||
|
||||
$this->CanCreateEbookPlaceholders
|
||||
){
|
||||
return true;
|
||||
}
|
||||
|
@ -58,18 +61,18 @@ class Benefits{
|
|||
|
||||
public function Create(): void{
|
||||
Db::Query('
|
||||
INSERT into Benefits (UserId, CanAccessFeeds, CanVote, CanBulkDownload, CanUploadArtwork, CanReviewArtwork, CanReviewOwnArtwork, CanEditUsers)
|
||||
values (?, ?, ?, ?, ?, ?, ?, ?)
|
||||
', [$this->UserId, $this->CanAccessFeeds, $this->CanVote, $this->CanBulkDownload, $this->CanUploadArtwork, $this->CanReviewArtwork, $this->CanReviewOwnArtwork, $this->CanEditUsers]);
|
||||
INSERT into Benefits (UserId, CanAccessFeeds, CanVote, CanBulkDownload, CanUploadArtwork, CanReviewArtwork, CanReviewOwnArtwork, CanEditUsers, CanCreateEbookPlaceholders)
|
||||
values (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
', [$this->UserId, $this->CanAccessFeeds, $this->CanVote, $this->CanBulkDownload, $this->CanUploadArtwork, $this->CanReviewArtwork, $this->CanReviewOwnArtwork, $this->CanEditUsers, $this->CanCreateEbookPlaceholders]);
|
||||
}
|
||||
|
||||
public function Save(): void{
|
||||
Db::Query('
|
||||
UPDATE Benefits
|
||||
set CanAccessFeeds = ?, CanVote = ?, CanBulkDownload = ?, CanUploadArtwork = ?, CanReviewArtwork = ?, CanReviewOwnArtwork = ?, CanEditUsers = ?
|
||||
set CanAccessFeeds = ?, CanVote = ?, CanBulkDownload = ?, CanUploadArtwork = ?, CanReviewArtwork = ?, CanReviewOwnArtwork = ?, CanEditUsers = ?, CanCreateEbookPlaceholders = ?
|
||||
where
|
||||
UserId = ?
|
||||
', [$this->CanAccessFeeds, $this->CanVote, $this->CanBulkDownload, $this->CanUploadArtwork, $this->CanReviewArtwork, $this->CanReviewOwnArtwork, $this->CanEditUsers, $this->UserId]);
|
||||
', [$this->CanAccessFeeds, $this->CanVote, $this->CanBulkDownload, $this->CanUploadArtwork, $this->CanReviewArtwork, $this->CanReviewOwnArtwork, $this->CanEditUsers, $this->CanCreateEbookPlaceholders, $this->UserId]);
|
||||
}
|
||||
|
||||
public function FillFromHttpPost(): void{
|
||||
|
@ -80,5 +83,6 @@ class Benefits{
|
|||
$this->PropertyFromHttp('CanReviewArtwork');
|
||||
$this->PropertyFromHttp('CanReviewOwnArtwork');
|
||||
$this->PropertyFromHttp('CanEditUsers');
|
||||
$this->PropertyFromHttp('CanCreateEbookPlaceholders');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue