첨부파일 역순으로 나오는거 for문좀 봐주심 감사하겠습니다. 정보
첨부파일 역순으로 나오는거 for문좀 봐주심 감사하겠습니다.첨부파일
본문
검색해보니 첨부파일 역순으로 나오게하는 뭐가 common.lib.php에서 하면 된다고 찾았는데..
아래 소스를 어찌 수정해야 할지 모르겠어서요;;; 한번만 봐주심 감사하겠습니당~~
오늘도 수고하세요 ^^
혹시 요 아래부분말고 다른데도 수정해야하나용??
function get_file($bo_table, $wr_id)
{
global $g4, $qstr;
$file["count"] = 0;
$sql = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$no = $row[bf_no];
$file[$no][href] = "./download.php?bo_table=$bo_table&wr_id=$wr_id&no=$no" . $qstr;
$file[$no][download] = $row[bf_download];
// 4.00.11 - 파일 path 추가
$file[$no][path] = "$g4[path]/data/file/$bo_table";
//$file[$no][size] = get_filesize("{$file[$no][path]}/$row[bf_file]");
$file[$no][size] = get_filesize($row[bf_filesize]);
//$file[$no][datetime] = date("Y-m-d H:i:s", @filemtime("$g4[path]/data/file/$bo_table/$row[bf_file]"));
$file[$no][datetime] = $row[bf_datetime];
$file[$no][source] = addslashes($row[bf_source]);
$file[$no][bf_content] = $row[bf_content];
$file[$no][content] = get_text($row[bf_content]);
//$file[$no][view] = view_file_link($row[bf_file], $file[$no][content]);
$file[$no][view] = view_file_link($row[bf_file], $row[bf_width], $row[bf_height], $file[$no][content]);
$file[$no][file] = $row[bf_file];
// prosper 님 제안
//$file[$no][imgsize] = @getimagesize("{$file[$no][path]}/$row[bf_file]");
$file[$no][image_width] = $row[bf_width] ? $row[bf_width] : 640;
$file[$no][image_height] = $row[bf_height] ? $row[bf_height] : 480;
$file[$no][image_type] = $row[bf_type];
$file["count"]++;
}
return $file;
}
아래 소스를 어찌 수정해야 할지 모르겠어서요;;; 한번만 봐주심 감사하겠습니당~~
오늘도 수고하세요 ^^
혹시 요 아래부분말고 다른데도 수정해야하나용??
function get_file($bo_table, $wr_id)
{
global $g4, $qstr;
$file["count"] = 0;
$sql = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$no = $row[bf_no];
$file[$no][href] = "./download.php?bo_table=$bo_table&wr_id=$wr_id&no=$no" . $qstr;
$file[$no][download] = $row[bf_download];
// 4.00.11 - 파일 path 추가
$file[$no][path] = "$g4[path]/data/file/$bo_table";
//$file[$no][size] = get_filesize("{$file[$no][path]}/$row[bf_file]");
$file[$no][size] = get_filesize($row[bf_filesize]);
//$file[$no][datetime] = date("Y-m-d H:i:s", @filemtime("$g4[path]/data/file/$bo_table/$row[bf_file]"));
$file[$no][datetime] = $row[bf_datetime];
$file[$no][source] = addslashes($row[bf_source]);
$file[$no][bf_content] = $row[bf_content];
$file[$no][content] = get_text($row[bf_content]);
//$file[$no][view] = view_file_link($row[bf_file], $file[$no][content]);
$file[$no][view] = view_file_link($row[bf_file], $row[bf_width], $row[bf_height], $file[$no][content]);
$file[$no][file] = $row[bf_file];
// prosper 님 제안
//$file[$no][imgsize] = @getimagesize("{$file[$no][path]}/$row[bf_file]");
$file[$no][image_width] = $row[bf_width] ? $row[bf_width] : 640;
$file[$no][image_height] = $row[bf_height] ? $row[bf_height] : 480;
$file[$no][image_type] = $row[bf_type];
$file["count"]++;
}
return $file;
}
댓글 전체

$sql = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no DESC";
앗 감사해용..
http://ar-studio.co.kr/bbs/bbs/board.php?bo_table=work&wr_id=49
여기에 적용하려고 한건데..제가 밑에 올린거 한번만 봐주실수 있어요? ㅠㅠ
http://ar-studio.co.kr/bbs/bbs/board.php?bo_table=work&wr_id=49
여기에 적용하려고 한건데..제가 밑에 올린거 한번만 봐주실수 있어요? ㅠㅠ
http://sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=264242
요거 한번만 봐주셔용 도와주셈 ㅠㅠ
요거 한번만 봐주셔용 도와주셈 ㅠㅠ

특정게시판만 하실때에는
get_file() 함수 윗부분에
get_file() 함수 윗부분에
function get_file($bo_table, $wr_id)
{
global $g4, $qstr;
if($bo_table == "원하는게시판이름"){
$order = "DESC";
}
$file["count"] = 0;
$sql = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no {$order} ";

이렇게 하면 view페이지도 같이 적용될듯한데요 해보시고 안되면 알려주세요
앗 아니되네용;;; ㅠ view페이지에서 직접 봐주실수 있으세용? view페이지에소~ ㅠ

view페이지에서 아래 이미지 1 2 3 요기는 정상인거고 상단에 큰이미지가 틀린거죠?
네네 상단에 큰 이미지가 처음에 1번이 나와야했음 해서유..
어라..?
시텍스하이라이터 어떻게 사용하나요?
시텍스하이라이터 어떻게 사용하나요?