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

source: OpenPNE/branches/ebihara/prj_pnebiz/webapp_biz/modules/admin_biz/do/biz_admin_edit_shisetsu.php @ 557

Last change on this file since 557 was 557, checked in by ebihara, 14 years ago

create prj_pnebiz

File size: 1.3 KB
Line 
1<?php
2/**
3 * @copyright 2005-2006 OpenPNE Project
4 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
5 */
6
7//施設情報修正
8
9class admin_biz_do_biz_admin_edit_shisetsu extends OpenPNE_Action
10{
11    function execute($requests)
12    {
13        if (!$requests['name']) {
14            admin_biz_client_redirect('biz_shisetsu_list', '施設名を入力してください。');
15            exit();
16        }
17
18        if ($requests['image_filename']) {
19            $filename = $requests['image_filename'];
20        } else {
21            $filename = '';
22        }
23
24        if ($_FILES['image_filename']['size']) {
25            $filename = biz_saveImage($_FILES['image_filename'], "s_".$sessid);
26            if (!$filename) {
27                $filename = $requests['image_filename'];
28                admin_biz_client_redirect('biz_shisetsu_list', '画像は300KB以内のGIF・JPEG・PNGにしてください。');
29                exit();
30            }
31
32            //変更前の画像を削除
33            $shisetsu = biz_getShisetsuData($requests['biz_shisetsu_id']);
34            biz_deleteImage($shisetsu['image_filename']);
35        }
36        t_image_clear_tmp(session_id());
37
38
39        biz_editShisetsu($requests['biz_shisetsu_id'], $requests['name'], $filename);
40
41        admin_biz_client_redirect('biz_shisetsu_list', "施設を編集しました。");
42    }
43}
44
45?>
Note: See TracBrowser for help on using the repository browser.