Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

admin /categories.php


Recommended Posts

First of: Is there any contribution that checks the inputs?


I have tried this without succes:


After these lines:


	    <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
	    <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>


I added:


//begin check the image file...
   if (exif_imagetype( 'products_image' ) == false ) {
   $image_error = DIR_FS_CATALOG_IMAGES . 'default/image_error_large_1.jpg';
   $alterror = 'Error';

  $img_details = getimagesize($image_error);
  list($imgwidth, $imgheight) = $img_details;
<tr><td><div id="alert"><img src="<?php echo $image_error;?>"
alt="<?php echo $alterror;?>" width="<?php echo $imgwidth;?>" height="<?php echo $imgheight;?>"
<script type="text/javascript">onerror="alert('Exif: The image could not be loaded.')" </script>>
<input type="button" value=" OK " onclick="document.getElementById('alert').style.display = 'none'">
//end check the image file...


Of course I have the styles and the javascript function.


But nothing happens, I can still upload any file as an image file... :(


Please, I do need som advice.



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...