Cytat(Tyfus @ 11.11.2008, 13:21:33 )

$jakasnazwa=" ";
{
w tej petli sprawdzasz pliki
if ($plik==poprawny)
{
$jakasnazwa=$jakasnazwa. $plik
}
}
tutaj wrzucasz sobie te nazwe razem z id
echo $jakasnazwa
o to chodzi ?
tak to wyglada:
<?php
function carUploadPhoto()
{
$db =& JFactory::getDBO();
//Handle image class
$image = new atompImage();
//path to upload Dir
$uploadPath = JPATH_COMPONENT.DS.'uploads/offers/';
if (JRequest::get( 'post' ))
{
//Files array
$file = JRequest::getVar('image', null, 'files', 'array');
//how many arrays
$sizeofarray = count($file);
//loop arrays
for ($i = 0; $i < $sizeofarray; $i++)
{
//create a new arrays suitable for upload
$newarray[$i] = array('name' => $file['name'][$i], 'type' => $file['type'][$i], 'tmp_name' => $file['tmp_name'][$i], 'error' => $file['error]'][$i], 'size' => $file['size'][$i]);
//if arrays not empty process
if (!empty($newarray[$i]['name'])) {
//SET ALL CLASS METHODS
$image->setFiles($newarray[$i]);
$image->setImagePath($uploadPath);
$image->setMaxImageSize('100000');
$image->setAllowed(array('image/pjpeg','image/gif','image/jpeg','image/JPG','image/jpg'));
if (!$image->check()) {
$this->msg .= $image->getMessage();
break;
} else {
//FILE IMAGE NAME
$data['image'.$i] = $newarray[$i]['name'];
$row_img =& JTable::getInstance('car_ogloszenia_img', 'Table');
if (!$row_img->bind( $data )) { return JError::raiseWarning( 500, $row_img->getError() ); }
if (!$row_img->store()) { JError::raiseError(500, $row_img->getError()); }
//GET INSERTED ID FOR NEW INSERTION
$database =& JFactory::getDBO();
$this->insertedID = $database->insertid();
//SET IMAGE NAME AND UPLOAD
$image->setImageName($this->insertedID .'-'. $newarray[$i]['name'] );
if ($image->upload()) {
$image->setThumbWidth('120');
//CREATE THUMBNAILS
$image->createThumb();
$image->createLightBox();
}
$this->msg .= $image->getMessage();
}
} //EOF if empty
} //EOF for
} //EOF post
}
?>