Esempio n. 1
0
             }
         }
     }
     $source = $UploadDirectory . '/desktop_' . $NewFileName;
     $sourceIp = $UploadDirectory . '/iphone_' . $NewFileName;
     $source7 = $UploadDirectory . '/7Ins_' . $NewFileName;
     $sourceM = $UploadDirectory . '/mobile_' . $NewFileName;
     copy($img, $source);
     copy($img, $sourceIp);
     copy($img, $source7);
     copy($img, $sourceM);
     // desktop or tablet
     $image->load($source);
     //  7 inches
     $image->load($source7);
     $image->scale(76);
     $image->save($source7, $image->image_type);
     // s4
     $image->load($sourceM);
     $image->scale(44);
     $image->save($sourceM, $image->image_type);
     //mobile
     $image->load($sourceIp);
     $image->scale(35);
     $image->save($sourceIp, $image->image_type);
     $obj = (object) array('dLogo' => $source, 'pLogo' => $sourceIp, 'logo7' => $source7, 'mLogo' => $sourceM);
     echo json_encode($obj);
     mysql_query('UPDATE businessCustom SET logo = ' . "'" . json_encode($obj) . "'" . ' WHERE customPlaceId = ' . $placeId);
 } else {
     die('error uploading File!');
 }