검색대상 select option 에 seleced 넣기
This commit is contained in:
@ -70,9 +70,9 @@ var list_delete_php = 'board_list_delete.php';
|
|||||||
</span>
|
</span>
|
||||||
<label for="sfl">검색대상</label>
|
<label for="sfl">검색대상</label>
|
||||||
<select id="sfl" name="sfl">
|
<select id="sfl" name="sfl">
|
||||||
<option value="bo_table" <?=option_selected($_GET['sfl'], "bo_table");?>>TABLE</option>
|
<option value="bo_table" <?=get_selected($_GET['sfl'], "bo_subject", true);?>>TABLE</option>
|
||||||
<option value="bo_subject" <?=option_selected($_GET['sfl'], "bo_subject");?>>제목</option>
|
<option value="bo_subject" <?=get_selected($_GET['sfl'], "bo_subject");?>>제목</option>
|
||||||
<option value="a.gr_id" <?=option_selected($_GET['sfl'], "a.gr_id");?>>그룹ID</option>
|
<option value="a.gr_id" <?=get_selected($_GET['sfl'], "a.gr_id");?>>그룹ID</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" name="stx" required value="<?=$stx?>" title="검색어">
|
<input type="text" name="stx" required value="<?=$stx?>" title="검색어">
|
||||||
<input type="submit" class="fieldset_submit" value="검색">
|
<input type="submit" class="fieldset_submit" value="검색">
|
||||||
@ -183,10 +183,6 @@ $pagelist = get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['
|
|||||||
<?=$pagelist?>
|
<?=$pagelist?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?
|
|
||||||
if (isset($stx))
|
|
||||||
echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>';
|
|
||||||
?>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -1620,10 +1620,11 @@ function abs_ip2long($ip='')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
function get_selected($field, $value, $first=false)
|
||||||
function option_selected($field, $value)
|
|
||||||
{
|
{
|
||||||
return ($field==$value) ? ' selected="selected"' : '';
|
$selected = ($field==$value) ? ' selected="selected"' : '';
|
||||||
|
if ($first && !$selected)
|
||||||
|
$selected = ($field=="") ? ' selected="selected"' : '';
|
||||||
|
return $selected;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user