5.4 버전 내용 적용
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
include_once(dirname(__FILE__) .'/pbkdf2.compat.php');
|
||||
|
||||
/*************************************************************************
|
||||
**
|
||||
** 일반 함수 모음
|
||||
@ -19,7 +21,8 @@ function get_microtime()
|
||||
function get_paging($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
{
|
||||
//$url = preg_replace('#&page=[0-9]*(&page=)$#', '$1', $url);
|
||||
$url = preg_replace('#&page=[0-9]*#', '', $url) . '&page=';
|
||||
$url = preg_replace('#(&)?page=[0-9]*#', '', $url);
|
||||
$url .= substr($url, -1) === '?' ? 'page=' : '&page=';
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
@ -152,6 +155,8 @@ function alert($msg='', $url='', $error=true, $post=false)
|
||||
{
|
||||
global $g5, $config, $member;
|
||||
global $is_admin;
|
||||
|
||||
run_event('alert', $msg, $url, $error, $post);
|
||||
|
||||
$msg = $msg ? strip_tags($msg, '<br>') : '올바른 방법으로 이용해 주십시오.';
|
||||
|
||||
@ -169,6 +174,8 @@ function alert_close($msg, $error=true)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
run_event('alert_close', $msg, $error);
|
||||
|
||||
$msg = strip_tags($msg, '<br>');
|
||||
|
||||
$header = '';
|
||||
@ -245,7 +252,7 @@ function url_auto_link($str)
|
||||
$str = preg_replace("/\t_gt_\t/", ">", $str);
|
||||
*/
|
||||
|
||||
return $str;
|
||||
return run_replace('url_auto_link', $str);
|
||||
}
|
||||
|
||||
|
||||
@ -304,6 +311,9 @@ function get_file($bo_table, $wr_id)
|
||||
$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[$no]['bf_fileurl'] = $row['bf_fileurl'];
|
||||
$file[$no]['bf_thumburl'] = $row['bf_thumburl'];
|
||||
$file[$no]['bf_storage'] = $row['bf_storage'];
|
||||
$file['count']++;
|
||||
}
|
||||
|
||||
@ -336,11 +346,13 @@ function get_dirsize($dir)
|
||||
// 게시물 정보($write_row)를 출력하기 위하여 $list로 가공된 정보를 복사 및 가공
|
||||
function get_list($write_row, $board, $skin_url, $subject_len=40)
|
||||
{
|
||||
global $g5, $config;
|
||||
global $g5, $config, $g5_object;
|
||||
global $qstr, $page;
|
||||
|
||||
//$t = get_microtime();
|
||||
|
||||
$g5_object->set('bbs', $write_row['wr_id'], $write_row, $board['bo_table']);
|
||||
|
||||
// 배열전체를 복사
|
||||
$list = $write_row;
|
||||
unset($write_row);
|
||||
@ -353,6 +365,10 @@ function get_list($write_row, $board, $skin_url, $subject_len=40)
|
||||
else
|
||||
$list['subject'] = conv_subject($list['wr_subject'], $board['bo_subject_len'], '…');
|
||||
|
||||
if( ! (isset($list['wr_seo_title']) && $list['wr_seo_title']) && $list['wr_id'] ){
|
||||
seo_title_update(get_write_table_name($board['bo_table']), $list['wr_id'], 'bbs');
|
||||
}
|
||||
|
||||
// 목록에서 내용 미리보기 사용한 게시판만 내용을 변환함 (속도 향상) : kkal3(커피)님께서 알려주셨습니다.
|
||||
if ($board['bo_use_list_content'])
|
||||
{
|
||||
@ -406,9 +422,9 @@ function get_list($write_row, $board, $skin_url, $subject_len=40)
|
||||
$list['icon_link'] = '<i class="fa fa-link" aria-hidden="true"></i> ';
|
||||
|
||||
// 분류명 링크
|
||||
$list['ca_name_href'] = G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&sca='.urlencode($list['ca_name']);
|
||||
$list['ca_name_href'] = get_pretty_url($board['bo_table'], '', 'sca='.urlencode($list['ca_name']));
|
||||
|
||||
$list['href'] = G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].$qstr;
|
||||
$list['href'] = get_pretty_url($board['bo_table'], $list['wr_id'], $qstr);
|
||||
$list['comment_href'] = $list['href'];
|
||||
|
||||
$list['icon_new'] = '';
|
||||
@ -683,13 +699,24 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 게시판 테이블에서 하나의 행을 읽음
|
||||
function get_write($write_table, $wr_id)
|
||||
function get_write($write_table, $wr_id, $is_cache=false)
|
||||
{
|
||||
return sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
|
||||
}
|
||||
global $g5, $g5_object;
|
||||
|
||||
$wr_bo_table = preg_replace('/^'.preg_quote($g5['write_prefix']).'/i', '', $write_table);
|
||||
|
||||
$write = $g5_object->get('bbs', $wr_id, $wr_bo_table);
|
||||
|
||||
if( !$write || $is_cache == false ){
|
||||
$sql = " select * from {$write_table} where wr_id = '{$wr_id}' ";
|
||||
$write = sql_fetch($sql);
|
||||
|
||||
$g5_object->set('bbs', $wr_id, $write, $wr_bo_table);
|
||||
}
|
||||
|
||||
return $write;
|
||||
}
|
||||
|
||||
// 게시판의 다음글 번호를 얻는다.
|
||||
function get_next_num($table)
|
||||
@ -703,22 +730,47 @@ function get_next_num($table)
|
||||
|
||||
|
||||
// 그룹 설정 테이블에서 하나의 행을 읽음
|
||||
function get_group($gr_id)
|
||||
function get_group($gr_id, $is_cache=false)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
return sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||
static $cache = array();
|
||||
|
||||
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $gr_id);
|
||||
$key = md5($gr_id);
|
||||
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['group_table']} where gr_id = '$gr_id' ";
|
||||
|
||||
$cache[$key] = run_replace('get_group', sql_fetch($sql), $gr_id, $is_cache);
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
|
||||
// 회원 정보를 얻는다.
|
||||
function get_member($mb_id, $fields='*')
|
||||
function get_member($mb_id, $fields='*', $is_cache=false)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$mb_id = preg_replace("/[^0-9a-z_]+/i", "", $mb_id);
|
||||
|
||||
return sql_fetch(" select $fields from {$g5['member_table']} where mb_id = TRIM('$mb_id') ");
|
||||
static $cache = array();
|
||||
|
||||
$key = md5($fields);
|
||||
|
||||
if( $is_cache && isset($cache[$mb_id]) && isset($cache[$mb_id][$key]) ){
|
||||
return $cache[$mb_id][$key];
|
||||
}
|
||||
|
||||
$sql = " select $fields from {$g5['member_table']} where mb_id = TRIM('$mb_id') ";
|
||||
|
||||
$cache[$mb_id][$key] = run_replace('get_member', sql_fetch($sql), $mb_id, $fields, $is_cache);
|
||||
|
||||
return $cache[$mb_id][$key];
|
||||
}
|
||||
|
||||
|
||||
@ -797,12 +849,19 @@ function is_admin($mb_id)
|
||||
{
|
||||
global $config, $group, $board;
|
||||
|
||||
if (!$mb_id) return;
|
||||
if (!$mb_id) return '';
|
||||
|
||||
if ($config['cf_admin'] == $mb_id) return 'super';
|
||||
if (isset($group['gr_admin']) && ($group['gr_admin'] == $mb_id)) return 'group';
|
||||
if (isset($board['bo_admin']) && ($board['bo_admin'] == $mb_id)) return 'board';
|
||||
return '';
|
||||
$is_authority = '';
|
||||
|
||||
if ($config['cf_admin'] == $mb_id){
|
||||
$is_authority = 'super';
|
||||
} else if (isset($group['gr_admin']) && ($group['gr_admin'] == $mb_id)){
|
||||
$is_authority = 'group';
|
||||
} else if (isset($board['bo_admin']) && ($board['bo_admin'] == $mb_id)){
|
||||
$is_authority = 'board';
|
||||
}
|
||||
|
||||
return run_replace('is_admin', $is_authority, $mb_id);
|
||||
}
|
||||
|
||||
|
||||
@ -1216,8 +1275,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
global $g5;
|
||||
global $bo_table, $sca, $is_admin, $member;
|
||||
|
||||
$email_enc = new str_encrypt();
|
||||
$email = $email_enc->encrypt($email);
|
||||
$email = get_string_encrypt($email);
|
||||
$homepage = set_http(clean_xss_tags($homepage));
|
||||
|
||||
$name = get_text($name, 0, true);
|
||||
@ -1225,18 +1283,20 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
$homepage = get_text($homepage);
|
||||
|
||||
$tmp_name = "";
|
||||
$en_mb_id = $mb_id;
|
||||
|
||||
if ($mb_id) {
|
||||
//$tmp_name = "<a href=\"".G5_BBS_URL."/profile.php?mb_id=".$mb_id."\" class=\"sv_member\" title=\"$name 자기소개\" rel="nofollow" target=\"_blank\" onclick=\"return false;\">$name</a>";
|
||||
$tmp_name = '<a href="'.G5_BBS_URL.'/profile.php?mb_id='.$mb_id.'" class="sv_member" title="'.$name.' 자기소개" target="_blank" rel="nofollow" onclick="return false;">';
|
||||
|
||||
if ($config['cf_use_member_icon']) {
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
|
||||
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb_id).'.gif';
|
||||
|
||||
if (file_exists($icon_file)) {
|
||||
$width = $config['cf_member_icon_width'];
|
||||
$height = $config['cf_member_icon_height'];
|
||||
$icon_file_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
|
||||
$icon_file_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb_id).'.gif';
|
||||
$tmp_name .= '<span class="profile_img"><img src="'.$icon_file_url.'" width="'.$width.'" height="'.$height.'" alt=""></span>';
|
||||
|
||||
if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름
|
||||
@ -1260,7 +1320,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
if(!$bo_table)
|
||||
return $name;
|
||||
|
||||
$tmp_name = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&sca='.$sca.'&sfl=wr_name,1&stx='.$name.'" title="'.$name.' 이름으로 검색" class="sv_guest" rel="nofollow" onclick="return false;">'.$name.'</a>';
|
||||
$tmp_name = '<a href="'.get_pretty_url($bo_table, '', 'sca='.$sca.'&sfl=wr_name,1&stx='.$name).'" title="'.$name.' 이름으로 검색" class="sv_guest" rel="nofollow" onclick="return false;">'.$name.'</a>';
|
||||
$title_mb_id = '[비회원]';
|
||||
}
|
||||
|
||||
@ -1277,10 +1337,11 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
if($mb_id)
|
||||
$str2 .= "<a href=\"".G5_BBS_URL."/profile.php?mb_id=".$mb_id."\" onclick=\"win_profile(this.href); return false;\">자기소개</a>\n";
|
||||
if($bo_table) {
|
||||
if($mb_id)
|
||||
$str2 .= "<a href=\"".G5_BBS_URL."/board.php?bo_table=".$bo_table."&sca=".$sca."&sfl=mb_id,1&stx=".$mb_id."\">아이디로 검색</a>\n";
|
||||
else
|
||||
$str2 .= "<a href=\"".G5_BBS_URL."/board.php?bo_table=".$bo_table."&sca=".$sca."&sfl=wr_name,1&stx=".$name."\">이름으로 검색</a>\n";
|
||||
if($mb_id) {
|
||||
$str2 .= "<a href=\"".get_pretty_url($bo_table, '', "sca=".$sca."&sfl=mb_id,1&stx=".$en_mb_id)."\">아이디로 검색</a>\n";
|
||||
} else {
|
||||
$str2 .= "<a href=\"".get_pretty_url($bo_table, '', "sca=".$sca."&sfl=wr_name,1&stx=".$name)."\">이름으로 검색</a>\n";
|
||||
}
|
||||
}
|
||||
if($mb_id)
|
||||
$str2 .= "<a href=\"".G5_BBS_URL."/new.php?mb_id=".$mb_id."\" class=\"link_new_page\" onclick=\"check_goto_new(this.href, event);\">전체게시물</a>\n";
|
||||
@ -1480,12 +1541,21 @@ function sql_set_charset($charset, $link=null)
|
||||
mysql_query(" set names {$charset} ", $link);
|
||||
}
|
||||
|
||||
function sql_data_seek($result, $offset=0)
|
||||
{
|
||||
if ( ! $result ) return;
|
||||
|
||||
if(function_exists('mysqli_set_charset') && G5_MYSQLI_USE)
|
||||
mysqli_data_seek($result, $offset);
|
||||
else
|
||||
mysql_data_seek($result, $offset);
|
||||
}
|
||||
|
||||
// mysqli_query 와 mysqli_error 를 한꺼번에 처리
|
||||
// mysql connect resource 지정 - 명랑폐인님 제안
|
||||
function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||
{
|
||||
global $g5;
|
||||
global $g5, $g5_debug;
|
||||
|
||||
if(!$link)
|
||||
$link = $g5['connect_db'];
|
||||
@ -1498,6 +1568,10 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||
// `information_schema` DB로의 접근을 허락하지 않습니다.
|
||||
$sql = preg_replace("#^select.*from.*where.*`?information_schema`?.*#i", "select 1", $sql);
|
||||
|
||||
$is_debug = get_permission_debug_show();
|
||||
|
||||
$start_time = $is_debug ? get_microtime() : 0;
|
||||
|
||||
if(function_exists('mysqli_query') && G5_MYSQLI_USE) {
|
||||
if ($error) {
|
||||
$result = @mysqli_query($link, $sql) or die("<p>$sql<p>" . mysqli_errno($link) . " : " . mysqli_error($link) . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
|
||||
@ -1512,6 +1586,15 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||
}
|
||||
}
|
||||
|
||||
if($result && $is_debug) {
|
||||
// 여기에 실행한 sql문을 화면에 표시하는 로직 넣기
|
||||
$g5_debug['sql'][] = array(
|
||||
'sql' => $sql,
|
||||
'start_time' => $start_time,
|
||||
'end_time' => get_microtime(),
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -1997,6 +2080,16 @@ function is_utf8($str)
|
||||
// 출처 : https://www.google.co.kr/search?q=utf8_strcut&aq=f&oq=utf8_strcut&aqs=chrome.0.57j0l3.826j0&sourceid=chrome&ie=UTF-8
|
||||
function utf8_strcut( $str, $size, $suffix='...' )
|
||||
{
|
||||
if( function_exists('mb_strlen') && function_exists('mb_substr') ){
|
||||
|
||||
if(mb_strlen($str)<=$size) {
|
||||
return $str;
|
||||
} else {
|
||||
$str = mb_substr($str, 0, $size, 'utf-8');
|
||||
$str .= $suffix;
|
||||
}
|
||||
|
||||
} else {
|
||||
$substr = substr( $str, 0, $size * 2 );
|
||||
$multi_size = preg_match_all( '/[\x80-\xff]/', $substr, $multi_chars );
|
||||
|
||||
@ -2008,8 +2101,9 @@ function utf8_strcut( $str, $size, $suffix='...' )
|
||||
$str = preg_replace( '/(([\x80-\xff]{3})*?)([\x80-\xff]{0,2})$/', '$1', $str );
|
||||
$str .= $suffix;
|
||||
}
|
||||
}
|
||||
|
||||
return $str;
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
@ -2168,11 +2262,7 @@ function delete_cache_latest($bo_table)
|
||||
return;
|
||||
}
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/latest-'.$bo_table.'-*');
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $filename)
|
||||
unlink($filename);
|
||||
}
|
||||
g5_delete_cache_by_prefix('latest-'.$bo_table.'-');
|
||||
}
|
||||
|
||||
// 게시판 첨부파일 썸네일 삭제
|
||||
@ -2456,6 +2546,8 @@ class html_process {
|
||||
}
|
||||
|
||||
array_multisort($order, SORT_ASC, $index, SORT_ASC, $links);
|
||||
|
||||
$links = run_replace('html_process_css_files', $links);
|
||||
|
||||
foreach($links as $link) {
|
||||
if(!trim($link[1]))
|
||||
@ -2482,6 +2574,8 @@ class html_process {
|
||||
}
|
||||
|
||||
array_multisort($order, SORT_ASC, $index, SORT_ASC, $scripts);
|
||||
|
||||
$scripts = run_replace('html_process_script_files', $scripts);
|
||||
|
||||
foreach($scripts as $js) {
|
||||
if(!trim($js[1]))
|
||||
@ -2510,6 +2604,17 @@ class html_process {
|
||||
if($javascript)
|
||||
$nl = "\n";
|
||||
$buffer = preg_replace('#(</head>[^<]*<body[^>]*>)#', "$javascript{$nl}$1", $buffer);
|
||||
|
||||
$meta_tag = run_replace('html_process_add_meta', '');
|
||||
|
||||
if( $meta_tag ){
|
||||
/*
|
||||
</title>content<body>
|
||||
전에 메타태그가 위치 하도록 하게 한다.
|
||||
*/
|
||||
$nl = "\n";
|
||||
$buffer = preg_replace('#(<title[^>]*>.*?</title>)#', "$meta_tag{$nl}$1", $buffer);
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
@ -2681,10 +2786,16 @@ function get_qa_config($fld='*')
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$sql = " select $fld from {$g5['qa_config_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
static $cache = array();
|
||||
|
||||
return $row;
|
||||
if( $is_cache && !empty($cache) ){
|
||||
return $cache;
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['qa_config_table']} ";
|
||||
$cache = run_replace('get_qa_config', sql_fetch($sql));
|
||||
|
||||
return $cache;
|
||||
}
|
||||
|
||||
// get_sock 함수 대체
|
||||
@ -3054,11 +3165,43 @@ function get_encrypt_string($str)
|
||||
// 비밀번호 비교
|
||||
function check_password($pass, $hash)
|
||||
{
|
||||
if(defined('G5_STRING_ENCRYPT_FUNCTION') && G5_STRING_ENCRYPT_FUNCTION === 'create_hash') {
|
||||
return validate_password($pass, $hash);
|
||||
}
|
||||
|
||||
$password = get_encrypt_string($pass);
|
||||
|
||||
return ($password === $hash);
|
||||
}
|
||||
|
||||
// 로그인 패스워드 체크
|
||||
function login_password_check($mb, $pass, $hash)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$mb_id = isset($mb['mb_id']) ? $mb['mb_id'] : '';
|
||||
|
||||
if(!$mb_id)
|
||||
return false;
|
||||
|
||||
if(G5_STRING_ENCRYPT_FUNCTION === 'create_hash' && (strlen($hash) === G5_MYSQL_PASSWORD_LENGTH || strlen($hash) === 16)) {
|
||||
if( sql_password($pass) === $hash ){
|
||||
|
||||
if( ! isset($mb['mb_password2']) ){
|
||||
$sql = "ALTER TABLE `{$g5['member_table']}` ADD `mb_password2` varchar(255) NOT NULL default '' AFTER `mb_password`";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
$new_password = create_hash($pass);
|
||||
$sql = " update {$g5['member_table']} set mb_password = '$new_password', mb_password2 = '$hash' where mb_id = '$mb_id' ";
|
||||
sql_query($sql);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return check_password($pass, $hash);
|
||||
}
|
||||
|
||||
// 동일한 host url 인지
|
||||
function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
|
||||
{
|
||||
@ -3207,22 +3350,19 @@ function clean_query_string($query, $amp=true)
|
||||
return $str;
|
||||
}
|
||||
|
||||
function get_device_change_url()
|
||||
{
|
||||
function get_params_merge_url($params){
|
||||
$p = @parse_url(G5_URL);
|
||||
$href = $p['scheme'].'://'.$p['host'];
|
||||
if(isset($p['port']) && $p['port'])
|
||||
$href .= ':'.$p['port'];
|
||||
$href .= $_SERVER['SCRIPT_NAME'];
|
||||
|
||||
if( $tmp = explode('?', $_SERVER['REQUEST_URI']) ){
|
||||
if( isset($tmp[0]) && $tmp[0] )
|
||||
$href .= $tmp[0];
|
||||
}
|
||||
$q = array();
|
||||
$device = 'device='.(G5_IS_MOBILE ? 'pc' : 'mobile');
|
||||
|
||||
if($_SERVER['QUERY_STRING']) {
|
||||
foreach($_GET as $key=>$val) {
|
||||
if($key == 'device')
|
||||
continue;
|
||||
|
||||
$key = strip_tags($key);
|
||||
$val = strip_tags($val);
|
||||
|
||||
@ -3231,16 +3371,25 @@ function get_device_change_url()
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($q)) {
|
||||
$query = http_build_query($q, '', '&');
|
||||
$href .= '?'.$query.'&'.$device;
|
||||
} else {
|
||||
$href .= '?'.$device;
|
||||
if( is_array($params) ){
|
||||
$q = array_merge($q, $params);
|
||||
}
|
||||
|
||||
$query = http_build_query($q, '', '&');
|
||||
$href .= '?'.$query;
|
||||
|
||||
return $href;
|
||||
}
|
||||
|
||||
function get_device_change_url()
|
||||
{
|
||||
$q = array();
|
||||
$device = (G5_IS_MOBILE ? 'pc' : 'mobile');
|
||||
$q['device'] = $device;
|
||||
|
||||
return get_params_merge_url($q);
|
||||
}
|
||||
|
||||
// 스킨 path
|
||||
function get_skin_path($dir, $skin)
|
||||
{
|
||||
@ -3385,7 +3534,7 @@ function get_member_profile_img($mb_id='', $width='', $height='', $alt='profile_
|
||||
if( isset($member_cache[$mb_id]) ){
|
||||
$src = $member_cache[$mb_id];
|
||||
} else {
|
||||
$member_img = G5_DATA_PATH.'/member_image/'.substr($mb_id,0,2).'/'.$mb_id.'.gif';
|
||||
$member_img = G5_DATA_PATH.'/member_image/'.substr($mb_id,0,2).'/'.get_mb_icon_name($mb_id).'.gif';
|
||||
if (is_file($member_img)) {
|
||||
$member_cache[$mb_id] = $src = str_replace(G5_DATA_PATH, G5_DATA_URL, $member_img);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user