Changeset 6363
- Timestamp:
- Apr 7, 2008, 5:57:39 PM (13 years ago)
- Location:
- OpenPNE/branches/work/asano/pne_album/webapp/modules/pc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/page/h_album_search.php
r6350 r6363 12 12 13 13 // --- requests変数 14 $target_c_member_id = $requests['target_c_member_id'];15 14 $direc = $requests['direc']; 16 15 $page = $requests['page']; 17 $year = $requests['year'];18 $month = $requests['month'];19 $day = $requests['day'];20 $category_id = $requests['category_id'];21 16 $keyword = $requests['keyword']; 22 23 24 17 // ---------- 25 18 26 if (!$target_c_member_id) { 27 $target_c_member_id = $u; 28 } 29 30 if ($target_c_member_id == $u) { 31 $type = 'h'; 32 $is_album_admin = true; 33 } else { 34 $type = 'f'; 35 $is_album_admin = false; 36 $target_c_member = db_member_c_member4c_member_id($target_c_member_id); 37 $is_friend = db_friend_is_friend($u, $target_c_member_id); 38 39 // アクセスブロック 40 if (db_member_is_access_block($u, $target_c_member_id)) { 41 openpne_redirect('pc', 'page_h_access_block'); 42 } 43 44 //あしあとをつける 45 db_ashiato_insert_c_ashiato($target_c_member_id, $u); 46 } 47 $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); 48 $this->set('type', $type); 49 19 $this->set('inc_navi', fetch_inc_navi('h')); 50 20 $page += $direc; 51 21 $page_size = 10; 52 22 53 $ target_member = db_member_c_member4c_member_id($target_c_member_id);23 $result = p_h_album_list_all_search_c_album4c_album($keyword, $page_size, $page); 54 24 55 $user_id = $u; 56 57 58 59 60 $this->set('target_member', $target_member); 61 $this->set('c_member_id',$user_id); 62 //年月日で一覧表示、日記数に制限なし 63 if ($year && $month) { 64 $list_set = p_fh_album_list_album_list_date4c_member_id($target_c_member_id, $page_size, $page ,$year, $month, $day, $u); 65 $rss_list = db_rss_list_c_rss_cache_list_date($target_c_member_id, $year, $month, $day); 66 } elseif($category_id) { 67 $year = date('Y'); 68 $month = date('n'); 69 $list_set = db_album_list4c_album_category_id($target_c_member_id, $category_id, $u,$page_size, $page); 70 $this->set('category_name', db_album_get_category_name4category_id($category_id)); 71 } else { 72 $year = date('Y'); 73 $month = date('n'); 74 $this->set('all', 1); 25 $this->set('target_album_list', $result[0]); 26 $this->set('is_prev', $result[1]); 27 $this->set('is_next', $result[2]); 28 $this->set('album_list_count', count($result[0])); 75 29 76 //検索する場合 77 if ($keyword) { 78 // $list_set = p_h_album_list_all_search_c_album_public4c_album($keyword, $page_size, $page, $u); 79 $list_set=p_h_album_list_all_search_c_album4c_album($keyword, $page_size, $page, $u); 80 } else { 81 82 $list_set = p_fh_album_list_album_list_public4c_member_id($target_c_member_id, $page_size, $page, $u); 83 $rss_list = db_rss_list_c_rss_cache_list($target_c_member_id, $page_size, $page); 84 85 } 86 } 87 88 89 $this->set('c_rss_cache_list', $rss_list); 90 91 $this->set('target_album_list', $list_set[0]); 30 $pager = array(); 31 $pager['start'] = $page_size * ($page - 1) + 1; 32 if (($pager['end'] = $page_size * $page) > $result[3]) { 33 $pager['end'] = $result[3]; 34 } 92 35 $this->set('page', $page); 93 $this->set('page_size', $page_size); 94 $this->set('is_prev', $list_set[1]); 95 $this->set('is_next', $list_set[2]); 96 $this->set("total_num", $list_set[3]); 97 98 $this->set('album_list_count', count($list_set[0])); 99 100 //日記一覧、カレンダー用変数 101 $date_val = array( 102 'year' => $year, 103 'month' => $month, 104 'day' => $day, 105 ); 106 $this->set('date_val', $date_val); 107 108 //日記のカレンダー 109 $calendar = db_common_album_monthly_calendar($year, $month, $target_c_member_id, $u); 110 111 $this->set('calendar', $calendar['days']); 112 $this->set('ym', $calendar['ym']); 113 114 //各月の日記 115 $this->set('date_list', p_fh_album_list_date_list4c_member_id($target_c_member_id)); 116 117 if (USE_ALBUM_CATEGORY) { 118 //カテゴリ一覧 119 $this->set('category_list', db_album_category_list4c_member_id($target_c_member_id)); 120 } 36 $this->set('pager', $pager); 121 37 122 38 //検索ワード 123 39 $this->set('keyword', $keyword); 124 $this->set("url_keyword", urlencode($keyword));125 40 126 41 return 'success'; -
OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/templates/h_album_search.tpl
r6350 r6363 1 ({ext_include file="inc_header.tpl"})2 ({ext_include file="inc_layoutcolumn_top_720px.tpl"})3 1 4 <img src="./skin/dummy.gif" class="v_spacer_l"> 2 <div id="LayoutC"> 3 <div id="Center"> 5 4 6 ({if $type == "h"}) 7 <table border="0" cellspacing="0" cellpadding="0" style="width:640px;"> 8 <tr> 9 <td> 10 <div id="xsnazzy"> 11 <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> 12 <div class="xboxcontent"> 13 <table border="0" cellspacing="0" cellpadding="0" style="width:624px;" class="bg_11"> 14 <tr> 15 <td style="width:36px;" class="bg_06"><img src="({t_img_url_skin filename=content_header_1})" style="width:30px;height:20px;" class="dummy"></td> 16 <td style="padding:2px 0px;" class="bg_06"><span class="b_b c_00">({$ltag.h_album_search})</span></td> 17 </tr> 18 </table> 19 <div class="border_01 bg_02" align="center"> 5 ({* {{{ searchFormLine *}) 6 <div class="parts searchFormLine"> 7 ({t_form_block _method=get m=pc a=page_h_album_search}) 8 <ul> 9 <li><img src="({t_img_url_skin filename=icon_search})" alt="search" /></li> 10 <li><input type="text" class="input_text" name="keyword" value="({$keyword})" size="30" /></li> 11 <li><input type="submit" class="input_submit" value="アルバム検索" /></li> 12 </ul> 13 ({/t_form_block}) 14 </div> 15 ({* }}} *}) 20 16 21 <img src="./skin/dummy.gif" class="v_spacer_l">22 <img src="./skin/dummy.gif" class="v_spacer_l">23 17 24 <div style="width:600px;padding:5px;margin:0px auto;text-align:left;" class="border_01 bg_02"> 25 ({t_form _method=get m=pc a=page_h_album_search}) 26 ({$ltag.keywords})<img align="bottom" src="({t_img_url_skin filename=icon_arrow_2})" class="icon"> 27 <input type="text" size="15" name="keyword" class="text border_01" value="({$keyword})"> 28 <input type="submit" class="submit" value=" ({$ltag.Retrieval}) "> 29 </form><br> 30 ※({$ltag.h_album_search_open_album}) 31 <br/> 32 ※({$ltag.h_album_search_no_keywords}) 18 <div class="dparts searchResultList"><div class="parts"> 19 ({if $keyword}) 20 <div class="partsHeading"><h3>アルバム検索結果一覧</h3><p>*** ({$album_list_count})件が該当しました。</p></div> 21 ({else}) 22 <div class="partsHeading"><h3>最新アルバム一覧</h3></div> 23 ({/if}) 24 25 <div class="pagerRelative"> 26 ({if $is_prev})<p class="prev"><a href="({t_url m=pc a=page_h_album_search})&keyword=({$keyword|escape:url|smarty:nodefaults})&page=({$page})&direc=-1">前を表示</a></p>({/if}) 27 <p class="number">({$pager.start})件~({$pager.end})件を表示</p> 28 ({if $is_next})<p class="next"> <a href="({t_url m=pc a=page_h_album_search})&keyword=({$keyword|escape:url|smarty:nodefaults})&page=({$page})&direc=1">次を表示</a></p>({/if}) 33 29 </div> 34 30 35 <img src="./skin/dummy.gif" class="v_spacer_l"> 31 32 <div class="block"> 33 ({foreach from=$target_album_list item=album}) 34 <div class="ditem"><div class="item"><table><tr> 35 <td class="photo" rowspan="4"><a href="({t_url m=pc a=page_fh_album})&target_c_album_id=({$album.c_album_id})"><img src="({t_img_album_url filename=$album.album_cover_image w=180 h=180 noimg=no_image})" alt="" /></a></td> 36 <th>ニックネーム</th><td>({$album.c_member.nickname})</td> 37 </tr><tr> 38 <th>タイトル</th><td>({$album.subject})</td> 39 </tr><tr> 40 <th>説明</th><td>({$album.description|t_truncate:300:"":3})</td> 41 </tr><tr> 42 <th>作成日時</th><td class="operation"><span class="text">({$album.r_datetime|date_format:"%Y年%m月%d日 %H:%M"})</span> <span class="moreInfo"><a href="({t_url m=pc a=page_fh_album})&target_c_album_id=({$album.c_album_id})"><img src="({t_img_url_skin filename=button_shosai})" alt="詳細を見る" /></a></span></td> 43 </tr></table></div></div> 44 ({/foreach}) 45 </div><!-- block --> 46 47 48 49 50 <div class="pagerRelative"> 51 ({if $is_prev})<p class="prev"><a href="({t_url m=pc a=page_h_album_search})&keyword=({$keyword|escape:url|smarty:nodefaults})&page=({$page})&direc=-1">前を表示</a></p>({/if}) 52 <p class="number">({$pager.start})件~({$pager.end})件を表示</p> 53 ({if $is_next})<p class="next"> <a href="({t_url m=pc a=page_h_album_search})&keyword=({$keyword|escape:url|smarty:nodefaults})&page=({$page})&direc=1">次を表示</a></p>({/if}) 36 54 </div> 37 </div>38 <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>39 </div>40 55 41 </td> 42 </tr> 43 </table> 56 </div><!-- parts --> 57 </div><!-- dparts searchResultList --> 44 58 45 <img src="./skin/dummy.gif" class="v_spacer_l">46 ({/if})47 59 48 ({if $target_album_list}) 49 <table border="0" cellspacing="0" cellpadding="0" style="width:640px;"> 50 <tr> 51 <td> 52 <div id="xsnazzy"> 53 <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> 54 <div class="xboxcontent"> 55 <table border="0" cellspacing="0" cellpadding="0" style="width:624px;" class="bg_11"> 56 <tr> 57 <td style="width:36px;" class="bg_06"><img src="({t_img_url_skin filename=content_header_1})" style="width:30px;height:20px;" class="dummy"></td> 58 <td style="padding:2px 0px;" class="bg_06"><span class="b_b c_00">({$ltag.h_album_search_new_album})</span></td> 59 </tr> 60 </table> 61 62 ({if !$all}) 63 ({if !$category}) 64 ({$date_val.month})-({if $date_val.day})({$date_val.day})-({/if})({$date_val.year}) 65 ({/if}) 66 ({$category_name}) 67 ({/if}) 68 69 <table border="0" cellspacing="0" cellpadding="0" style="width:624px;" class="border_01"> 70 <tr> 71 <td style="width:624px;" class="bg_02" align="right" valign="right"> 72 <div style="padding:4px 3px;"> 73 ({if $is_prev}) 74 <a href="({t_url m=pc a=page_h_album_search})&target_c_member_id=({$target_member.c_member_id})&direc=-1&page=({$page})({if $url_keyword})&keyword=({$url_keyword})({/if})({if !$all})({if $date_val.year})&year=({$date_val.year})({/if})({if $date_val.month})&month=({$date_val.month})({/if})({if $date_val.day})&day=({$date_val.day})({/if})({/if})">({$ltag.Forward})</a> 75 ({/if}) 76 77 ({$page*$page_size-$page_size+1})- 78 ({if $page_size > $album_list_count}) 79 ({$album_list_count+$page*$page_size-$page_size}) 80 ({else}) 81 ({$page*$page_size}) 82 ({/if}) 83 ({if $is_next}) 84 <a href="({t_url m=pc a=page_h_album_search})&target_c_member_id=({$target_member.c_member_id})&direc=1&page=({$page})({if $url_keyword})&keyword=({$url_keyword})({/if})({if !$all})({if $date_val.year})&year=({$date_val.year})({/if})({if $date_val.month})&month=({$date_val.month})({/if})({if $date_val.day})&day=({$date_val.day})({/if})({/if})">({$ltag.Next})</a> 85 ({/if}) 86 </div> 87 </td> 88 </tr> 89 <tr> 90 <td style="width:624px;height:1px;" class="bg_01" colspan="3"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 91 </tr> 92 </table> 93 94 ({foreach from=$target_album_list item=item}) 95 <table border="0" cellspacing="0" cellpadding="0" style="width:624px;" class="border_01"> 96 <tr> 97 <td style="width:200px;padding:4px;" valign=top rowspan=9 align=center class="bg_02"> 98 ({if $item.album_cover_image}) 99 <div> 100 <span class="padding_s"> 101 <a href="({t_url m=pc a=page_fh_album})&target_c_album_id=({$item.c_album_id})"><img src="({t_img_album_url filename=$item.album_cover_image w=180 h=180})"></a> 102 </span> 103 </div> 104 ({/if}) 105 </td> 106 <td style="width:1px;" class="bg_01"> 107 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 108 </td> 109 <td align="center" style="width:75px;padding:4px;" class="bg_11"> 110 ({$ltag.surname})({$ltag.last_name}) 111 </td> 112 <td style="width:1px;" class="bg_01"> 113 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 114 </td> 115 <td COLSPAN=2 style="width:347px;padding:4px;" class="bg_02"> 116 ({$item.nickname})({$smarty.const.NAME_TAIL}) 117 </td> 118 </tr> 119 <tr> 120 <td style="height:1px;" class="bg_01" colspan=6> 121 <img src="./skin/dummy.gif" style="height:1px;" class="dummy"> 122 </td> 123 </tr> 124 <tr> 125 <td style="width:1px;" class="bg_01"> 126 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 127 </td> 128 <td align="center" NOWRAP class="bg_11" style="padding:4px;"> 129 ({$ltag.album})({$ltag.name}) 130 </td> 131 <td style="width:1px;" class="bg_01"> 132 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 133 </td> 134 <td COLSPAN=2 class="bg_02" style="padding:4px;">({$item.subject|t_truncate:300})</td> 135 </tr> 136 <tr> 137 <td style="height:1px;" class="bg_01" colspan=6> 138 <img src="./skin/dummy.gif" style="height:1px;" class="dummy"> 139 </td> 140 </tr> 141 <tr> 142 <td style="width:1px;" class="bg_01"> 143 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 144 </td> 145 <td align="center" class="bg_11" NOWRAP style="padding:4px;"> 146 ({$ltag.album})({$ltag.note}) 147 </td> 148 <td style="width:1px;" class="bg_01"> 149 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 150 </td> 151 <td COLSPAN=2 class="bg_02" style="padding:4px;"> 152 ({$item.description|t_truncate:300}) 153 </td> 154 </tr> 155 <tr> 156 <td style="height:1px;" class="bg_01" colspan=6> 157 <img src="./skin/dummy.gif" style="height:1px;" class="dummy"> 158 </td> 159 </tr> 160 <tr> 161 <td style="width:1px;" class="bg_01"> 162 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 163 </td> 164 <td align="center" NOWRAP class="bg_11" style="padding:4px;"> 165 ({$ltag.voice_mail})</td> 166 <td style="width:1px;" class="bg_01"> 167 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 168 </td> 169 <td COLSPAN=2 class="bg_02" style="padding:4px;"> 170 <a href="({t_url m=pc a=page_fh_album})&target_c_album_id=({$item.c_album_id})&comment_count=({$item.num_comment})"> 171 (({$item.num_comment}))({$ltag.voice_mail}) 172 </a> 173 </td> 174 </tr> 175 <tr> 176 <td style="height:1px;" class="bg_01" colspan=6> 177 <img src="./skin/dummy.gif" style="height:1px;" class="dummy"> 178 </td> 179 </tr> 180 <tr> 181 <td style="width:1px;" class="bg_01"> 182 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 183 </td> 184 <td align="center" NOWRAP class="bg_11" style="padding:4px;"> 185 ({$ltag.h_album_create_date}) 186 </td> 187 <td style="width:1px;" class="bg_01"> 188 <img src="./skin/dummy.gif" style="width:1px;" class="dummy"> 189 </td> 190 <td class="bg_02" NOWRAP style="padding:4px;"> 191 ({$item.r_datetime|date_format:"%m-%d-%Y %H:%M"}) 192 </td> 193 <td ALIGN=center class="bg_01 "> 194 <a href="({t_url m=pc a=page_fh_album})&target_c_album_id=({$item.c_album_id})"> 195 <img src="({t_img_url_skin filename=button_shosai})"></a> 196 </td> 197 </tr> 198 </table> 199 <table cellspacing="0" cellpadding="0" style="height:6px;width:624px; " class="border_01"><tr><td></td></tr></table> 200 ({/foreach}) 201 202 <table border="0" cellspacing="0" cellpadding="0" style="width:624px;" class="border_01"> 203 <tr> 204 <td style="width:624px;" class="bg_02" align="right" valign="right"> 205 <div style="padding:4px 3px;"> 206 ({if $is_prev}) 207 <a href="({t_url m=pc a=page_h_album_search})&target_c_member_id=({$target_member.c_member_id})&direc=-1&page=({$page})({if $url_keyword})&keyword=({$url_keyword})({/if})({if !$all})({if $date_val.year})&year=({$date_val.year})({/if})({if $date_val.month})&month=({$date_val.month})({/if})({if $date_val.day})&day=({$date_val.day})({/if})({/if})">({$ltag.Forward})</a> 208 ({/if}) 209 210 ({$page*$page_size-$page_size+1})- 211 ({if $page_size > $album_list_count}) 212 ({$album_list_count+$page*$page_size-$page_size}) 213 ({else}) 214 ({$page*$page_size}) 215 ({/if}) 216 ({if $is_next}) 217 <a href="({t_url m=pc a=page_h_album_search})&target_c_member_id=({$target_member.c_member_id})&direc=1&page=({$page})({if $url_keyword})&keyword=({$url_keyword})({/if})({if !$all})({if $date_val.year})&year=({$date_val.year})({/if})({if $date_val.month})&month=({$date_val.month})({/if})({if $date_val.day})&day=({$date_val.day})({/if})({/if})">({$ltag.Next})</a> 218 ({/if}) 219 </div> 220 </td> 221 </tr> 222 <tr> 223 <td style="width:624px;height:1px;" class="bg_01" colspan="3"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 224 </tr> 225 </table> 226 </div> 227 <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b> 228 </div> 229 230 </td> 231 </tr> 232 </table> 233 234 <img src="./skin/dummy.gif" class="v_spacer_l"> 235 ({/if}) 236 237 <!-- delete by openkaku team on 080313 238 ({ext_include file="inc_layoutcolumn_middle_750px.tpl"}) 239 --> 240 ({ext_include file="inc_layoutcolumn_bottom_270px_165px_175px_720px.tpl"}) 241 ({ext_include file="inc_footer.tpl"}) 60 </div><!-- Center --> 61 </div><!-- LayoutC --> -
OpenPNE/branches/work/asano/pne_album/webapp/modules/pc/validate/page/h_album_search.ini
r6350 r6363 1 [target_c_member_id]2 type = "int"3 required = 04 min = 15 6 1 [direc] 7 2 type = "int" … … 15 10 min = 1 16 11 17 [year]18 type = "int"19 20 [month]21 type = "int"22 23 [day]24 type = "int"25 26 [category_id]27 type = "int"28 29 12 [keyword] 30 13 type = "string"
Note: See TracChangeset
for help on using the changeset viewer.