Ejemplo n.º 1
0
     $meta_desc = filter_var($_POST['meta-description'], FILTER_SANITIZE_STRING);
 } else {
     $meta_desc = $_POST['description'];
 }
 if ($_POST['meta-keywords'] != '' && !empty($_POST['meta-keywords'])) {
     $meta_keys = filter_var($_POST['meta-keywords'], FILTER_SANITIZE_STRING);
 } else {
     $meta_keys = $name;
 }
 $_update->update_inspiration($name, $name_japan, $description, $japan, $category, $meta_desc, $meta_keys, $inspiration_id);
 /* --- INSPIRATION IMAGE --- */
 $get_max = $_get->get_inspiration_latest_id();
 $max_id = $get_max->latest_inspiration_id;
 $arr_img = $_POST['check_banner'];
 foreach ($arr_img as $arr_img) {
     $count_banner = $_get->count_inspiration_image($inspiration_id, $arr_img);
     $image_name = substr($_FILES['upload_image_' . $arr_img]['name'], 0, -4);
     $image_type = $_FILES['upload_image_' . $arr_img]['type'];
     if ($image_type == 'image/jpeg') {
         $image_type = '.jpg';
     } else {
         if ($image_type == 'image/png') {
             $image_type = '.png';
         } else {
             if ($image_type == 'image/gif') {
                 $image_type = '.gif';
             }
         }
     }
     $uploads_dir = '../files/uploads/gallery/';
     $userfile_name = cleanurl(str_replace(array('(', ')', ' '), '_', $image_name)) . $image_type;