리스트에서 첨부파일을 다운받게하고싶은데.. 정보
리스트에서 첨부파일을 다운받게하고싶은데..첨부파일
본문
리스트에서 첨부파일을 다운받게 하려고 팁을 찾는중
<?
$ss_name = "ss_view_{$bo_table}_{$list[$i][wr_id]}";
session_register($ss_name);
$$ss_name = $HTTP_SESSION_VARS[$ss_name] = TRUE;
if($list[$i][file][0]) {
$down_link0 = "download.php?bo_table=" . $bo_table . "&wr_id=" . $list[$i][wr_id] . "&no=0";
echo "<a href='$down_link0'>";
echo "1번파일링크";
echo "</a>";
}
if($list[$i][file][1]) {
$down_link1 = "download.php?bo_table=" . $bo_table . "&wr_id=" . $list[$i][wr_id] . "&no=1";
echo "<a href='$down_link1'>";
echo "2번파일링크";
echo "</a>";
}
요런 소스를 찾았습니다.
그런데 제 스킨에 대입하니 게시판이 뜨지를 않네요 ㅠㅠㅠ 어떤식으로 넣어야 하나요..
아니면 제가 코드를 잘 못 입력하였나요.
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0" border="0"><tr>
<td valign="top" width=20%><? include_once("$g4[path]/leftmenu/leftmenu.php");?> </td>
<td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<div class="board_top">
<div style="float:right;">
<img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
<span style="color:#888888; font-weight:bold;">Total <?=number_format($total_count)?></span>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a><?}?>
</div>
</div>
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table width=100% cellpadding=0 cellspacing=0>
<tr><td colspan='<?=$mod?>' height=2></td></tr>
<tr><td colspan='<?=$mod?>' height=2 bgcolor=#B0ADF5></td></tr>
<tr>
<?
for ($i=0; $i<count($list); $i++) {
if ($i && $i%$mod==0)
echo "</tr><tr>";
$style = "";
$subject = "<span $style>{$list[$i][subject]}</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";
$list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
$list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
$list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
echo "<td width='50%' valign=top style='word-break:break-all; padding:10px;'>";
echo "<table align=left border='0'>";
echo "<a href='{$list[$i][href]}'><font size=3 color=00000><b>$subject</b></font></a>{$comment_cnt}";
echo "<tr><td class=lh height=1 colspan='2' bgcolor=cccccc>
</td></tr>";
echo "<tr><td width='120' align=left valign=top><div style='float:left; border:0px solid #ccc; background:#fff; padding:10px; font-size:0; line-height:0;'>".makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_1], $board[bo_2], cut_str($list[$i][subject],20))."</div></td>";
echo "<td align=left width='230' style='font-size:12px;'>".get_text($list[$i][wr_content],'...')."</td></tr>";
echo "<tr><td class=lh>";
if ($is_checkbox) echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'> ";
//echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
//echo " " . $list[$i][icon_hot];
//echo " " . $list[$i][icon_secret];
echo "</td></tr>";
제목쪽에 넣고 싶은데 어느방식으로 소스를 꾸려야할가요
일단 리스트페이지를 파일첨부하겠습니다.
도와주세요
<?
$ss_name = "ss_view_{$bo_table}_{$list[$i][wr_id]}";
session_register($ss_name);
$$ss_name = $HTTP_SESSION_VARS[$ss_name] = TRUE;
if($list[$i][file][0]) {
$down_link0 = "download.php?bo_table=" . $bo_table . "&wr_id=" . $list[$i][wr_id] . "&no=0";
echo "<a href='$down_link0'>";
echo "1번파일링크";
echo "</a>";
}
if($list[$i][file][1]) {
$down_link1 = "download.php?bo_table=" . $bo_table . "&wr_id=" . $list[$i][wr_id] . "&no=1";
echo "<a href='$down_link1'>";
echo "2번파일링크";
echo "</a>";
}
요런 소스를 찾았습니다.
그런데 제 스킨에 대입하니 게시판이 뜨지를 않네요 ㅠㅠㅠ 어떤식으로 넣어야 하나요..
아니면 제가 코드를 잘 못 입력하였나요.
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0" border="0"><tr>
<td valign="top" width=20%><? include_once("$g4[path]/leftmenu/leftmenu.php");?> </td>
<td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<div class="board_top">
<div style="float:right;">
<img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
<span style="color:#888888; font-weight:bold;">Total <?=number_format($total_count)?></span>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a><?}?>
</div>
</div>
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table width=100% cellpadding=0 cellspacing=0>
<tr><td colspan='<?=$mod?>' height=2></td></tr>
<tr><td colspan='<?=$mod?>' height=2 bgcolor=#B0ADF5></td></tr>
<tr>
<?
for ($i=0; $i<count($list); $i++) {
if ($i && $i%$mod==0)
echo "</tr><tr>";
$style = "";
$subject = "<span $style>{$list[$i][subject]}</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";
$list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
$list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
$list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
echo "<td width='50%' valign=top style='word-break:break-all; padding:10px;'>";
echo "<table align=left border='0'>";
echo "<a href='{$list[$i][href]}'><font size=3 color=00000><b>$subject</b></font></a>{$comment_cnt}";
echo "<tr><td class=lh height=1 colspan='2' bgcolor=cccccc>
</td></tr>";
echo "<tr><td width='120' align=left valign=top><div style='float:left; border:0px solid #ccc; background:#fff; padding:10px; font-size:0; line-height:0;'>".makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_1], $board[bo_2], cut_str($list[$i][subject],20))."</div></td>";
echo "<td align=left width='230' style='font-size:12px;'>".get_text($list[$i][wr_content],'...')."</td></tr>";
echo "<tr><td class=lh>";
if ($is_checkbox) echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'> ";
//echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
//echo " " . $list[$i][icon_hot];
//echo " " . $list[$i][icon_secret];
echo "</td></tr>";
제목쪽에 넣고 싶은데 어느방식으로 소스를 꾸려야할가요
일단 리스트페이지를 파일첨부하겠습니다.
도와주세요
댓글 전체

답변감사합니다. ㅠㅠ 저도 다른스킨들 참조해서 하는데
제소스에는 저 방법이 안먹히네요..echo 요거떄문에 그런거같은데..;.
제소스에는 저 방법이 안먹히네요..echo 요거떄문에 그런거같은데..;.