if ($mname == 'shop') { updatememberstats(); } //刪除完信息後更新 $opsql = $wheresql = ''; cpmsg('message_success', $cookie_referer); } break; case 'pass': $opsql .= ' grade=\'3\''; break; case 'refuse': $opsql .= ' grade=\'1\''; break; case 'update_album_info': update_album_info($_POST['subject'], $mname, $wheresql); break; case 'album_movecat': album_movecat($itemarr); break; case 'setalbumimg': setalbumimg(); break; case 'passupdate': $check_txt = $_POST['check_txt']; $modelname = $cacheinfo['models']['modelname']; if ($_POST['update'] == 1) { $opcheck = 3; $pmtitle = lang('mod_updatetitle_pass'); foreach ($_POST[item] as $itemid) { $updateser = DB::result_first("SELECT `update` FROM " . tname("itemupdates") . " WHERE itemid='{$itemid}' and type = '{$mname}'");
break; case '.png': @imagepng($thumbnail, $phpbb_root_path . GALLERY_UPLOAD_PATH . $image_filename); break; case '.gif': @imagegif($thumbnail, $phpbb_root_path . GALLERY_UPLOAD_PATH . $image_filename); break; } imagedestroy($thumbnail); } $multi_images[] = array('image_name' => str_replace("_", " ", utf8_substr(utf8_substr($image, strripos($image, '/') + 1), 0, -4)), 'image_filename' => $image_filename, 'image_thumbnail' => '', 'image_desc' => '', 'image_desc_uid' => '', 'image_desc_bitfield' => '', 'image_user_id' => IMAGE_USER_ID, 'image_username' => IMAGE_USERNAME, 'image_user_colour' => IMAGE_USER_COLOUR, 'image_user_ip' => $user->ip, 'image_time' => $time, 'image_album_id' => (int) $albums_tree[$album_path[0]][$album_path[1]][$album_path[2]], 'image_status' => IMAGE_APPROVED, 'filesize_upload' => filesize($phpbb_root_path . GALLERY_UPLOAD_PATH . $image_filename)); } $db->sql_multi_insert(GALLERY_IMAGES_TABLE, $multi_images); $refresh_albums = array_unique($refresh_albums); foreach ($refresh_albums as $album) { update_album_info($album); } if ($results) { meta_refresh(1, append_sid("{$phpbb_root_path}develop/massimport.{$phpEx}", 'time=' . $time)); trigger_error('There are still images left to import, please be patient!'); } else { $sql = 'SELECT COUNT(image_id) images FROM ' . GALLERY_IMAGES_TABLE . ' WHERE image_status = ' . IMAGE_APPROVED; $result = $db->sql_query($sql); $image_counter = $db->sql_fetchfield('images'); $db->sql_freeresult($result); set_config('num_images', $image_counter, true); trigger_error('All images were successful imported, have fun with the new images in the Gallery!'); } function create_new_album($parent_id, $album_name, $album_type)
break; case 'delete': if ($submode == 'delete') { $s_hidden_fields = build_hidden_fields(array('album_id' => $album_id, 'image_id' => $image_id, 'mode' => 'image', 'submode' => 'delete')); if (confirm_box(true)) { handle_image_counter($image_id, false); $sql = 'DELETE FROM ' . GALLERY_COMMENTS_TABLE . "\n\t\t\t\t\t\tWHERE comment_image_id = {$image_id}"; $db->sql_query($sql); $sql = 'DELETE FROM ' . GALLERY_FAVORITES_TABLE . "\n\t\t\t\t\t\tWHERE image_id = {$image_id}"; $db->sql_query($sql); $sql = 'DELETE FROM ' . GALLERY_REPORTS_TABLE . "\n\t\t\t\t\t\tWHERE report_image_id = {$image_id}"; $db->sql_query($sql); $sql = 'DELETE FROM ' . GALLERY_WATCH_TABLE . "\n\t\t\t\t\t\tWHERE image_id = {$image_id}"; $db->sql_query($sql); phpbb_gallery_image_base::delete_images(array($image_id), array($image_id => $image_data['image_filename'])); update_album_info($album_id); $submit = true; $message = $user->lang['DELETED_IMAGE'] . '<br />'; $image_id = false; if ($user->data['user_id'] != $image_data['image_user_id']) { add_log('gallery', $image_data['image_album_id'], $image_id, 'LOG_GALLERY_DELETED', $image_data['image_name']); } } else { if (isset($_POST['cancel'])) { $message = $user->lang['DELETED_IMAGE_NOT'] . '<br />'; $submit = true; } else { confirm_box(false, 'DELETE_IMAGE2', $s_hidden_fields); } } }