File: adminAlbumCommands.inc

package info (click to toggle)
gallery 1.5.4-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 26,712 kB
  • ctags: 6,567
  • sloc: php: 33,824; sh: 446; xml: 96; makefile: 88; perl: 61
file content (52 lines) | stat: -rw-r--r-- 2,404 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
 * Gallery SVN info
 * $Id: adminAlbumCommands.inc 13580 2006-05-02 10:22:26Z jenst $
*/
?>
<!-- Begin adminAlbumCommands -->
<div class="admin"><?php

/* User is allowed to delete the album */
if ($gallery->user->canDeleteAlbum($gallery->album)) {
	echo "\n\t". popup_link("[". gTranslate('core',"delete album") ."]", "delete_album.php?set_albumName={$tmpAlbumName}");
}

/* User is allowed to change the album */
if ($gallery->user->canWriteToAlbum($gallery->album)) {
	echo "\n\t". popup_link("[". gTranslate('core',"move album") ."]", "move_album.php?set_albumName={$tmpAlbumName}&index=$i&reorder=0");
	echo "\n\t". popup_link("[". gTranslate('core',"reorder album") ."]", "move_album.php?set_albumName={$tmpAlbumName}&index=$i&reorder=1");
	echo "\n\t". popup_link("[". gTranslate('core',"rename album") ."]", "rename_album.php?set_albumName={$tmpAlbumName}&index=$i");
}

/* User ist allowed to change album captions */
/* Should this be into the above group ? */
if ($gallery->user->canChangeTextOfAlbum($gallery->album) && !$gallery->session->offline) {
	echo "\n\t". '<a href="'. makeGalleryUrl("captionator.php", array("set_albumName" => $tmpAlbumName)) . '">' . 
		'['. gTranslate('core',"edit captions") . ']</a>';
}

/* User is Admin or Owner */
if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($gallery->album)) {

	/* User is allowed to change Album Permissions */
	echo "\n\t". popup_link("[" . gTranslate('core',"permissions") ."]", "album_permissions.php?set_albumName={$tmpAlbumName}");
	echo "\n\t". popup_link("[" . gTranslate('core',"properties") ."]", "edit_appearance.php?set_albumName={$tmpAlbumName}", 0, true, 500, 600);

	/* User is allowed to view ALL comments */
	if ($gallery->user->canViewComments($gallery->album)
		&& ($gallery->app->comments_enabled == 'yes')
		&& ($gallery->album->lastCommentDate("no") != -1)) {
	    	echo "\n\t". '<a href="'. makeGalleryUrl("view_comments.php", array("set_albumName" => $tmpAlbumName)) . '">' .
			'[' . gTranslate('core',"view&nbsp;comments") . ']</a>';
	}

	/* Watermarking support is enabled and user is allowed to watermark images/albums */
	if (!empty($gallery->app->watermarkDir) && $gallery->album->numPhotos(1)) {
		echo "\n\t". popup_link("[" . gTranslate('core',"watermark&nbsp;album") . "]", "watermark_album.php?set_albumName={$tmpAlbumName}");
	}
}
?>

</div>
<!-- End adminAlbumCommands -->