Warning: Undefined array key "mobile_dir" in /home/kagla/new-sir/old/common.php on line 315
제목 부분을 오름차순 내림차순으로 하려면 어떻게 해야 하나요?

제목 부분을 오름차순 내림차순으로 하려면 어떻게 해야 하나요?

제목 부분을 오름차순 내림차순으로 하려면 어떻게 해야 하나요?

QA

제목 부분을 오름차순 내림차순으로 하려면 어떻게 해야 하나요?

답변 3

본문

아래와 같이 했는데 안됩니다.

 

                    
                    <div class="btn-group" role="group">
                        <button type="button" class="btn btn_b01 nofocus dropdown-toggle dropdown-toggle-empty dropdown-toggle-split p-1" data-toggle="dropdown" data-display="static" aria-haspopup="true" aria-expanded="false" title="게시물 정렬">
                            <?php
                                switch($sst) {
                                
                                    case 'wr_subject'    :    $sst_icon = 'history'; 
                                                            $sst_txt = '날짜순 정렬'; 
                                                            break;              
                 
                                
                                    case 'wr_datetime'    :    $sst_icon = 'history'; 
                                                            $sst_txt = '날짜순 정렬'; 
                                                            break;
                                    case 'wr_hit'        :    $sst_icon = 'eye'; 
                                                            $sst_txt = '조회순 정렬'; 
                                                            break;
                                    case 'wr_good'        :    $sst_icon = 'thumbs-o-up'; 
                                                            $sst_txt = '추천순 정렬'; 
                                                            break;
                                    case 'wr_nogood'    :    $sst_icon = 'thumbs-o-down'; 
                                                            $sst_txt = '비추천순 정렬'; 
                                                            break;
                                    default                :    $sst_icon = 'sort-numeric-desc'; 
                                                            $sst_txt = '게시물 정렬'; 
                                                            break;
                                }
                            ?>
                            <i class="fa fa-<?php echo $sst_icon ?> fa-fw fa-md" aria-hidden="true"></i>
                            <span class="sr-only"><?php echo $sst_txt ?></span>
                        </button>
                        <div class="dropdown-menu dropdown-menu-right p-0 border-0 bg-transparent text-right">
                            <div class="btn-group-vertical bg-white border rounded py-1">
                            
                                <?php echo str_replace('>', ' class="btn px-3 py-1 text-left" role="button">', subject_sort_link('wr_subject', $qstr2, 1)) ?>
                                    제목순

                                </a>                            
                            
                            
                                <?php echo str_replace('>', ' class="btn px-3 py-1 text-left" role="button">', subject_sort_link('wr_datetime', $qstr2, 1)) ?>
                                    날짜순
                                </a>
                                <?php echo str_replace('>', ' class="btn px-3 py-1 text-left" role="button">', subject_sort_link('wr_hit', $qstr2, 1)) ?>
                                    조회순
                                </a>
                                <?php if($is_good) { ?>
                                    <?php echo str_replace('>', ' class="btn px-3 py-1 text-left" role="button">', subject_sort_link('wr_good', $qstr2, 1)) ?>
                                        추천순
                                    </a>
                                <?php } ?>
                                <?php if($is_nogood) { ?>
                                    <?php echo str_replace('>', ' class="btn px-3 py-1 text-left" role="button">', subject_sort_link('wr_nogood', $qstr2, 1)) ?>
                                        비추천순
                                    </a>
                                <?php } ?>
                            </div>
                        </div>
                    </div>
                    

그리고 

 

<div class="d-md-table-cell nw-6 pr-md-1"><?php echo subject_sort_link('wr_subject', $qstr2, 1) ?>제목</a></div>

 

이 질문에 댓글 쓰기 :

답변 3

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 129,406
© SIRSOFT
현재 페이지 제일 처음으로