@@ -9,10 +9,9 @@ |
||
9 | 9 | |
10 | 10 | defined('PH7') or exit('Restricted access'); |
11 | 11 | |
12 | -use |
|
13 | -PH7\Framework\Layout\Html\Design, |
|
14 | -PH7\Framework\Mvc\Router\Uri, |
|
15 | -PH7\Framework\Url\Header; |
|
12 | +use PH7\Framework\Layout\Html\Design; |
|
13 | +use PH7\Framework\Mvc\Router\Uri; |
|
14 | +use PH7\Framework\Url\Header; |
|
16 | 15 | |
17 | 16 | class Permission extends PermissionCore |
18 | 17 | { |
@@ -9,10 +9,9 @@ |
||
9 | 9 | */ |
10 | 10 | namespace PH7; |
11 | 11 | |
12 | -use |
|
13 | -PH7\Framework\Navigation\Page, |
|
14 | -PH7\Framework\Url\Header, |
|
15 | -PH7\Framework\Mvc\Router\Uri; |
|
12 | +use PH7\Framework\Navigation\Page; |
|
13 | +use PH7\Framework\Url\Header; |
|
14 | +use PH7\Framework\Mvc\Router\Uri; |
|
16 | 15 | |
17 | 16 | class AdminController extends Controller |
18 | 17 | { |
@@ -7,13 +7,12 @@ |
||
7 | 7 | */ |
8 | 8 | namespace PH7; |
9 | 9 | |
10 | -use |
|
11 | -PH7\Framework\Str\Str, |
|
12 | -PH7\Framework\Session\Session, |
|
13 | -PH7\Framework\Security\CSRF\Token, |
|
14 | -PH7\Framework\Mvc\Request\Http, |
|
15 | -PH7\Framework\Mvc\Router\Uri, |
|
16 | -PH7\Framework\Url\Header; |
|
10 | +use PH7\Framework\Str\Str; |
|
11 | +use PH7\Framework\Session\Session; |
|
12 | +use PH7\Framework\Security\CSRF\Token; |
|
13 | +use PH7\Framework\Mvc\Request\Http; |
|
14 | +use PH7\Framework\Mvc\Router\Uri; |
|
15 | +use PH7\Framework\Url\Header; |
|
17 | 16 | |
18 | 17 | class EditNoteForm |
19 | 18 | { |
@@ -7,11 +7,10 @@ |
||
7 | 7 | */ |
8 | 8 | namespace PH7; |
9 | 9 | |
10 | -use |
|
11 | -PH7\Framework\Config\Config, |
|
12 | -PH7\Framework\Session\Session, |
|
13 | -PH7\Framework\Mvc\Request\Http, |
|
14 | -PH7\Framework\Mvc\Router\Uri; |
|
10 | +use PH7\Framework\Config\Config; |
|
11 | +use PH7\Framework\Session\Session; |
|
12 | +use PH7\Framework\Mvc\Request\Http; |
|
13 | +use PH7\Framework\Mvc\Router\Uri; |
|
15 | 14 | |
16 | 15 | class PictureForm |
17 | 16 | { |
@@ -8,14 +8,13 @@ |
||
8 | 8 | namespace PH7; |
9 | 9 | defined('PH7') or exit('Restricted access'); |
10 | 10 | |
11 | -use |
|
12 | -PH7\Framework\Mvc\Model\Engine\Db, |
|
13 | -PH7\Framework\Image\Image, |
|
14 | -PH7\Framework\Security\Moderation\Filter, |
|
15 | -PH7\Framework\Util\Various, |
|
16 | -PH7\Framework\Mvc\Model\DbConfig, |
|
17 | -PH7\Framework\Mvc\Router\Uri, |
|
18 | -PH7\Framework\Url\Header; |
|
11 | +use PH7\Framework\Mvc\Model\Engine\Db; |
|
12 | +use PH7\Framework\Image\Image; |
|
13 | +use PH7\Framework\Security\Moderation\Filter; |
|
14 | +use PH7\Framework\Util\Various; |
|
15 | +use PH7\Framework\Mvc\Model\DbConfig; |
|
16 | +use PH7\Framework\Mvc\Router\Uri; |
|
17 | +use PH7\Framework\Url\Header; |
|
19 | 18 | |
20 | 19 | class AlbumFormProcess extends Form |
21 | 20 | { |
@@ -11,13 +11,12 @@ |
||
11 | 11 | namespace PH7; |
12 | 12 | defined('PH7') or exit('Restricted access'); |
13 | 13 | |
14 | -use |
|
15 | -PH7\Framework\Image\Image, |
|
16 | -PH7\Framework\Security\Moderation\Filter, |
|
17 | -PH7\Framework\Util\Various, |
|
18 | -PH7\Framework\Mvc\Model\DbConfig, |
|
19 | -PH7\Framework\Mvc\Router\Uri, |
|
20 | -PH7\Framework\Url\Header; |
|
14 | +use PH7\Framework\Image\Image; |
|
15 | +use PH7\Framework\Security\Moderation\Filter; |
|
16 | +use PH7\Framework\Util\Various; |
|
17 | +use PH7\Framework\Mvc\Model\DbConfig; |
|
18 | +use PH7\Framework\Mvc\Router\Uri; |
|
19 | +use PH7\Framework\Url\Header; |
|
21 | 20 | |
22 | 21 | class PictureFormProcess extends Form |
23 | 22 | { |
@@ -12,6 +12,11 @@ discard block |
||
12 | 12 | class PictureModel extends PictureCoreModel |
13 | 13 | { |
14 | 14 | |
15 | + /** |
|
16 | + * @param string $iProfileId |
|
17 | + * @param string $sThumb |
|
18 | + * @param string $sCreatedDate |
|
19 | + */ |
|
15 | 20 | public function addAlbum($iProfileId, $sTitle, $sDescription, $sThumb, $sCreatedDate, $iApproved = 1) |
16 | 21 | { |
17 | 22 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('AlbumsPictures') . '(profileId, name, description, thumb, createdDate, approved) |
@@ -26,6 +31,12 @@ discard block |
||
26 | 31 | return $rStmt->execute(); |
27 | 32 | } |
28 | 33 | |
34 | + /** |
|
35 | + * @param string $iProfileId |
|
36 | + * @param integer $iAlbumId |
|
37 | + * @param string $sFile |
|
38 | + * @param string $sCreatedDate |
|
39 | + */ |
|
29 | 40 | public function addPhoto($iProfileId, $iAlbumId, $sTitle, $sDescription, $sFile, $sCreatedDate, $iApproved = 1) |
30 | 41 | { |
31 | 42 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('Pictures') . '(profileId, albumId, title, description, file, createdDate, approved) |
@@ -49,6 +60,9 @@ discard block |
||
49 | 60 | return $rStmt->execute(); |
50 | 61 | } |
51 | 62 | |
63 | + /** |
|
64 | + * @param string $iProfileId |
|
65 | + */ |
|
52 | 66 | public function getAlbumsName($iProfileId) |
53 | 67 | { |
54 | 68 | $this->cache->start(self::CACHE_GROUP, 'albumName' . $iProfileId, static::CACHE_TIME); |
@@ -66,6 +80,13 @@ discard block |
||
66 | 80 | return $oData; |
67 | 81 | } |
68 | 82 | |
83 | + /** |
|
84 | + * @param string $iProfileId |
|
85 | + * @param string $iAlbumId |
|
86 | + * @param string $iPictureId |
|
87 | + * @param integer $iOffset |
|
88 | + * @param integer $iLimit |
|
89 | + */ |
|
69 | 90 | public function photo($iProfileId, $iAlbumId, $iPictureId = null, $iApproved = 1, $iOffset, $iLimit) |
70 | 91 | { |
71 | 92 | $this->cache->start(self::CACHE_GROUP, 'photo' . $iProfileId . $iAlbumId . $iPictureId . $iApproved . $iOffset . $iLimit, static::CACHE_TIME); |
@@ -132,6 +153,11 @@ discard block |
||
132 | 153 | return $iData; |
133 | 154 | } |
134 | 155 | |
156 | + /** |
|
157 | + * @param string $iProfileId |
|
158 | + * @param integer $iAlbumId |
|
159 | + * @param string $sUpdatedDate |
|
160 | + */ |
|
135 | 161 | public function updateAlbum($iProfileId, $iAlbumId, $sTitle, $sDescription, $sUpdatedDate) |
136 | 162 | { |
137 | 163 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('AlbumsPictures') . |
@@ -145,6 +171,12 @@ discard block |
||
145 | 171 | return $rStmt->execute(); |
146 | 172 | } |
147 | 173 | |
174 | + /** |
|
175 | + * @param string $iProfileId |
|
176 | + * @param integer $iAlbumId |
|
177 | + * @param integer $iPictureId |
|
178 | + * @param string $sUpdatedDate |
|
179 | + */ |
|
148 | 180 | public function updatePhoto($iProfileId, $iAlbumId, $iPictureId, $sTitle, $sDescription, $sUpdatedDate) |
149 | 181 | { |
150 | 182 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('Pictures') . |
@@ -9,10 +9,9 @@ |
||
9 | 9 | */ |
10 | 10 | namespace PH7; |
11 | 11 | |
12 | -use |
|
13 | -PH7\Framework\Navigation\Page, |
|
14 | -PH7\Framework\Url\Header, |
|
15 | -PH7\Framework\Mvc\Router\Uri; |
|
12 | +use PH7\Framework\Navigation\Page; |
|
13 | +use PH7\Framework\Url\Header; |
|
14 | +use PH7\Framework\Mvc\Router\Uri; |
|
16 | 15 | |
17 | 16 | class AdminController extends Controller |
18 | 17 | { |
@@ -8,10 +8,9 @@ |
||
8 | 8 | |
9 | 9 | namespace PH7; |
10 | 10 | |
11 | -use |
|
12 | -PH7\Framework\Url\Header, |
|
13 | -PH7\Framework\Parse\Url, |
|
14 | -RobThree\Auth\TwoFactorAuth as Authenticator; |
|
11 | +use PH7\Framework\Url\Header; |
|
12 | +use PH7\Framework\Parse\Url; |
|
13 | +use RobThree\Auth\TwoFactorAuth as Authenticator; |
|
15 | 14 | |
16 | 15 | class MainController extends Controller |
17 | 16 | { |