Exemple #1
0
 public static function createUrl($preset, $filename)
 {
     return Yii::app()->image->createUrl($preset, Amo::repositoryPath() . '/' . $filename);
 }
echo $height;
?>
px;">
        <?php 
if (count($files)) {
    ?>
            <?php 
    for ($i = 0; $i < count($files); $i++) {
        $file = $files[$i];
        ?>
                <a href="<?php 
        echo Yii::app()->getController()->createUrl('vehicle/show', array('id' => $model->vid));
        ?>
" class="fancybox">
                    <img width="100%" src="<?php 
        echo Yii::app()->image->createUrl("thumbs", Amo::repositoryPath() . '/' . $file->filename);
        ?>
" alt=""/>
                </a>
            <?php 
        break;
        // !!!!*************************!!!!!!!!
        ?>
            <?php 
    }
    ?>
        <?php 
} else {
    ?>
            <a href="<?php 
    echo Yii::app()->getController()->createUrl('vehicle/show', array('id' => $model->vid));