jqgrid 기간 입력 기간조회 하고싶습니다.
본문
교육카드로 쓰려하는데요,
교육기간을 기간으로 넣어서 기간조회 (현재는 조회가 창고입고일입니다) 로 수정하고싶어요 ㅠㅠ 너무 초보라 자세한 설명 해주시면 감사하겠습니다 !
list skin 파일 내 입력은 이렇구요,
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
unset($list);
include_once($board_skin_path."/_arr.php"); // 여분필드 배열 담긴 파일
$sfl_t = "이름|사번|Description";
$sfl_v = "wr_subject|wr_2|wr_9";
?>
<script>
// 데이터 처리하는 파일경로
var data_url = "<?php echo $board_skin_url; ?>/list_data.php";
// 데이터 처리하는 파일경로 (일괄삭제)
var delete_url = "<?php echo $board_skin_url; ?>/delete_data.php?bo_table=<?php echo $bo_table;?>";
// PDF 파일 경로
var board_skin_url = "<?php echo $board_skin_url; ?>";
</script>
<link rel="stylesheet" href="<?php echo $board_skin_url; ?>/jquery-ui-1.12.1/jquery-ui.css">
<script type="text/ecmascript" src="<?php echo $board_skin_url; ?>/jquery-ui-1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" href="<?php echo $board_skin_url; ?>/style.css">
<script>
jQuery(function($){
$.datepicker.regional["ko"] = {
closeText: "닫기",
prevText: "이전달",
nextText: "다음달",
currentText: "오늘",
monthNames: ["1월(JAN)","2월(FEB)","3월(MAR)","4월(APR)","5월(MAY)","6월(JUN)", "7월(JUL)","8월(AUG)","9월(SEP)","10월(OCT)","11월(NOV)","12월(DEC)"],
monthNamesShort: ["1월","2월","3월","4월","5월","6월", "7월","8월","9월","10월","11월","12월"],
dayNames: ["일","월","화","수","목","금","토"],
dayNamesShort: ["일","월","화","수","목","금","토"],
dayNamesMin: ["일","월","화","수","목","금","토"],
weekHeader: "Wk",
dateFormat: "yymmdd",
firstDay: 0,
isRTL: false,
showMonthAfterYear: true,
yearSuffix: ""
};
$.datepicker.setDefaults($.datepicker.regional["ko"]);
});
jQuery.browser = {};
(function () {
jQuery.browser.msie = false;
jQuery.browser.version = 0;
if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
jQuery.browser.msie = true;
jQuery.browser.version = RegExp.$1;
}
})();
</script>
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $board_skin_url; ?>/grid/css/ui.jqgrid.css" />
<script type="text/ecmascript" src="<?php echo $board_skin_url; ?>/grid/js/i18n/grid.locale-en.js"></script>
<script type="text/javascript">
$.jgrid.no_legacy_api = true;
$.jgrid.useJSON = true;
</script>
<script type="text/ecmascript" src="<?php echo $board_skin_url; ?>/grid/js/jquery.jqGrid.min.js"></script>
<script type="text/ecmascript" src="<?php echo $board_skin_url; ?>/list.js"></script>
<style>
.ui-jqgrid .ui-jqgrid-view { z-index:1; }
#list2_cb { width:30px !important; } /* 전체선택-해제 체크박스 TD 크기 (1픽셀 밀리거나 당겨지는 경우 수정 */
</style>
<input type="hidden" name="bo_table" id="bo_table" class="bo_table" value="<?php echo $bo_table;?>" /> <!-- 삭제하지마세요 -->
<div id="popup_msg"></div>
<div id="fm_search2">
<form name="fmSearch" id="fmSearch">
<table>
<colgroup>
<col width="7%" />
<col width="18%" />
<col width="7%" />
<col width="18%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="18%" />
</colgroup>
<tr>
<th>Search</th>
<td colspan="6">
<select name="sfl" id="sfl" class="sfl">
<?php echo option_str($sfl_t,$sfl_v,$sfl); ?>
</select>
<input type="text" name="stx" id="stx" class="stx" value="<?php echo $stx; ?>" size="20" />
<button type="button" id="btn_submit" class="btn_submit">search</button>
<button type='button' id='reset'>Reset</button>
<button type="button" onclick="prInt('excel');" >Excel</button>
<button type="button" onclick="prInt('pdf');" >PDF</button>
<?php if ($write_href) { ?>
<button type="button" class="wri" onclick="location.href='<?php echo $write_href ?>';">New</button>
<?php } ?>
</td>
<tr>
<th>교육명</th>
<td><input type="text" name="w9" id="w9" value="<?php echo $w9; ?>" /></td>
<th>창고입고일</th>
<td colspan="4">
<input type="text" name="fd10" id="fd10" class="width80" value="<?php echo $fd10; ?>" /> ~
<input type="text" name="td10" id="td10" class="width80" value="<?php echo $td10; ?>" />
</td>
</tr>
<tr>
<th>Location</th>
<td colspan="4">
<!-- <select name="w1" id="w1"><?php echo option_str("==선택==".$wr1_t,$wr1_k,$w1); ?></select> -->
<?php
$wr1_t = substr($wr1_t,1);
$wr1_k = substr($wr1_k,1);
echo checkbox($wr1_t,$wr1_k,$w1,'w1');
?>
<th>Condition</th>
<td><select name="w3" id="w3"><?php echo option_str("==Select==".$wr3_t,$wr3_k,$w3); ?></select></td>
</table>
</form>
</div>
<table id="list2"></table>
<div id="pager2"></div>
<div id="btn_bottom">
※ Total <span id="chk_cnt">0</span> records are selected
</div>
write skin 은
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once($board_skin_path."/_arr.php"); // 여분필드 배열 담긴 파일
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
?>
<link rel="stylesheet" href="<?php echo $board_skin_url; ?>/jquery-ui-1.12.1/jquery-ui.css">
<script type="text/ecmascript" src="<?php echo $board_skin_url; ?>/jquery-ui-1.12.1/jquery-ui.js"></script>
<script>
jQuery(function($){
$.datepicker.regional["ko"] = {
closeText: "닫기",
prevText: "이전달",
nextText: "다음달",
currentText: "오늘",
monthNames: ["1월(JAN)","2월(FEB)","3월(MAR)","4월(APR)","5월(MAY)","6월(JUN)", "7월(JUL)","8월(AUG)","9월(SEP)","10월(OCT)","11월(NOV)","12월(DEC)"],
monthNamesShort: ["1월","2월","3월","4월","5월","6월", "7월","8월","9월","10월","11월","12월"],
dayNames: ["일","월","화","수","목","금","토"],
dayNamesShort: ["일","월","화","수","목","금","토"],
dayNamesMin: ["일","월","화","수","목","금","토"],
weekHeader: "Wk",
dateFormat: "yymmdd",
firstDay: 0,
isRTL: false,
showMonthAfterYear: true,
yearSuffix: ""
};
$.datepicker.setDefaults($.datepicker.regional["ko"]);
});
jQuery.browser = {};
(function () {
jQuery.browser.msie = false;
jQuery.browser.version = 0;
if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
jQuery.browser.msie = true;
jQuery.browser.version = RegExp.$1;
}
})();
</script>
<section id="bo_w">
<!-- 게시물 작성/수정 시작 { -->
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off" style="width:<?php echo $width; ?>">
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
<input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="spt" value="<?php echo $spt ?>">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<?php
$option = '';
$option_hidden = '';
if ($is_notice || $is_html || $is_secret || $is_mail) {
$option = '';
if ($is_notice) {
$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">Notice</label>';
}
if ($is_html) {
if ($is_dhtml_editor) {
$option_hidden .= '<input type="hidden" value="html1" name="html">';
} else {
$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';
}
}
if ($is_secret) {
if ($is_admin || $is_secret==1) {
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
} else {
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
}
}
if ($is_mail) {
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
}
}
echo $option_hidden;
?>
<div class="tbl_frm01 tbl_wrap">
<table>
<tbody>
<?php if ($is_name) { ?>
<tr>
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" size="10" maxlength="20"></td>
</tr>
<?php } ?>
<?php if ($is_password) { ?>
<tr>
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only">필수</strong></label></th>
<td><input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" maxlength="20"></td>
</tr>
<?php } ?>
<?php if ($is_email) { ?>
<tr>
<th scope="row"><label for="wr_email">이메일</label></th>
<td><input type="text" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input email" size="50" maxlength="100"></td>
</tr>
<?php } ?>
<?php if ($is_homepage) { ?>
<tr>
<th scope="row"><label for="wr_homepage">홈페이지</label></th>
<td><input type="text" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input" size="50"></td>
</tr>
<?php } ?>
<?php if ($is_category) { ?>
<?php } ?>
<tr>
<th scope="row"><label for="wr_subject">P/N<strong class="sound_only"></strong></label></th>
<td>
<div id="autosave_wrapper">
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="70" maxlength="255">
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
<?php if($editor_content_js) echo $editor_content_js; ?>
<button type="button" id="btn_autosave" class="btn_frmline">Temperory Saved (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
<div id="autosave_pop">
<strong>Temperory Saved List</strong>
<div><button type="button" class="autosave_close"><img src="<?php echo $board_skin_url; ?>/img/btn_close.gif" alt="닫기"></button></div>
<ul></ul>
<div><button type="button" class="autosave_close"><img src="<?php echo $board_skin_url; ?>/img/btn_close.gif" alt="닫기"></button></div>
</div>
<?php } ?>
</div>
</td>
</tr>
<tr>
<th scope="row">S/N</th>
<td><input type="text" name="wr_2" id="wr_2" value="<?php echo $write['wr_2']; ?>" class="frm_input" /></td>
</tr>
<tr>
<th scope="row">Description</th>
<td><input type="text" name="wr_9" id="wr_9" value="<?php echo $write['wr_9']; ?>" class="frm_input" /></td>
</tr>
<tr>
<th scope="row">Condition</th>
<td><select name="wr_3" id="wr_3" class="frm_input"><?php echo option_str("==Select==".$wr3_t,$wr3_k,$write['wr_3']);?></select></td>
</tr>
<tr>
<th scope="row">Location</th>
<td><select name="wr_1" id="wr_1" class="frm_input"><?php echo option_str("==Select==".$wr1_t,$wr1_k,$write['wr_1']);?></select></td>
</tr>
<tr>
<th scope="row">In Stock Date</th>
<td>
<input type="text" name="wr_10" id="wr_10" value="<?php echo $write['wr_10']; ?>" class="frm_input" /> ~
<input type="text" name="wr_10" id="wr_10" value="<?php echo $write['wr_10']; ?>" class="frm_input" />
</td>
</tr>
<!--
<tr>
<th scope="row">용량</th>
<td><select name="wr_8" id="wr_8" class="frm_input"><?php echo option_str("==선택==".$wr8_t,$wr8_k,$write['wr_8']);?></select></td>
</tr>
-->
<tr>
<th scope="row"><label for="wr_content">Others<strong class="sound_only">필수</strong></label></th>
<td class="wr_content">
<?php if($write_min || $write_max) { ?>
<!-- 최소/최대 글자 수 사용 시 -->
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
<?php } ?>
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
<?php if($write_min || $write_max) { ?>
<!-- 최소/최대 글자 수 사용 시 -->
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
<?php } ?>
</td>
</tr>
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
<tr>
<th scope="row"><label for="wr_link<?php echo $i ?>">Link #<?php echo $i ?></label></th>
<td><input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input" size="50"></td>
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">File #<?php echo $i+1 ?></th>
<td>
<input type="file" name="bf_file[]" title="File <?php echo $i+1 ?> : Size <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input">
<?php if ($is_file_content) { ?>
<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">
<?php } ?>
<?php if($w == 'u' && $file[$i]['file']) { ?>
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> Delete</label>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($is_guest) { //자동등록방지 ?>
<tr>
<th scope="row">자동등록방지</th>
<td>
<?php echo $captcha_html ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="btn_confirm write_div">
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel btn">Cancel</a>
<input type="submit" id="btn_submit" accesskey="s" class="btn_submit btn" value="Submit" >
</div>
</form>
<script>
$(document).ready(function() {
/* 달력 끝 */
$(function(){
$("#wr_10").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-10:c+10", minDate: "", maxDate: "" });
});
/* 달력 끝 */
});
<?php if($write_min || $write_max) { ?>
// 글자수 제한
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
check_byte("wr_content", "char_count");
$(function() {
$("#wr_content").on("keyup", function() {
check_byte("wr_content", "char_count");
});
});
<?php } ?>
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
if (result)
obj.value = "html2";
else
obj.value = "html1";
}
else
obj.value = "";
}
function fwrite_submit(f)
{
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
var subject = "";
var content = "";
$.ajax({
url: g5_bbs_url+"/ajax.filter.php",
type: "POST",
data: {
"subject": f.wr_subject.value,
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (subject) {
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
f.wr_subject.focus();
return false;
}
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if (typeof(ed_wr_content) != "undefined")
ed_wr_content.returnFalse();
else
f.wr_content.focus();
return false;
}
if (document.getElementById("char_count")) {
if (char_min > 0 || char_max > 0) {
var cnt = parseInt(check_byte("wr_content", "char_count"));
if (char_min > 0 && char_min > cnt) {
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
}
else if (char_max > 0 && char_max < cnt) {
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
}
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
document.getElementById("btn_submit").disabled = "disabled";
return true;
}
</script>
</section>
<!-- } 게시물 작성/수정 끝 -->
view skin 은
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
include_once($board_skin_path."/_arr.php"); // 여분필드 배열 담긴 파일
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
?>
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
<!-- 게시물 읽기 시작 { -->
<div id="bo_v_table"><?php echo $board['bo_subject']; ?></div>
<article id="bo_v" style="width:<?php echo $width; ?>">
<header>
<h1 id="bo_v_title">
<?php
if ($category_name) echo $view['ca_name'].' | '; // 분류 출력 끝
echo cut_str(get_text($view['wr_subject']), 70); // 글제목 출력
?>
</h1>
</header>
<section id="bo_v_info">
<h2>페이지 정보</h2>
ID <strong><?php echo $view['name'] ?><?php if ($is_ip_view) { echo " ($ip)"; } ?></strong>
<span class="sound_only"></span>Issued Date <strong><?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>
</section>
<?php
if ($view['file']['count']) {
$cnt = 0;
for ($i=0; $i<count($view['file']); $i++) {
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
$cnt++;
}
}
?>
<!-- 게시물 상단 버튼 시작 { -->
<div id="bo_v_top">
<?php
ob_start();
?>
<ul class="bo_v_com">
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>" class="btn_b01 btn">Modifiy</a></li><?php } ?>
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" class="btn_b01 btn" onclick="del(this.href); return false;">Delete</a></li><?php } ?>
<?php if ($copy_href) { ?><li><a href="<?php echo $copy_href ?>" class="btn_admin btn" onclick="board_move(this.href); return false;">Copy</a></li><?php } ?>
<?php if ($move_href) { ?><li><a href="<?php echo $move_href ?>" class="btn_admin btn" onclick="board_move(this.href); return false;">Move</a></li><?php } ?>
<li><a href="<?php echo $list_href ?>" class="btn_b01 btn">List</a></li>
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02 btn">New</a></li><?php } ?>
</ul>
<?php
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</div>
<!-- } 게시물 상단 버튼 끝 -->
<div id="frm_list">
<table>
<colgroup>
<col width="8%" />
<col width="17%" />
<col width="8%" />
<col width="17%" />
<col width="8%" />
<col width="17%" />
<col width="8%" />
<col width="17%" />
</colgroup>
<tr>
<th>이름</th>
<td><?php echo $view['wr_subject']; ?></td>
<th>사번</th>
<td><?php echo $view['wr_2']; ?></td>
<th>창고입고일</th>
<td><?php echo $view['wr_10']; ?></td>
<th>창고입고일</th>
<td><?php echo $view['wr_10']; ?></td>
<th>Status</th>
<td><?php echo $WR3[$view['wr_3']]; ?></td>
</tr>
<tr>
<th>Description</th>
<td><?php echo $view['wr_9']; ?></td>
<th>Location</th>
<td><?php echo $WR1[$view['wr_1']]; ?></td>
<th>In Stock Date</th>
<td><?php echo $view['wr_10']; ?></td>
</table>
</div>
<section id="bo_v_atc">
<h2 id="bo_v_atc_title">본문</h2>
<?php
// 파일 출력
$v_img_count = count($view['file']);
if($v_img_count) {
echo "<div id=\"bo_v_img\">\n";
for ($i=0; $i<=count($view['file']); $i++) {
if ($view['file'][$i]['view']) {
//echo $view['file'][$i]['view'];
echo get_view_thumbnail($view['file'][$i]['view']);
}
}
echo "</div>\n";
}
?>
<!-- 본문 내용 시작 { -->
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
<?php//echo $view['rich_content']; // view_image($view, '0', '') 과 같은 코드를 사용할 경우 ?>
<!-- } 본문 내용 끝 -->
<?php if($cnt) { ?>
<!-- 첨부파일 시작 { -->
<section id="bo_v_file">
<h2>File</h2>
<ul>
<?php
// 가변 파일
for ($i=0; $i<count($view['file']); $i++) {
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
?>
<li>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<img src="<?php echo $board_skin_url ?>/img/icon_file.gif" alt="첨부">
<strong><?php echo $view['file'][$i]['source'] ?></strong>
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
</a>
<span>DATE : <?php echo $view['file'][$i]['datetime'] ?></span>
</li>
<?php
}
}
?>
</ul>
</section>
<!-- } 첨부파일 끝 -->
<?php } ?>
<?php
if ($view['link']) {
?>
<!-- 관련링크 시작 { -->
<section id="bo_v_link">
<h2>Link</h2>
<ul>
<?php
// 링크
$cnt = 0;
for ($i=1; $i<=count($view['link']); $i++) {
if ($view['link'][$i]) {
$cnt++;
$link = cut_str($view['link'][$i], 70);
?>
<li>
<a href="<?php echo $view['link_href'][$i] ?>" target="_blank">
<img src="<?php echo $board_skin_url ?>/img/icon_link.gif" alt="관련링크">
<strong><?php echo $link ?></strong>
</a>
</li>
<?php
}
}
?>
</ul>
</section>
<!-- } 관련링크 끝 -->
<?php } ?>
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>
</section>
<?php
include_once(G5_SNS_PATH."/view.sns.skin.php");
?>
<?php
// 코멘트 입출력
include_once(G5_BBS_PATH.'/view_comment.php');
?>
<!-- 링크 버튼 시작 { -->
<div id="bo_v_bot">
<?php echo $link_buttons ?>
</div>
<!-- } 링크 버튼 끝 -->
</article>
<!-- } 게시판 읽기 끝 -->
<script>
<?php if ($board['bo_download_point'] < 0) { ?>
$(function() {
$("a.view_file_download").click(function() {
if(!g5_is_member) {
alert("다운로드 권한이 없습니다.\n회원이시라면 로그인 후 이용해 보십시오.");
return false;
}
var msg = "파일을 다운로드 하시면 포인트가 차감(<?php echo number_format($board['bo_download_point']) ?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?";
if(confirm(msg)) {
var href = $(this).attr("href")+"&js=on";
$(this).attr("href", href);
return true;
} else {
return false;
}
});
});
<?php } ?>
function board_move(href)
{
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
}
</script>
<script>
$(function() {
$("a.view_image").click(function() {
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
// 추천, 비추천
$("#good_button, #nogood_button").click(function() {
var $tx;
if(this.id == "good_button")
$tx = $("#bo_v_act_good");
else
$tx = $("#bo_v_act_nogood");
excute_good(this.href, $(this), $tx);
return false;
});
// 이미지 리사이즈
$("#bo_v_atc").viewimageresize();
});
function excute_good(href, $el, $tx)
{
$.post(
href,
{ js: "on" },
function(data) {
if(data.error) {
alert(data.error);
return false;
}
if(data.count) {
$el.find("strong").text(number_format(String(data.count)));
if($tx.attr("id").search("nogood") > -1) {
$tx.text("이 글을 비추천하셨습니다.");
$tx.fadeIn(200).delay(2500).fadeOut(200);
} else {
$tx.text("이 글을 추천하셨습니다.");
$tx.fadeIn(200).delay(2500).fadeOut(200);
}
}
}, "json"
);
}
</script>
<!-- } 게시글 읽기 끝 -->
입니다... ㅠㅠ 부탁드릴게요
답변 3
입고일이 왜 두 개 있는지 모르겠네요.
<th>창고입고일</th>
<td><?php echo $view['wr_10']; ?></td>
<th>창고입고일</th>
<td><?php echo $view['wr_10']; ?></td>
"/lib/common.lib.php" 에 보시면
// 검색 구문을 얻는다.
function get_sql_search($search_ca_name, $search_field, $search_text, $search_operator='and')
함수가 있습니다.
sfl이 어떤 값이냐에 따라서 sql-where 조건을 만드실 수 있습니다.
wr_10이 필요하기 때문에
global $g5, $wr_10; //추가하시고
조건을 만들어 보세요.
추가할 sfl은 switch()로 구분하기 때문에 꼭 컬럼 명일 필요는 없습니다.
"/lib/common.lib.php"
function get_sql_search($search_ca_name, $search_field, $search_text, $search_operator='and'){
...
switch ($field[$k]) {
case "wr_10" :
$str .= " wr_10 = '$wr_10' and wr_name
='$wr_name
' and 교육명_컬럼_이름='$교육명_input_name' ";
break;
case "mb_id" :
case "wr_name" :
$str .= " $field[$k] = '$s[$i]' ";
break;
이런식 입니다.