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

Changeset 6151


Ignore:
Timestamp:
Mar 28, 2008, 4:41:45 PM (14 years ago)
Author:
cybaron
Message:

OpenPNE版アルバム機能作成
アルバムの編集 h_album_cover_edit
残:xhtml+css化

Location:
OpenPNE/branches/work/asano/pne_album/webapp/modules/pc
Files:
1 added
7 edited

Legend:

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

    r6142 r6151  
    66
    77/**
    8  * 日記を修正
     8 * アルバムを修正
    99 */
    1010class pc_do_h_album_cover_edit_insert_c_album extends OpenPNE_Action
    1111{
    12     function handleError()
     12    function handleError($errors)
    1313    {
    1414        $_REQUEST['msg1'] = $errors['description'];
     
    2323        // --- リクエスト変数
    2424        $target_c_album_id = $requests['target_c_album_id'];
    25         $c_commu_id = $requests['target_c_commu_id'];
    2625        $subject = $requests['subject'];
    2726        $description = $requests['description'];
    2827        $public_flag = $requests['public_flag'];
    29         $album_pwd = $requests['album_pwd'];
    30         $category = explode(' ', trim($requests['category']));
    3128        $tmpfile_1 = $requests['tmpfile_1'];
     29        //$c_commu_id = $requests['target_c_commu_id'];
     30        //$album_pwd = $requests['album_pwd'];
     31        //$category = explode(' ', trim($requests['category']));
    3232        // ----------
    33        
    3433
    3534        //--- 権限チェック
    3635        //日記作成者
    37 
    3836        $c_album = db_album_get_c_album4c_album_id($target_c_album_id);
    39         $c_album_cover = $c_album['album_cover_image'];
    40        
    41        
    4237        if ($c_album['c_member_id'] != $u) {
    4338            handle_kengen_error();
     
    4540        //---
    4641
    47         $sessid = session_id();
    4842
     43        //OpenPNEのアルバムではカテゴリ機能削除
    4944        //カテゴリ登録しなおし
     45        /*
    5046        db_album_category_delete_c_album_category_album($target_c_album_id);
    5147        foreach($category as $value) {
     
    5955            db_album_category_insert_c_album_category_album($target_c_album_id, $c_category_id);
    6056        }
    61 
     57                */
     58               
    6259        $filename_1  = '';
     60                $c_album_cover = $c_album['album_cover_image'];
    6361
    6462        if ($tmpfile_1) {
    65             image_data_delete($c_album_cover);
     63            //image_data_delete($c_album_cover);
     64            db_album_image_data_delete($c_album_cover);
    6665            $filename_1 = image_insert_c_image_album4tmp("a_{$target_c_album_id}_1", $tmpfile_1);
    6766        }
    6867       
     68        $sessid = session_id();
     69        t_image_clear_tmp($sessid);
    6970
    70         t_image_clear_tmp($sessid);
    71         db_album_update_c_album_cover($target_c_album_id,$c_commu_id,  $filename_1, $subject,$description,$category,$public_flag,$album_pwd);
     71        //アルバムデータの変更
     72        db_album_update_c_album_cover($target_c_album_id, $subject,$description,$filename_1,$public_flag);
    7273
    7374        $p = array('target_c_album_id' => $target_c_album_id);
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/page/h_album_cover_edit.php

    r6136 r6151  
    1313        // --- リクエスト変数
    1414        $target_c_album_id = $requests['target_c_album_id'];
    15         $target_c_album_image_id = $requests['target_c_album_image_id'];
    1615        $subject = $requests['subject'];
    1716        $description = $requests['description'];
    18         $category = $requests['category'];
    1917        $public_flag = $requests['public_flag'];
    20        
     18        //$category = $requests['category'];
     19        //$target_c_album_image_id = $requests['target_c_album_image_id'];
    2120        // ----------
     21
     22        // target のアルバムが存在しない
     23        if (!p_common_is_active_c_album_id($target_c_album_id) && $target_c_album_id != null) {
     24            openpne_redirect('pc', 'page_h_err_fh_album');
     25        }
    2226
    2327        $album = db_album_get_c_album4c_album_id($target_c_album_id);
     
    2630        }
    2731       
    28         if (!(is_null($subject) || is_null($description)||is_null($category)||is_null($public_flag))) {
     32        //if (!(is_null($subject) || is_null($description)||is_null($category)||is_null($public_flag))) {
     33        if (!(is_null($subject) || is_null($description)||is_null($public_flag))) {
    2934            $album['subject'] = $subject;
    3035            $album['description'] = $description;
    31             $album['category'] = $category;
    3236            $album['public_flag'] = $public_flag;
     37            //$album['category'] = $category;
    3338        }
    3439       
    35         $community_name = db_get_commu_name4c_commu_id($album['c_commu_id']);
    36         $this->set('commu_name',$community_name);
     40        //$community_name = db_get_commu_name4c_commu_id($album['c_commu_id']);
     41        //$this->set('commu_name',$community_name);
    3742       
    3843        //get the community list to be selected in h_album_cover_edit
    39         $commu_list = db_album_get_commu_list4c_member_id($u);
    40         $this->set('commu_list',$commu_list);
     44        //$commu_list = db_album_get_commu_list4c_member_id($u);
     45        //$this->set('commu_list',$commu_list);
    4146       
    42 
    43        
    44         $this->set('album',$album);
    45        
    46         $list_set0 = db_album_get_c_album_subject($u);
    47         $this->set("new_album_subject_list", $list_set0);
    48        
    49         // target の日記が存在しない
    50         if (!p_common_is_active_c_album_id($target_c_album_id) && $target_c_album_id != null) {
    51             openpne_redirect('pc', 'page_h_err_fh_album');
    52         }
     47        //$list_set0 = db_album_get_c_album_subject($u);
     48        //$this->set("new_album_subject_list", $list_set0);
    5349
    5450        $this->set('inc_navi', fetch_inc_navi('h'));
     51                $this->set('target_c_album_id',$target_c_album_id);
     52
     53        //アルバムデータ
     54        $this->set('album',$album);
    5555
    5656        //プロフィール
    5757        $this->set("target_member", db_member_c_member4c_member_id($u));
    5858
     59                return 'success';
     60
    5961        //カレンダー関係
    6062        //カレンダー開始用変数
     63        /*
    6164        $time = strtotime($album['r_datetime']);
    6265        $year = date('Y', $time);
     
    7881        //各月の日記
    7982        $this->set("date_list", p_fh_album_list_date_list4c_member_id($u));
    80 
     83                */
     84               
     85                //kazuki OpenPNEのアルバムではカテゴリを使わない
     86        /*
    8187        if (USE_ALBUM_CATEGORY) {
    8288                if ($category) {
     
    96102            $this->set("use_album_category", true);
    97103        }
    98 
    99         return 'success';
     104                */
    100105    }
    101106}
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/page/h_album_cover_edit_confirm.php

    r6139 r6151  
    1010    {
    1111        $_REQUEST['msg'] = array_shift($errors);
    12        
    1312        openpne_forward('pc', 'page', 'h_album_cover_edit', $errors);
    1413        exit;
     
    2524        $public_flag = $requests['public_flag'];
    2625        $c_commu_id = $requests['target_c_commu_id'];
    27         $category = trim($requests['category']);
    28         $album_pwd = $requests['album_pwd'];
     26        //$category = trim($requests['category']);
     27        //$album_pwd = $requests['album_pwd'];
    2928        // ----------
    30 //print "<pre>";
    31 //print_r ($requests);
    32 //print "</pre>";
     29       
     30        //$str_1 = str_split($album_pwd);
    3331
    34         $sessid = session_id();
    35         t_image_clear_tmp($sessid);
    36        
    37         $str_1 = str_split($album_pwd);
    38 
     32        /*
    3933        if($album_pwd){
    4034                if(strlen($album_pwd) <= 8 && strlen($album_pwd) >= 4){
     
    5246                }
    5347        }
    54        
     48        */
     49
     50        $sessid = session_id();
     51        t_image_clear_tmp($sessid);
    5552
    5653        $upfiles = array(
     
    6461            if ($upfile['error'] !== UPLOAD_ERR_NO_FILE) {
    6562                if (!($image = t_check_image($upfile))) {
    66                     $_REQUEST['msg'] = $GLOBALS['ltag']['c_event_add_confirm_image_1'].IMAGE_MAX_FILESIZE.$GLOBALS['ltag']['c_event_add_confirm_use_image'];
     63                    $_REQUEST['msg'] = '画像は'.IMAGE_MAX_FILESIZE.'KB以内のGIF・JPEG・PNGにしてください';
    6764                    openpne_forward('pc', 'page', 'h_album_cover_edit');
    6865                    exit;
     
    7370        }
    7471
    75        
    76 
    7772        $this->set('inc_navi', fetch_inc_navi("h"));
    7873
    7974        //プロフィール
    80         $this->set("member", db_member_c_member4c_member_id($u));
     75        //$this->set("member", db_member_c_member4c_member_id($u));
    8176       
    8277        //get selected community name
    83         $community = db_get_commu_name4c_commu_id($c_commu_id);
    84         $this->set('commu_name',$community);
     78        //$community = db_get_commu_name4c_commu_id($c_commu_id);
     79        //$this->set('commu_name',$community);
    8580
    8681        $form_val = array(
    8782            "target_c_album_id" => $target_c_album_id,
    88             "c_commu_id" => $c_commu_id,
    8983                        "subject"=> $subject,
    9084            "description" => $description,
    91             "category"=>$category,
    92             "public_flag"=>$public_flag,
    93             "album_pwd" => $album_pwd,
     85            "public_flag"=> $public_flag,
    9486            "upfile_1" => $_FILES['upfile_1'],
    9587            "tmpfile_1" => $tmpfiles[1],
     88            //"c_commu_id" => $c_commu_id,
     89            //"category"=>$category,
     90            //"album_pwd" => $album_pwd,
    9691        );
     92
    9793        $this->set("form_val", $form_val);
    98 
    9994        return 'success';
    10095    }
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/templates/h_album_cover_edit.tpl

    r6136 r6151  
    1 ({ext_include file="inc_header.tpl"})
    2 ({ext_include file="inc_layoutcolumn_top_165px.tpl"})
    3 
     1<div id="LayoutC">
     2<div id="Center">
     3
     4<div class="dparts formTable"><div class="parts">
     5<div class="partsHeading"><h3>編集:({$album.subject})</h3></div>
     6({t_form_block _enctype=file m=pc a=page_h_album_cover_edit_confirm})
     7<input type="hidden" name="target_c_album_id" value="({$target_c_album_id})" />
     8<table>
     9<tr>
     10<th>タイトル</th>
     11<td>
     12<input type="text" class="input_text" name="subject" value="({$album.subject})" size="50" />
     13</td>
     14</tr>
     15<tr>
     16<th>アルバム説明</th>
     17<td>
     18<textarea name="description" rows="6" cols="50">({$album.description})</textarea>
     19</td>
     20</tr>
     21<tr>
     22<th>表紙</th>
     23<td>
     24({if $album.album_cover_image})
     25<a href="({t_img_album_url filename=$album.album_cover_image})" target="_blank"><img src="({t_img_album_url filename=$album.album_cover_image w=180 h=180})"></a><br>({else})
     26({/if})
     27<input type="hidden" name="pre_image_filename" value="({$album.album_cover_image})" />
     28<input type="file" class="input_file" name="upfile_1" size="40" />
     29</td>
     30</tr>
     31<tr>
     32<th>公開範囲</th>
     33<td>
     34<ul>
     35<li><input type="radio" class="input_radio" name="public_flag" id="public_flag_public" value="public"({if $album.public_flag == "public"}) checked="checked"({/if}) /><label for="public_flag_public">全員に公開</label></li>
     36<li><input type="radio" class="input_radio" name="public_flag" id="public_flag_friend" value="friend"({if $album.public_flag == "friend"}) checked="checked"({/if}) /><label for="public_flag_friend">({$WORD_MY_FRIEND})まで公開</label></li>
     37<li><input type="radio" class="input_radio" name="public_flag" id="public_flag_private" value="private"({if $album.public_flag == "private"}) checked="checked"({/if}) /><label for="public_flag_private">公開しない</label></li>
     38</ul>
     39</td>
     40</tr>
     41</table>
     42<div class="operation">
     43<ul class="moreInfo button">
     44<li><input type="submit" class="input_submit" value="確認画面" /></li>
     45</ul>
     46</div>
     47({/t_form_block})
     48</div> <!-- parts -->
     49</div> <!-- dparts formTable -->
     50
     51<div class="dparts formTable"><div class="parts">
     52<div class="partsHeading"><h3>アルバムを削除する</h3></div>
     53<div class="partsInfo">
     54<p>アルバムを削除するとこのアルバムに投稿された画像もすべて削除されます。</p>
     55</div>
     56({t_form_block m=pc a=page_h_delete_album})
     57<input type="hidden" name="target_c_album_id" value="({$target_c_album_id})" />
     58<table>
     59<tr><th>日付</th><td>({$album.r_datetime|date_format:"%Y年%m月%d日"})</td></tr>
     60</table>
     61<div class="operation">
     62<ul class="moreInfo button">
     63<li><input type="submit" class="input_submit" value=" 削 除 " /></li>
     64</ul>
     65</div>
     66({/t_form_block})
     67</div></div>
     68
     69
     70</div><!-- Center -->
     71</div><!-- LayoutC -->
     72
     73({***************************
    474<table border="0" cellspacing="0" cellpadding="0" style="width:165px;" >
    575<tr>
     
    82152({/if})
    83153
    84 ({ext_include file="inc_layoutcolumn_middle_165px.tpl"})
    85154
    86155({t_form _enctype=file m=pc a=page_h_album_cover_edit_confirm})
     
    350419-->
    351420</script>
    352 
    353 <!-- delete by openkaku team on 080313
    354 ({ext_include file="inc_layoutcolumn_middle_780px.tpl"})
    355 -->
    356 ({ext_include file="inc_layoutcolumn_bottom_270px_165px_175px_720px.tpl"})
    357 ({ext_include file="inc_footer.tpl"})
     421***************************})
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/templates/h_album_cover_edit_confirm.tpl

    r6139 r6151  
    1 ({ext_include file="inc_header.tpl"})
    2 ({ext_include file="inc_layoutcolumn_top_720px.tpl"})
    3 
     1<div id="LayoutC">
     2<div id="Center">
     3
     4({* {{{ formTable *})
     5<div class="dparts formTable"><div class="parts">
     6<div class="partsHeading"><h3>以下の内容でよろしいですか?</h3></div>
     7<table>
     8<tr>
     9<th>タイトル</th>
     10<td>({$form_val.subject})</td>
     11</tr>
     12<tr>
     13<th>アルバム説明</th>
     14<td>({$form_val.description|nl2br})</td>
     15</tr>
     16<tr>
     17<th>表紙</th>
     18<td>({$form_val.upfile_1.name})</td>
     19</tr>
     20<tr>
     21<th>公開範囲</th>
     22<td>
     23({* #1931 *})({if $form_val.public_flag == "public"})
     24({* #1931 *})全員に公開
     25({* #1931 *})({elseif $form_val.public_flag == "friend"})
     26({* #1931 *})({$WORD_MY_FRIEND})まで公開
     27({* #1931 *})({elseif $form_val.public_flag == "private"})
     28({* #1931 *})公開しない
     29({* #1931 *})({/if})
     30</td>
     31</tr>
     32</table>
     33<div class="operation">
     34<ul class="moreInfo button">
     35<li>
     36({t_form_block m=pc a=do_h_album_cover_edit_insert_c_album})
     37({foreach from=$form_val key=key item=item})
     38<input type="hidden" name="({$key})" value="({$item})">
     39({/foreach})
     40<input type="submit" class="input_submit" value=" 決 定 ">
     41({/t_form_block})
     42</li>
     43<li>
     44({t_form_block m=pc a=page_h_album_cover_edit})
     45({foreach from=$form_val key=key item=item})
     46<input type="hidden" name="({$key})" value="({$item})">
     47({/foreach})
     48<input type="submit" class="input_submit" value=" 修  正 " />
     49({/t_form_block})
     50</li>
     51</ul>
     52</div>
     53</div></div>
     54({* }}} *})
     55
     56</div><!-- Center -->
     57</div><!-- LayoutC -->
     58
     59({****************************
    460<img src="./skin/dummy.gif" class="v_spacer_l">
    561
     
    218274({ext_include file="inc_layoutcolumn_middle_750px.tpl"})
    219275-->
    220 ({ext_include file="inc_layoutcolumn_bottom_270px_165px_175px_720px.tpl"})
    221 ({ext_include file="inc_footer.tpl"})
     276**************************})
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/validate/page/h_album_cover_edit.ini

    r6136 r6151  
    11[target_c_album_id]
    2 type = "int"
    3 required = 0
    4 min = 1
    5 
    6 [target_c_album_image_id]
    72type = "int"
    83required = 0
     
    1510type = "string"
    1611
    17 [category]
    18 type = "string"
    19 
    2012[public_flag]
    2113type = "string"
    22 
  • OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/validate/page/h_album_cover_edit_confirm.ini

    r6139 r6151  
    77[description]
    88type = "string"
    9 required = 0
    10 caption = CAPTION_BODY
    11 
    12 [category]
    13 type = "string"
    149
    1510[public_flag]
    1611type = "string"
    17 required = 1
    18 
    19 [target_c_commu_id]
    20 type = "int"
    21 required = 0
    22 
    23 [album_pwd]
    24 type = "string"
Note: See TracChangeset for help on using the changeset viewer.