Ejemplo n.º 1
0
    // image size
    $height = $this->GetParameter('height');
    $width = $this->GetParameter('width');
    if (empty($width)) {
        $width = 1920;
    }
    if (!class_exists('attach')) {
        include 'tools/attach/actions/attach.class.php';
    }
    $att = new attach($this);
    //recuperation des parametres necessaire
    $att->file = $file;
    $att->desc = 'background image ' . $file;
    $att->height = $height;
    $att->width = $width;
    $fullFilename = $att->GetFullFilename();
    //test d'existance du fichier
    if (!file_exists($fullFilename) || $fullFilename == '') {
        $att->showFileNotExits();
        //return;
    }
}
// container class
$class = $this->GetParameter('class');
echo '<div class="background-image' . (!empty($class) ? ' ' . $class : '') . '" style="' . (!empty($bgcolor) ? 'background-color:' . $bgcolor . '; ' : '') . (!empty($height) ? 'height:' . $height . 'px; ' : '') . (isset($fullFilename) ? 'background-image:url(' . $fullFilename . ');' : '') . '">' . "\n" . '<div class="table-center">' . "\n";
$nocontainer = $this->GetParameter('nocontainer');
if (empty($nocontainer)) {
    echo '<div class="container">' . "\n";
} else {
    echo '<div>';
}