Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -50,6 +50,7 @@ $sql = " select *
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '';
|
||||
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>';
|
||||
|
||||
|
||||
@ -233,7 +233,7 @@ if ($board['bo_use_category']) {
|
||||
$ca_name = "";
|
||||
if (isset($write['ca_name']))
|
||||
$ca_name = $write['ca_name'];
|
||||
$category_option = get_category_option($bo_table);
|
||||
$category_option = get_category_option($bo_table, $ca_name);
|
||||
$is_category = true;
|
||||
}
|
||||
|
||||
|
||||
@ -728,15 +728,22 @@ function is_admin($mb_id)
|
||||
|
||||
// 분류 옵션을 얻음
|
||||
// 4.00 에서는 카테고리 테이블을 없애고 보드테이블에 있는 내용으로 대체
|
||||
function get_category_option($bo_table='')
|
||||
function get_category_option($bo_table='', $ca_name='')
|
||||
{
|
||||
global $g4, $board;
|
||||
|
||||
$arr = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
||||
$str = "";
|
||||
for ($i=0; $i<count($arr); $i++)
|
||||
if (trim($arr[$i]))
|
||||
$str .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
$category = trim($arr[$i]);
|
||||
if (!$category) continue;
|
||||
|
||||
$str .= "<option value=\"$arr[$i]\"";
|
||||
if ($category == $ca_name) {
|
||||
$str .= ' selected="selected"';
|
||||
}
|
||||
$str .= ">$arr[$i]</option>\n";
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
@ -94,8 +94,9 @@ if ($option) {
|
||||
<tr>
|
||||
<th scope="row"><label for="ca_name">분류</label></th>
|
||||
<td>
|
||||
<select id="ca_name" name="ca_name" required>
|
||||
<option value="">선택하세요<?=$category_option?>
|
||||
<select id="ca_name" name="ca_name" required="required">
|
||||
<option value="">선택하세요</option>
|
||||
<?=$category_option?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -23,11 +23,16 @@ if ($g4['https_url']) {
|
||||
else {
|
||||
$login_url = $urlencode;
|
||||
}
|
||||
|
||||
if ($g4['https_url'])
|
||||
$action_url = "{$g4['https_url']}/$g4[bbs]/login_check.php";
|
||||
else
|
||||
$action_url = "{$g4['bbs_path']}/login_check.php";
|
||||
?>
|
||||
|
||||
<script src="<?=$g4[path]?>/js/capslock.js"></script>
|
||||
|
||||
<form name="flogin" method="post" onsubmit="return flogin_submit(this);" autocomplete="off">
|
||||
<form name="flogin" method="post" action="<?=$action_url?>" onsubmit="return flogin_submit(this);">
|
||||
<input type="hidden" name="url" value='<?=$login_url?>'>
|
||||
|
||||
<fieldset>
|
||||
@ -58,13 +63,6 @@ document.flogin.mb_id.focus();
|
||||
|
||||
function flogin_submit(f)
|
||||
{
|
||||
<?
|
||||
if ($g4[https_url])
|
||||
echo "f.action = '$g4[https_url]/$g4[bbs]/login_check.php';";
|
||||
else
|
||||
echo "f.action = '$g4[bbs_path]/login_check.php';";
|
||||
?>
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user