PHP Classes
elePHPant
Icontem

File: View/Users/friends.ctp

Recommend this page to a friend!
  Classes of Andraž  >  pingvincek  >  View/Users/friends.ctp  >  Download  
File: View/Users/friends.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,558 bytes
 

 

Contents

Class file image Download
<div class="span-19 last">
    <h1>Prijatelji</h1>
    <p></p>
    <?php

    $i
= 0;
    foreach (
$users as $user):
       
$class = null;
        if (
$i++ % 3 == 0)
        {
           
$class = 'span-5 prepend-1 last"';
        }
        else
        {
           
$class = 'span-5 prepend-1 last"';
        }
   
?>

        <div class="<?php echo $class; ?>">
            <div class="test">
            <?php
           
if (!empty($user['User']['picture']))
            {
                echo
$this->Html->link($this->Html->image('profilePictures/' . $user['User']['picture'], array("class" => "slikaProfil")),
                       
'/users/view/' . $user['User']['id'], array('escape' => false));
            }
            else
            {
                echo
$this->Html->link($this->Html->image('upr.png', array("class" => "slikaProfil")),
                       
'/users/view/' . $user['User']['id'], array('escape' => false));
            }
           
?>

            <p class="imeProfil"><?php echo $user['User']['nickName'] . ", " . $user['User']['yearOld'] . "<br>" . $user['City']['name'] . ", " . $user['0']['countryName']; ?></p>
        </div>
    </div>
    <?php endforeach; ?>
</div>

        <div class="span-19 last">
            <p>
        <?php
           
echo $this->Paginator->prev('<< Prej?nja ', null, null, array('class' => 'disabled'));
            echo
$this->Paginator->numbers();
            echo
$this->Paginator->next(' Naslednja >>', null, null, array('class' => 'disabled'));
       
?>
</p>
</div>