Voici le code php du block, merci de ton aide :
<?php
/**
* pragmaMx Content Management System
* Copyright (c) 2005-2007 pragmaMx Dev Team - http://pragmaMx.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3
* as published by the Free Software Foundation.
*
* $Revision: 1.4 $
* $Author: tora60 $
* $Date: 2008/04/24 19:28:44 $
*
* this file based on:
* Coppermine Photo Gallery
* Copyright (c) 2003-2005 Coppermine Dev Team
* v1.1 originally written by Gregory DEMAR
* required version: >= 1.4.18
*/
defined('mxMainFileLoaded') or die('access denied');
/* //// Beginn Blockkonfiguration ////////////////////////// */
// der Name/Pfad des Gallerymoduls
$cpg_name = 'Gallerie';
// Anzahl der Thumbnails
$limit = 20;
// Länge des Bildtitels unter dem Bild
$title_length = 17;
// Liste der Alben, aus denen keine Bilder angezeigt werden sollen. Die ID's durch Komma trennen.
$exluded_albums = '8,10,11,12,15,16,19,22,20';
/* //// Ende Blockkonfiguration //////////////////////////// */
if (@file_exists('modules/' . $cpg_name . '/blocks.inc.php')) {
include('modules/' . $cpg_name . '/blocks.inc.php');
} else {
if (MX_IS_ADMIN) {
$content = 'The module "' . $cpg_name . '" doesn\'t exist or is not correctly installed. Please install this module or change the Variable $cpg_name in file blocks/' . basename(__file__) . '.';
}
return;
}
// Abfragebedingung für versteckte Alben erstellen
$exluded_albums = preg_split('#\s*,\s*#', trim($exluded_albums));
foreach($exluded_albums as $ex) {
$excluded[] = intval($ex);
}
$exluded_albums = '';
if (isset($excluded)) {
$exluded_albums = ' AND p.aid NOT IN (' . implode(',', $excluded) . ')';
}
$result = sql_query("
SELECT p.pid, p.url_prefix, p.filepath, p.filename, p.aid, p.title
FROM $CONFIG[TABLE_PICTURES] AS p INNER JOIN $CONFIG[TABLE_ALBUMS] AS a ON (p.aid = a.aid)
WHERE p.approved='YES' AND " . $vis_groups . " " . $exluded_albums . "
ORDER BY RAND() DESC
LIMIT $limit");
$output = '';
while ($row = sql_fetch_assoc($result)) {
$row = mxCpgBlocksPrepareData($row);
$output .= '<td align="center" valign="baseline"><a href="modules.php?name=' . $cpg_name . '&act=displayimage&album=random&pos=rnd' . $row["pid"] . '"><img src="' . get_pic_url($row, 'thumb') . '" border="0" alt="' . $row['title'] . '" title="' . $row['title'] . '"/><br />' . mxCutString($row['title'], $title_length) . '</a></td>';
}
// marquee info at http://www.faqs.org/docs/htmltut/_marquee.html
if ($output) {
$content = '<div align="center">
<marquee loop="0" behavior="scroll" direction="left" width="90%" scrollamount="1" scrolldelay="1" onmouseover="this.stop()" onmouseout="this.start()">
<table width="100%" border="0" cellpadding="4" cellspacing="0" align="center">
<tr align="center">'
. $output . '</tr>
</table>
</marquee>
</div>
<p align="center"><a href="modules.php?name=' . $cpg_name . '">' . $CONFIG['gallery_name'] . '</a></p>';
}
?>