ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE/trunk/webapp/modules/pc/do/h_album_edit_delete_image.php @ 6677

Last change on this file since 6677 was 6677, checked in by ogawa, 12 years ago

LICENSEの年号が古くなっていたものを修正

File size: 1.0 KB
Line 
1<?php
2/**
3 * @copyright 2005-2008 OpenPNE Project
4 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
5 */
6
7class pc_do_h_album_edit_delete_image extends OpenPNE_Action
8{
9    function execute($requests)
10    {
11        if (!OPENPNE_USE_ALBUM) {
12            handle_kengen_error();
13        }
14
15        $u = $GLOBALS['AUTH']->uid();
16
17        // --- リクエスト変数
18        $c_album_id = $requests['target_c_album_id'];
19        $c_album_image_id = $requests['target_c_album_image_id'];
20        // ----------
21
22        //--- 権限チェック
23        $c_album = db_album_get_c_album4c_album_id($c_album_id);
24        if ($c_album['c_member_id'] != $u) {
25            handle_kengen_error();
26        }
27
28        $c_album_image = db_album_image_get_c_album_image4id($c_album_image_id);
29        db_album_image_data_delete($c_album_image['image_filename']);
30        db_album_delete_c_album_image($c_album_image_id);
31
32        $p = array('target_c_album_id' => $c_album_id);
33        openpne_redirect('pc', 'page_fh_album', $p);
34    }
35}
36
37?>
Note: See TracBrowser for help on using the repository browser.