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

Changeset 6232


Ignore:
Timestamp:
Apr 1, 2008, 8:50:21 PM (13 years ago)
Author:
cybaron
Message:

画像の削除画面 h_album_image_delete

Location:
OpenPNE/branches/work/asano/pne_album/webapp/modules/pc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/do/h_album_edit_delete_image.php

    r6217 r6232  
    1414        $c_album_id = $requests['target_c_album_id'];
    1515        $c_album_image_id = $requests['target_c_album_image_id'];
    16         $del_img = $requests['del_img'];
    1716        // ----------
    1817
    1918        //--- 権限チェック
    20         //日記作成者
    21 
    22         $c_album = db_album_get_c_album4id($c_album_id);
    23         //日記を書いた人でないと消せない
    24         if ($c_album[0]['c_member_id'] != $u) {
    25             openpne_redirect('pc', 'page_h_home');
     19        $c_album = db_album_get_c_album4c_album_id($c_album_id);
     20        if ($c_album['c_member_id'] != $u) {
     21            handle_kengen_error();
    2622        }
    27         //---
    2823
    2924        $c_album_image = db_album_image_get_c_album_image4id($c_album_image_id);
    30 //        print "<pre>";
    31 //        echo "THIS IS IN THE DO^^^^^^^^^^^^^^<BR><BR>";
    32 //        print_r ($c_album_image);
    33 //        print "<pre>";
    34         image_data_delete($c_album_image['image_filename']);
     25        db_album_image_data_delete($c_album_image['image_filename']);
    3526        db_album_delete_c_album_image($c_album_image_id);
    3627
    3728        $p = array('target_c_album_id' => $c_album_id);
    38         openpne_redirect('pc', 'page_h_album_edit', $p);
     29        openpne_redirect('pc', 'page_fh_album', $p);
    3930    }
    4031}
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/page/h_album_image_delete_confirm.php

    r6217 r6232  
    1414        $target_c_album_id = $requests['target_c_album_id'];
    1515        $target_c_album_image_id = $requests['target_c_album_image_id'];
    16        
    17        
    1816        // ----------
    1917
    2018        // target が指定されていない
    21         if (!$target_c_album_id) {
     19        if (!$target_c_album_image_id) {
    2220            openpne_redirect('pc', 'page_h_err_fh_album');
    2321        }
    24         // target の日記が存在しない
    25         if (!p_common_is_active_c_album_id($target_c_album_id)) {
     22
     23        // target の画像が存在しない
     24        if (!p_common_is_active_c_album_image_id($target_c_album_image_id)) {
    2625            openpne_redirect('pc', 'page_h_err_fh_album');
    2726        }
     
    2928        $target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id);
    3029        $this->set('target_c_album_image',$target_c_album_image);
    31 //        print "<pre>";
    32 //        print_r ($target_c_album_image);
    33 //        print "</pre>";
     30       
     31        $form_val = array(
     32            "target_c_album_id" => $target_c_album_id,
     33            "target_c_album_image_id" => $target_c_album_image_id,
     34        );
     35        $this->set("form_val",$form_val);
     36       
     37        return 'success';
     38
     39        /*
    3440        $target_album = db_album_get_c_album4id($target_c_album_id);
    3541
     
    6571        //削除するコメントID
    6672        $this->set('target_c_album_comment_id', $target_c_album_comment_id);
    67 
    68         return 'success';
     73        */
    6974    }
    7075}
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/templates/h_album_image_delete_confirm.tpl

    r6217 r6232  
     1<div id="LayoutC">
     2<div id="Center">
     3
     4<div class="dparts formTable">
     5<div class="parts">
     6<div class="partsHeading"><h3>以下の写真を削除しますか?</h3></div>
     7
     8<table>
     9<tr>
     10<td>
     11<img SRC="({t_img_album_url filename=$target_c_album_image.image_filename w=180 h=180})" ALT="photo" VSPACE="4">
     12<br>
     13({$target_c_album_image.image_description|nl2br|default:"&nbsp;"})<br>
     14</td>
     15</tr>
     16</table>
     17
     18<div class="operation">
     19<ul class="moreInfo button">
     20<li>
     21({t_form_block m=pc a=do_h_album_edit_delete_image})
     22({foreach from=$form_val key=key item=item})
     23<input type="hidden" name="({$key})" value="({$item})">
     24({/foreach})
     25<input type="submit" class="input_submit" value=" は い ">
     26({/t_form_block})
     27</li>
     28<li>
     29({t_form_block m=pc a=page_h_album_image_edit})
     30({foreach from=$form_val key=key item=item})
     31<input type="hidden" name="({$key})" value="({$item})">
     32({/foreach})
     33<input type="submit" class="input_submit" value="いいえ" />
     34({/t_form_block})
     35</li>
     36</ul>
     37</div> <!-- operation -->
     38
     39
     40</div> <!-- parts -->
     41</div> <!-- dparts formTable -->
     42
     43</div><!-- Center -->
     44</div><!-- LayoutC -->
     45({**************************
     46
    147({ext_include file="inc_header.tpl"})
    248({ext_include file="inc_layoutcolumn_top_720px.tpl"})
     
    84130({ext_include file="inc_layoutcolumn_bottom_270px_165px_175px_720px.tpl"})
    85131({ext_include file="inc_footer.tpl"})
     132*****************************})
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/templates/h_album_image_edit.tpl

    r6216 r6232  
    88<input type="hidden" name="target_c_album_id" value="({$target_c_album_id})" />
    99<input type="hidden" name="target_c_album_image_id" value="({$target_c_album_image_id})" />
     10<input type="hidden" name="pre_image_filename" value="({$c_album_image.image_filename})" />
    1011<table>
    1112<tr>
     
    1415<a href="({t_img_album_url filename=$c_album_image.image_filename})" target="_blank">
    1516<img src="({t_img_album_url filename=$c_album_image.image_filename w=180 h=180})"></a><br>
    16 <input type="hidden" name="pre_image_filename" value="({$c_album_image.image_filename})" />
    1717<input type="file" class="input_file" name="upfile_1" size="40" />
    1818</td>
     
    3838<div class="dparts formTable"><div class="parts">
    3939<div class="partsHeading"><h3>画像を削除する</h3></div>
    40 ({t_form_block m=pc a=page_h_image_delete_confirm})
     40({t_form_block m=pc a=page_h_album_image_delete_confirm})
     41<input type="hidden" name="target_c_album_id" value="({$target_c_album_id})" />
    4142<input type="hidden" name="target_c_album_image_id" value="({$target_c_album_image_id})" />
    4243<div class="operation">
Note: See TracChangeset for help on using the changeset viewer.