Login   Register  
PHP Classes
elePHPant
Icontem

File: punFramework/controllers/avatarGalery.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Piotr Malinski  >  punFramework  >  punFramework/controllers/avatarGalery.php  >  Download  
File: punFramework/controllers/avatarGalery.php
Role: Example script
Content type: text/plain
Description: avatarGalery example - controller
Class: punFramework
MVC framework to extend punBB discussion boards
Author: By
Last change:
Date: 2006-12-26 05:12
Size: 779 bytes
 

Contents

Class file image Download
<?PHP
class avatarGalery extends punController
{
public function 
index()
    {
    
$content '';
    
$avatars avatarGalery::load_model('avatarModels');
    
$users $avatars->get_users_with_avatars();
    IF(isset(
$users[0]))
        {
        foreach(
$users as $res)
            {
            IF(
is_file('img/avatars/'.$res['id'].'.png'))
                {
                
$res['img'] = 'img/avatars/'.$res['id'].'.png';
                }
            elseIF(
is_file('img/avatars/'.$res['id'].'.gif'))
                {
                
$res['img'] = 'img/avatars/'.$res['id'].'.gif';
                }
            elseIF(
is_file('img/avatars/'.$res['id'].'.jpg'))
                {
                
$res['img'] = 'img/avatars/'.$res['id'].'.jpg';
                }
            
$content .= avatarGalery::render_template('Dane użytkownika: '.$res['username'], avatarGalery::load_view('avatar'$res));
            
$content .= '<br />';
            }
        }
    return 
$content;
    }
}