/** * Constructor */ function __construct($servK, $db) { $this->fullPath = $this->dirname . $this->basename; $this->imageURL = sprintf(self::IMAGE_URL, urlencode(str_replace(getFtpImagesRoot(), '', $this->srcname))); $this->db = $db; $this->URL = 'http://' . $_SERVER['HTTP_HOST'] . '/' . sprintf(self::URL_ACCESS_FORMAT, $servK, $this->getUserK(), basename($this->basename, '.flv')); $this->REWURL = 'http://' . $_SERVER['HTTP_HOST'] . '/' . sprintf(self::REWURL_ACCESS_FORMAT, basename($this->basename, '.flv'), $servK, $this->getUserK()); }
<?php if (!isset($_GET['path']) || strlen($_GET['path']) === 0) { return '#'; } require_once 'falcon.php'; $path = getFtpImagesRoot() . urldecode($_GET['path']); header('Content-type: ' . mime_content_type($path)); header('Content-Disposition: attachment; filename="' . basename($path) . '"'); readfile($path);
// Générer la vignette $vignette = new Image(); $vignette->createfromjpg($fileInfo['dirname'] . '/' . $fileInfo['basename'])->setHeight('24')->save(getHttpImagesRoot() . '/' . $fileInfo['basename']); unset($vignette); } catch (Exception $e) { $error = $e->getMessage() . "<br />Détail :<br />" . $e->getTraceAsString(); } } } // Ajouter un accès à un document if ($httpQuery->has('indexForm', 'active')) { $user_key = keygen(); $id_avion = false; $submitName = 'activate_access'; $submitValue = 'Activer'; $description = ''; $categorie_id = ''; $rank = 0; $id_avion_image = 0; $comment = ''; $ids_avion_arr = $db->getAllProducts(); } // Tous les documents présent sur l'espace ftp $allImages = readdir_recursive(getFtpImagesRoot() . '/', array('jpg', 'jpeg', 'png', 'JPG', 'JPEG', 'PNG')); // Toutes les images activés dans la base // Tableau sous la forme [id_image] => full_path; $allDbImages = $db->getAllImagesPath(); // Tous les avions enregistrés dans la base $allProducts = $db->getAllProducts(); // Toutes les catégories de médias enregistrées dans la base $allImagesCategories = $db->getAllImagesCategories();
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Falcon Image</title> <link rel="stylesheet" type="text/css" href="/falconadmin.css" media="all"> <link rel="stylesheet" type="text/css" href="/falconuser.css" media="all"> </head> <body> <div id="main"> <div><img src="/img/logo-dassault-engeneering-horizontal-white4.gif" width="370" height="80" alt="Dassault Falcon - Engineered with passion" /></div> <img src="/imagesrc.php?path=<?php echo str_replace(getFtpImagesRoot(), '', $mediaAccess->getFullPath()); ?> " width="800" alt="<?php echo $mediaAccess->getDescription(); ?> " /> <div id="content"> <a id="download" href="<?php echo $mediaAccess->getImageURL(); ?> " title="Image file download"> <img src="/img/icone_jpg.jpg" width="42" height="42" alt="JPEG file" /><br /> Click here to download the<br /><?php echo $mediaAccess->getMIMEType(); ?> file<br /> </a> <h2>Please, find attached the image file<br /><strong><?php
$current_product = $docAccess->id_avion; $sheet_cnt++; $row_cnt++; } // Aucune image enregistrée pour ce type d'avion if ($docAccess->id_image == NULL) { // Ligne accès $sheet->setCellValue('A' . $row_cnt, 'No Images registered yet'); // Name $sheet->mergeCells('A' . $row_cnt . ':' . numToLetter($theads_cnt) . $row_cnt); $sheet->duplicateStyleArray($style_access_line, 'A' . $row_cnt . ':' . numToLetter($theads_cnt) . $row_cnt); } else { // Ligne accès $sheet->setCellValue('A' . $row_cnt, basename($docAccess->basename, '.jpg')); // Name $sheet->setCellValue('B' . $row_cnt, str_replace(getFtpImagesRoot(), '', $docAccess->srcname)); // Document Name $sheet->setCellValue('C' . $row_cnt, $docAccess->getREWURL()); // Link $sheet->setCellValue('D' . $row_cnt, $docAccess->getFileSize()); // Size $sheet->duplicateStyleArray($style_access_line, 'A' . $row_cnt . ':' . numToLetter($theads_cnt) . $row_cnt); } $sheet_indexes[$sheet_cnt - 1][] = $row_cnt; $i++; $row_cnt++; } $stmt = NULL; unset($stmt); $workbook->setActiveSheetIndex(0); $writer = new PHPExcel_Writer_Excel5($workbook);