I have code, where i give date to my controller, and now i have big problem:
<td align="center">
<input class="film_do_usuniecia" title="usuń" type="checkbox" name="film[usun][<?= $sVideo['2'] ?>][<?= $sVideo['3'] ?>]" />
</td>
I take my array with Post:
$aKatalogi = $this->oRequest->getPostParam('film');
if (is_array($aKatalogi['usun'])) {
foreach ($aKatalogi['usun'] as $iKlucz => $sValue) {
if (Tools::IsString($iKlucz, false) && $sValue == 'on') {
$ftpconnection_video->f_delete_rs($iKlucz);
}
}
}
And now is the problem:
How i can get this param: [<?= $sVideo['3']. In this param I have information about file: image or video.
I must checking it becouse if it image I delete it:
$ftpconnection_image->f_delete_rs($iKlucz);
If it is video:
$ftpconnection_video->f_delete_rs($iKlucz);
$iKlucz is a path do file.
$sValue is a value of checkbox ON is pressed.