Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/views/admin/album.php
<script type="text/javascript">
	function remove(id) {
		jConfirm('Czy na pewno chcesz usunać ?', 'Potwierdzenie', function(r) {
		if( r == true ) {
			$.ajax({
					type:"GET",
					url:"/admin/album/delete/"+id,
					cache:false,
					success:function(rsponse)
					{
						
							jAlert('Album został usunięty!', 'Podsumowanie', function() {
								location.href = '/admin/album';
							});
										
						
					}
					});
			}
		});
	}		
</script>

	<div id="page">
		
		<!--  start message-blue -->
			<?php if (isset($message_ok)):?>
			<div id="message-blue">
					<table border="0" width="100%" cellpadding="0" cellspacing="0">
						<tr>
							<td class="blue-left"><?php echo $message_ok; ?>  </td>
							<td class="blue-right"><a class="close-blue"><?php echo HTML::image('static/images/table/icon_close_blue.gif');?></a></td>
						</tr>
					</table>
				</div>
			<!--  end message-blue -->
			<?php endif;?>	
			<!--  start message-red -->
			<?php if (isset($message)):?>
			<div id="message-red">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td class="red-left">
							<?php echo $message;?>
						</td>
						<td class="red-right"><a class="close-red"><?php echo HTML::image('static_back/images/table/icon_close_red.gif');?></a></td>
					</tr>
				</table>
			</div>
			<?php endif;?>
		
			<div id="content">

				<div class="main">
				
					<div class="full_w">
				<div class="h_title">Zarządzaj</div>
				<h2>Albumy</h2>
				
				
				<div class="entry">
					<div class="sep"></div>
				</div>
					
					<table>
					<thead>
						<tr>
							<th scope="col">ID</th>
							<th scope="col">Tytuł</th>
					
							<th scope="col" style="width: 65px;">Zmień</th>
						</tr>
					</thead>
						
					<tbody>
					
					<?php $n=0; foreach( $albums as $album ) : $n++; ?>
					<?php 
						$title = "<em>".$album->title."</em>"; 	
					?>
					
					
						<tr>
							<td class="title"><a href="/profile/album/image/<?php echo $album->user->id; ?>/<?php echo $album->id; ?>" style="color: inherit;"><?php echo $title; ?></a></td><td width="300">[<?php echo Model_User_Album::getCount($album->id, $album->user->id); ?>] zdjęć   </td><td><a href="/admin/album/edit/<?php echo $album->id; ?>"><img src="./static/images/edit.png" alt="Edytuj" title="Edytuj"/></a> <a href="/admin/album/image/<?php echo $album->id; ?>"><img src="./static/images/add.jpg" alt="Dodaj zdjęcia" title="Dodaj zdjęcia"/></a> <a href="#" onclick="remove('<?php echo $album->id; ?>'); return false;" class="confirm_button"><img src="./static/images/medialni_402.jpg" alt="Usuń" title="Usuń"/></a></td>
						</tr>
						
					
					
					<?php endforeach; ?>
					</tbody>
				</table>
				<div class="entry">
					<br style="clear: both;"/>
					<a class="button add" href="/admin/album/edit" >Dodaj</a>
				</div>	
					</div>
				
				</div>
				
				

			</div>
			
		</div>