Ejemplo n.º 1
0
**/
copy($cat_file_path_large . "/" . $file, $cat_file_path_display . "/" . $file);
$image->load($cat_file_path_display . "/" . $file);
$image->resize(100, 72);
$image->save($cat_file_path_display . "/" . $file);
chmod($cat_file_path_display . "/" . $file, 0755);
copy($cat_file_path_large . "/" . $file, $cat_file_path_thumb . "/" . $file);
$image->load($cat_file_path_thumb . "/" . $file);
$image->resize(185, 123);
$image->save($cat_file_path_thumb . "/" . $file);
chmod($cat_file_path_thumb . "/" . $file, 0755);
$image->load($cat_file_path_large . "/" . $file);
$image->resize(273, 205);
$image->save($cat_file_path_large . "/" . $file);
chmod($cat_file_path_large . "/" . $file, 0755);
$res = ADAO::addProducts($name, $brand, $cat, $qt, $des, $cost, $case, $cat_file_path_display_abs . "/" . $file, $cat_file_path_thumb_abs . "/" . $file, $cat_file_path_large_abs . "/" . $file);
if ($res == 1) {
    ?>
	<script>
	alert("Item Inserted Successfully ");
	window.location.href="home.php";
	</script>
    <?php 
} else {
    ?>
	
	<script>
	alert("Error!!");
	window.location.href="home.php";
	</script>
	<?php