Changeset 6151
- Timestamp:
- Mar 28, 2008, 4:41:45 PM (14 years ago)
- 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 6 6 7 7 /** 8 * 日記を修正8 * アルバムを修正 9 9 */ 10 10 class pc_do_h_album_cover_edit_insert_c_album extends OpenPNE_Action 11 11 { 12 function handleError( )12 function handleError($errors) 13 13 { 14 14 $_REQUEST['msg1'] = $errors['description']; … … 23 23 // --- リクエスト変数 24 24 $target_c_album_id = $requests['target_c_album_id']; 25 $c_commu_id = $requests['target_c_commu_id'];26 25 $subject = $requests['subject']; 27 26 $description = $requests['description']; 28 27 $public_flag = $requests['public_flag']; 29 $album_pwd = $requests['album_pwd'];30 $category = explode(' ', trim($requests['category']));31 28 $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'])); 32 32 // ---------- 33 34 33 35 34 //--- 権限チェック 36 35 //日記作成者 37 38 36 $c_album = db_album_get_c_album4c_album_id($target_c_album_id); 39 $c_album_cover = $c_album['album_cover_image'];40 41 42 37 if ($c_album['c_member_id'] != $u) { 43 38 handle_kengen_error(); … … 45 40 //--- 46 41 47 $sessid = session_id();48 42 43 //OpenPNEのアルバムではカテゴリ機能削除 49 44 //カテゴリ登録しなおし 45 /* 50 46 db_album_category_delete_c_album_category_album($target_c_album_id); 51 47 foreach($category as $value) { … … 59 55 db_album_category_insert_c_album_category_album($target_c_album_id, $c_category_id); 60 56 } 61 57 */ 58 62 59 $filename_1 = ''; 60 $c_album_cover = $c_album['album_cover_image']; 63 61 64 62 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); 66 65 $filename_1 = image_insert_c_image_album4tmp("a_{$target_c_album_id}_1", $tmpfile_1); 67 66 } 68 67 68 $sessid = session_id(); 69 t_image_clear_tmp($sessid); 69 70 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); 72 73 73 74 $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 13 13 // --- リクエスト変数 14 14 $target_c_album_id = $requests['target_c_album_id']; 15 $target_c_album_image_id = $requests['target_c_album_image_id'];16 15 $subject = $requests['subject']; 17 16 $description = $requests['description']; 18 $category = $requests['category'];19 17 $public_flag = $requests['public_flag']; 20 18 //$category = $requests['category']; 19 //$target_c_album_image_id = $requests['target_c_album_image_id']; 21 20 // ---------- 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 } 22 26 23 27 $album = db_album_get_c_album4c_album_id($target_c_album_id); … … 26 30 } 27 31 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))) { 29 34 $album['subject'] = $subject; 30 35 $album['description'] = $description; 31 $album['category'] = $category;32 36 $album['public_flag'] = $public_flag; 37 //$album['category'] = $category; 33 38 } 34 39 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); 37 42 38 43 //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); 41 46 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); 53 49 54 50 $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); 55 55 56 56 //プロフィール 57 57 $this->set("target_member", db_member_c_member4c_member_id($u)); 58 58 59 return 'success'; 60 59 61 //カレンダー関係 60 62 //カレンダー開始用変数 63 /* 61 64 $time = strtotime($album['r_datetime']); 62 65 $year = date('Y', $time); … … 78 81 //各月の日記 79 82 $this->set("date_list", p_fh_album_list_date_list4c_member_id($u)); 80 83 */ 84 85 //kazuki OpenPNEのアルバムではカテゴリを使わない 86 /* 81 87 if (USE_ALBUM_CATEGORY) { 82 88 if ($category) { … … 96 102 $this->set("use_album_category", true); 97 103 } 98 99 return 'success'; 104 */ 100 105 } 101 106 } -
OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/page/h_album_cover_edit_confirm.php
r6139 r6151 10 10 { 11 11 $_REQUEST['msg'] = array_shift($errors); 12 13 12 openpne_forward('pc', 'page', 'h_album_cover_edit', $errors); 14 13 exit; … … 25 24 $public_flag = $requests['public_flag']; 26 25 $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']; 29 28 // ---------- 30 //print "<pre>"; 31 //print_r ($requests); 32 //print "</pre>"; 29 30 //$str_1 = str_split($album_pwd); 33 31 34 $sessid = session_id(); 35 t_image_clear_tmp($sessid); 36 37 $str_1 = str_split($album_pwd); 38 32 /* 39 33 if($album_pwd){ 40 34 if(strlen($album_pwd) <= 8 && strlen($album_pwd) >= 4){ … … 52 46 } 53 47 } 54 48 */ 49 50 $sessid = session_id(); 51 t_image_clear_tmp($sessid); 55 52 56 53 $upfiles = array( … … 64 61 if ($upfile['error'] !== UPLOAD_ERR_NO_FILE) { 65 62 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にしてください'; 67 64 openpne_forward('pc', 'page', 'h_album_cover_edit'); 68 65 exit; … … 73 70 } 74 71 75 76 77 72 $this->set('inc_navi', fetch_inc_navi("h")); 78 73 79 74 //プロフィール 80 $this->set("member", db_member_c_member4c_member_id($u));75 //$this->set("member", db_member_c_member4c_member_id($u)); 81 76 82 77 //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); 85 80 86 81 $form_val = array( 87 82 "target_c_album_id" => $target_c_album_id, 88 "c_commu_id" => $c_commu_id,89 83 "subject"=> $subject, 90 84 "description" => $description, 91 "category"=>$category, 92 "public_flag"=>$public_flag, 93 "album_pwd" => $album_pwd, 85 "public_flag"=> $public_flag, 94 86 "upfile_1" => $_FILES['upfile_1'], 95 87 "tmpfile_1" => $tmpfiles[1], 88 //"c_commu_id" => $c_commu_id, 89 //"category"=>$category, 90 //"album_pwd" => $album_pwd, 96 91 ); 92 97 93 $this->set("form_val", $form_val); 98 99 94 return 'success'; 100 95 } -
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 ({*************************** 4 74 <table border="0" cellspacing="0" cellpadding="0" style="width:165px;" > 5 75 <tr> … … 82 152 ({/if}) 83 153 84 ({ext_include file="inc_layoutcolumn_middle_165px.tpl"})85 154 86 155 ({t_form _enctype=file m=pc a=page_h_album_cover_edit_confirm}) … … 350 419 --> 351 420 </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 ({**************************** 4 60 <img src="./skin/dummy.gif" class="v_spacer_l"> 5 61 … … 218 274 ({ext_include file="inc_layoutcolumn_middle_750px.tpl"}) 219 275 --> 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 1 1 [target_c_album_id] 2 type = "int"3 required = 04 min = 15 6 [target_c_album_image_id]7 2 type = "int" 8 3 required = 0 … … 15 10 type = "string" 16 11 17 [category]18 type = "string"19 20 12 [public_flag] 21 13 type = "string" 22 -
OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/validate/page/h_album_cover_edit_confirm.ini
r6139 r6151 7 7 [description] 8 8 type = "string" 9 required = 010 caption = CAPTION_BODY11 12 [category]13 type = "string"14 9 15 10 [public_flag] 16 11 type = "string" 17 required = 118 19 [target_c_commu_id]20 type = "int"21 required = 022 23 [album_pwd]24 type = "string"
Note: See TracChangeset
for help on using the changeset viewer.