File: View/Pictures/index.ctp

Recommend this page to a friend!
  Classes of Andraž  >  pingvincek  >  View/Pictures/index.ctp  >  Download  
File: View/Pictures/index.ctp
Role: Example script
Content type: text/plain
Description: Example script
Class: pingvincek
Manage a site for organizing dates between people
Author: By
Last change:
Date: 2 years ago
Size: 1,875 bytes
 

Contents

Class file image Download
<div class="span-19 last">
    <h1>Slike</h1>
    <p>
        <?php echo $this->Html->link('Nalo?i novo sliko', array('controller' => 'pictures', 'action' => 'add')); ?>
</p>
    <?php
    $i
= 1;
    foreach (
$pictures as $picture):
       
$class = null;
        switch (
$i % 3)
        {
            case
0:
               
$class = 'span-5 prepend-1 last"';
                break;
            case
1:
               
$class = 'span-5 prepend-1"';
                break;
            case
2:
               
$class = 'span-5 prepend-1"';
                break;
            default:
                break;
        }
       
$i++;
       
?>

        <div class="<?php echo $class; ?>">
            <div class="test slika">
                <?php
                    $tmpPicture
= explode('.', $picture['Picture']['picture']);
                    echo
$this->Html->link($this->Html->image($picture['Picture']['directory'] . $tmpPicture[0] . '-s.' . $tmpPicture[1], array("class" => "slikaProfil")), '/img/' . $picture['Picture']['directory'] . $picture['Picture']['picture'], array('escape' => false, 'class' => 'lightbox'));
               
?>

                <p class="imeProfil">
                    <?php
                       
echo $picture['Picture']['description'];
                        echo
'<br><br>';
                        echo
$this->Html->link('Kot profilna slika', array('controller' => 'pictures', 'action' => 'setasprofilepicture', $picture['Picture']['id']));
                        echo
' | ';
                        echo
$this->Html->link('Zbri?i', array('controller' => 'pictures', 'action' => 'delete', $picture['Picture']['id']));
                   
?>
</p>
            </div>
        </div>
    <?php endforeach; ?>
</div>

<script type="text/javascript">
$(function() {
        $('a.lightbox').lightBox();
});
</script>


For more information send a message to info at phpclasses dot org.