경로 정리 - 큰일었어요!!!
This commit is contained in:
@ -274,10 +274,10 @@ function get_file($bo_table, $wr_id)
|
||||
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]['href'] = G4_BBS_URL."/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]['path'] = G4_DATA_URL.'/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']"));
|
||||
@ -398,9 +398,9 @@ function get_list($write_row, $board, $skin_path, $subject_len=40)
|
||||
$list['icon_link'] = '<img src="'.$skin_path.'/img/icon_link.gif" alt="관련링크">';
|
||||
|
||||
// 분류명 링크
|
||||
$list['ca_name_href'] = $g4['bbs_path'].'/board.php?bo_table='.$board['bo_table'].'&sca='.urlencode($list['ca_name']);
|
||||
$list['ca_name_href'] = G4_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&sca='.urlencode($list['ca_name']);
|
||||
|
||||
$list['href'] = $g4['bbs_path'].'/board.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].$qstr;
|
||||
$list['href'] = G4_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].$qstr;
|
||||
$list['comment_href'] = $list['href'];
|
||||
|
||||
$list['icon_new'] = '';
|
||||
@ -416,10 +416,9 @@ function get_list($write_row, $board, $skin_path, $subject_len=40)
|
||||
$list['icon_secret'] = '<img src="'.$skin_path.'/img/icon_secret.gif" alt="비밀글">';
|
||||
|
||||
// 링크
|
||||
for ($i=1; $i<=$g4['link_count']; $i++)
|
||||
{
|
||||
for ($i=1; $i<=G4_LINK_COUNT; $i++) {
|
||||
$list['link'][$i] = set_http(get_text($list["wr_link{$i}"]));
|
||||
$list['link_href'][$i] = $g4['bbs_path'].'/link.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].'&no='.$i.$qstr;
|
||||
$list['link_href'][$i] = G4_BBS_URL.'/link.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].'&no='.$i.$qstr;
|
||||
$list['link_hit'][$i] = (int)$list["wr_link{$i}_hit"];
|
||||
}
|
||||
|
||||
@ -835,19 +834,6 @@ function get_group_select($name, $selected='', $event='')
|
||||
}
|
||||
|
||||
|
||||
// 스킨디렉토리를 SELECT 형식으로 얻음
|
||||
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||
{
|
||||
$skins = get_skin_dir($skin_gubun);
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i=0; $i<count($skins); $i++) {
|
||||
$str .= option_selected($skins[$i], $selected);
|
||||
}
|
||||
$str .= "</select>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
function option_selected($value, $selected, $text='')
|
||||
{
|
||||
if (!$text) $text = $value;
|
||||
@ -1031,7 +1017,7 @@ function view_file_link($file, $width, $height, $content='')
|
||||
if (preg_match("/\.({$config['cf_image_extension']})$/i", $file))
|
||||
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
|
||||
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
|
||||
return "<img src='{$g4['path']}/data/file/{$board['bo_table']}/".urlencode($file)."' onclick='image_window(this);' alt='{$content}'>";
|
||||
return "<img src='".G4_DATA_URL."/file/{$board['bo_table']}/".urlencode($file)."' onclick='image_window(this);' alt='{$content}'>";
|
||||
/*
|
||||
// 110106 : FLASH XSS 공격으로 인하여 코드 자체를 막음
|
||||
else if (preg_match("/\.($config['cf_flash_extension'])$/i", $file))
|
||||
|
||||
@ -12,7 +12,7 @@ function connect($skin_dir='')
|
||||
|
||||
if (!$skin_dir)
|
||||
$skin_dir = $config['cf_connect_skin'];
|
||||
$connect_skin_path = skin_path().'/connect/'.$skin_dir;
|
||||
$connect_skin_path = G4_SKIN_PATH.'/connect/'.$skin_dir;
|
||||
|
||||
ob_start();
|
||||
include_once ($connect_skin_path.'/connect.skin.php');
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
// 로그를 파일에 쓴다
|
||||
function write_log($file, $log) {
|
||||
$fp = fopen($file, "a+");
|
||||
|
||||
@ -7,9 +7,10 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40)
|
||||
global $g4;
|
||||
|
||||
if (!$skin_dir) $skin_dir = 'basic';
|
||||
$latest_skin_path = skin_path().'/latest/'.$skin_dir;
|
||||
$latest_skin_path = G4_SKIN_PATH.'/latest/'.$skin_dir;
|
||||
$latest_skin_url = G4_SKIN_URL.'/latest/'.$skin_dir;
|
||||
|
||||
$cache_file = $g4['cache_latest_path']."/{$bo_table}_{$skin_dir}_{$rows}_{$subject_len}.php";
|
||||
$cache_file = G4_CACHE_PATH."/latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}.php";
|
||||
//if (!file_exists($cache_file)) {
|
||||
if (1) {
|
||||
$list = array();
|
||||
|
||||
@ -13,7 +13,7 @@ function outlogin($skin_dir='basic')
|
||||
$point = number_format($member['mb_point']);
|
||||
}
|
||||
|
||||
$outlogin_skin_path = skin_path().'/outlogin/'.$skin_dir;
|
||||
$outlogin_skin_path = G4_SKIN_PATH.'/outlogin/'.$skin_dir;
|
||||
|
||||
// 읽지 않은 쪽지가 있다면
|
||||
if ($is_member) {
|
||||
|
||||
@ -14,7 +14,7 @@ function poll($skin_dir='basic', $po_id=false)
|
||||
}
|
||||
|
||||
ob_start();
|
||||
$poll_skin_path = skin_path().'/poll/'.$skin_dir;
|
||||
$poll_skin_path = G4_SKIN_PATH.'/poll/'.$skin_dir;
|
||||
include_once ($poll_skin_path.'/poll.skin.php');
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
@ -12,21 +12,16 @@ function popular($skin_dir='basic', $pop_cnt=7, $date_cnt=3)
|
||||
if (!$skin_dir) $skin_dir = 'basic';
|
||||
|
||||
$date_gap = date("Y-m-d", $g4['server_time'] - ($date_cnt * 86400));
|
||||
$sql = " select pp_word, count(*) as cnt from {$g4['popular_table']}
|
||||
where pp_date between '$date_gap' and '{$g4['time_ymd']}'
|
||||
group by pp_word
|
||||
order by cnt desc, pp_word
|
||||
limit 0, $pop_cnt ";
|
||||
$sql = " select pp_word, count(*) as cnt from {$g4['popular_table']} where pp_date between '$date_gap' and '{$g4['time_ymd']}' group by pp_word order by cnt desc, pp_word limit 0, $pop_cnt ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$list[$i] = $row;
|
||||
// 스크립트등의 실행금지
|
||||
$list[$i]['pp_word'] = get_text($list[$i]['pp_word']);
|
||||
}
|
||||
|
||||
ob_start();
|
||||
$popular_skin_path = skin_path().'/popular/'.$skin_dir;
|
||||
$popular_skin_path = G4_SKIN_PATH.'/popular/'.$skin_dir;
|
||||
include_once ($popular_skin_path.'/popular.skin.php');
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
@ -19,7 +19,7 @@ function visit($skin_dir='basic')
|
||||
settype($visit[3], "integer");
|
||||
|
||||
ob_start();
|
||||
$visit_skin_path = skin_path().'/visit/'.$skin_dir;
|
||||
$visit_skin_path = G4_SKIN_PATH.'/visit/'.$skin_dir;
|
||||
include_once ($visit_skin_path.'/visit.skin.php');
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
Reference in New Issue
Block a user