示例#1
0
文件: profile.php 项目: peb317/gbamn
include_once './_common.php';
if (!$member['mb_id']) {
    alert_close('회원만 이용하실 수 있습니다.');
}
if (!$member['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id) {
    alert_close('자신의 정보를 공개하지 않으면 다른분의 정보를 조회할 수 없습니다.\\n\\n정보공개 설정은 회원정보수정에서 하실 수 있습니다.');
}
$mb = apms_member($mb_id);
if (!$mb['mb_id']) {
    alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
}
if (!$mb['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id) {
    alert_close('정보공개를 하지 않았습니다.');
}
$mb_nick = apms_sideview($mb['mb_id'], get_text($mb['mb_nick']), $mb['mb_email'], $mb['mb_homepage'], $mb['as_level']);
// 회원가입후 몇일째인지? + 1 은 당일을 포함한다는 뜻
$sql = " select (TO_DAYS('" . G5_TIME_YMDHIS . "') - TO_DAYS('{$mb['mb_datetime']}') + 1) as days ";
$row = sql_fetch($sql);
$mb_reg_after = $row['days'];
$mb_homepage = set_http(get_text(clean_xss_tags($mb['mb_homepage'])));
$mb_profile = $mb['mb_profile'] ? conv_content($mb['mb_profile'], 0) : '';
$mb_signature = $mb['mb_signature'] ? apms_content(conv_content($mb['mb_signature'], 1)) : '';
// Page ID
$pid = $pid ? $pid : '';
$at = apms_page_thema($pid);
if (!defined('THEMA_PATH')) {
    include_once G5_LIB_PATH . '/apms.thema.lib.php';
}
$g5['title'] = get_text($mb['mb_nick']) . '님의 자기소개';
include_once G5_PATH . '/head.sub.php';
示例#2
0
文件: apms.lib.php 项目: peb317/gbamn
function apms_member_rows($arr)
{
    global $g5, $config, $xp, $demo_config;
    $list = array();
    //정리
    $rows = isset($arr['rows']) && $arr['rows'] > 0 ? $arr['rows'] : 5;
    $mode = isset($arr['mode']) && $arr['mode'] ? $arr['mode'] : '';
    $no_photo = isset($arr['no_photo']) && $arr['no_photo'] ? $arr['no_photo'] : '';
    $no_lvl = isset($arr['nolvl']) && $arr['nolvl'] ? 1 : 0;
    $field = '';
    $mb_cnt = 'mb_point';
    switch ($mode) {
        case 'point':
            $orderby = 'mb_point desc';
            $field = 'po_datetime';
            break;
        case 'level':
            $orderby = 'as_exp desc';
            $mb_cnt = 'as_exp';
            break;
        case 'follow':
            $orderby = 'as_followed desc, as_exp desc';
            $mb_cnt = 'as_followed';
            break;
        case 'like':
            $orderby = 'as_liked desc, as_exp desc';
            $mb_cnt = 'as_liked';
            break;
        case 'new':
            $orderby = 'mb_datetime desc';
            break;
        case 'recent':
            $orderby = 'mb_today_login desc';
            break;
        case 'post':
            $field = 'bn_datetime';
            break;
        case 'comment':
            $field = 'bn_datetime';
            break;
        case 'chulsuk':
            $field = 'wr_datetime';
            break;
        case 'connect':
            break;
        default:
            return;
            break;
    }
    $sql_ex = "and mb_leave_date = '' and mb_intercept_date = ''";
    //제외회원
    $ex_mb = $config['cf_admin'];
    if (isset($arr['ex_mb']) && $arr['ex_mb']) {
        $ex_mb .= ',' . apms_escape_string($arr['ex_mb']);
    }
    //데모
    if (isset($demo_config['bo_table']) && $demo_config['bo_table']) {
        $bo_list = $demo_config['bo_table'];
    }
    $sql_board = '';
    //보드체크
    if ($mode == 'connect') {
        //현재접속회원
        $sql_photo = isset($arr['photo']) && $arr['photo'] ? "and b.as_photo = '1'" : "";
        $sql = " select a.mb_id, b.mb_level, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, b.mb_point, b.as_level, b.as_photo, a.lo_ip, a.lo_location, a.lo_url\n\t\t\t\t\tfrom {$g5['login_table']} a left join {$g5['member_table']} b on (a.mb_id = b.mb_id)\n\t\t\t\t\twhere a.mb_id <> '' and find_in_set(a.mb_id, '{$ex_mb}')=0 {$sql_photo}\n\t\t\t\t\torder by a.lo_datetime desc ";
    } else {
        if ($mode == 'post' || $mode == 'comment' || $mode == 'point') {
            //글,댓글,포인트
            $gr_list = isset($arr['gr_list']) && $arr['gr_list'] ? apms_escape_string($arr['gr_list']) : '';
            $bo_list = isset($arr['bo_list']) && $arr['bo_list'] ? apms_escape_string($arr['bo_list']) : '';
            $bo_table = $gr_list ? apms_group_board($gr_list) : $bo_list;
            $dayterm = isset($arr['dayterm']) && $arr['dayterm'] > 0 ? $arr['dayterm'] : 0;
            $term = isset($arr['term']) && $arr['term'] ? $arr['term'] : '';
            $term = $term == 'day' && $dayterm > 0 ? $dayterm : $term;
            $sql_term = apms_sql_term($term, $field);
            // 기간(일수,today,yesterday,month,prev)
            $sql_board = '';
            if ($mode == 'point') {
                if ($bo_table) {
                    $sql_board = isset($arr['except']) && $arr['except'] ? "and find_in_set(po_rel_table, '{$bo_table}')=0" : "and find_in_set(po_rel_table, '{$bo_table}')";
                }
                $sql = " select mb_id, sum(po_point) as cnt from {$g5['point_table']} \n\t\t\t\t\t\twhere find_in_set(mb_id, '{$ex_mb}')=0 and po_point > 0 {$sql_term} {$sql_board}\n\t\t\t\t\t\tgroup by mb_id order by cnt desc limit 0, {$rows} ";
            } else {
                if ($bo_table) {
                    $sql_board = isset($arr['except']) && $arr['except'] ? "and find_in_set(bo_table, '{$bo_table}')=0" : "and find_in_set(bo_table, '{$bo_table}')";
                }
                $sql_mode = $mode == 'comment' ? "and wr_parent <> wr_id" : "and wr_parent = wr_id";
                $sql = " select mb_id, count(mb_id) as cnt \n\t\t\t\t\t\tfrom {$g5['board_new_table']} \n\t\t\t\t\t\twhere mb_id <> '' and find_in_set(mb_id, '{$ex_mb}')=0 {$sql_mode} {$sql_term} {$sql_board} group by mb_id \n\t\t\t\t\t\torder by cnt desc limit 0, {$rows} ";
            }
        } else {
            if ($mode == 'chulsuk') {
                //출석
                $dayterm = isset($arr['dayterm']) && $arr['dayterm'] > 0 ? $arr['dayterm'] : 0;
                $term = isset($arr['term']) && $arr['term'] ? $arr['term'] : '';
                $term = $term == 'day' && $dayterm > 0 ? $dayterm : $term;
                $sql_term = apms_sql_term($term, $field);
                // 기간(일수,today,yesterday,month,prev)
                $sql = " select mb_id, count(mb_id) as cnt from {$g5['write_prefix']}{$arr['bo_table']} \n\t\t\t\t\twhere wr_is_comment = '0' and mb_id <> '' and find_in_set(mb_id, '{$ex_mb}')=0 {$sql_term} group by mb_id \n\t\t\t\t\torder by cnt desc limit 0, {$rows} ";
            } else {
                if ($mode == 'recent') {
                    //최근 접속회원
                    $sql_photo = isset($arr['photo']) && $arr['photo'] ? "and as_photo = '1'" : "";
                    $sql = "select * from {$g5['member_table']} \n\t\t\t\t\twhere find_in_set(mb_id, '{$ex_mb}')=0 {$sql_photo} {$sql_ex}\n\t\t\t\t\torder by {$orderby} limit 0, {$rows} ";
                } else {
                    $sql_photo = isset($arr['photo']) && $arr['photo'] ? "and as_photo = '1'" : "";
                    $sql = " select *, {$mb_cnt} as cnt from {$g5['member_table']} \n\t\t\t\t\twhere find_in_set(mb_id, '{$ex_mb}')=0 {$sql_ex} {$sql_photo} \n\t\t\t\t\torder by {$orderby} limit 0, {$rows} ";
                }
            }
        }
    }
    $result = sql_query($sql, false);
    for ($i = 0; $row = sql_fetch_array($result); $i++) {
        $list[$i] = $row['mb_id'] && $row['mb_nick'] ? $row : get_member($row['mb_id']);
        $list[$i]['cnt'] = $row['cnt'];
        $list[$i]['photo'] = apms_photo_url($list[$i]['mb_id']);
        if (!$list[$i]['photo'] && $no_photo) {
            $list[$i]['photo'] = $no_photo;
            // no-photo
        }
        $m = 'xp_grade' . $list[$i]['mb_level'];
        $list[$i]['grade'] = $xp[$m];
        $lvl = $no_lvl ? 'no' : $list[$i]['as_level'];
        if (!$list[$i]['mb_open']) {
            $list[$i]['mb_email'] = '';
            $list[$i]['mb_homepage'] = '';
        }
        $list[$i]['name'] = apms_sideview($list[$i]['mb_id'], get_text($list[$i]['mb_nick']), $list[$i]['mb_email'], $list[$i]['mb_homepage'], $lvl);
    }
    return $list;
}
示例#3
0
function apms_mkt_partner_rows($arr)
{
    global $g5;
    $list = array();
    //정리
    $type = isset($arr['type']) && $arr['type'] ? apms_escape_string($arr['type']) : '';
    $pt_list = isset($arr['pt_list']) && $arr['pt_list'] ? apms_escape_string($arr['pt_list']) : '';
    $ex_pt = isset($arr['ex_pt']) && $arr['ex_pt'] ? apms_escape_string($arr['ex_pt']) : '';
    $ca_id = isset($arr['ca_id']) && $arr['ca_id'] ? apms_escape_string($arr['ca_id']) : '';
    $ex_ca = isset($arr['ex_ca']) && $arr['ex_ca'] ? apms_escape_string($arr['ex_ca']) : '';
    $rows = isset($arr['rows']) && $arr['rows'] > 0 ? $arr['rows'] : 4;
    $page = isset($arr['page']) && $arr['page'] > 1 ? $arr['page'] : 1;
    $sort = isset($arr['sort']) && $arr['sort'] ? $arr['sort'] : '';
    $no_photo = isset($arr['no_photo']) && $arr['no_photo'] ? $arr['no_photo'] : '';
    $start_rows = 0;
    // 타입
    $sql_type = $type ? "and b.it_type{$type} = '1'" : "";
    // 분류
    $sql_ca = $ca_id ? "and (b.ca_id like '{$ca_id}%' or b.ca_id2 like '{$ca_id}%' or b.ca_id3 like '{$ca_id}%')" : "";
    $sql_ca_ex = $ex_ca ? "and (b.ca_id not like '{$ex_ca}%' and b.ca_id2 not like '{$ex_ca}%' and b.ca_id3 not like '{$ex_ca}%')" : "";
    // 파트너
    $sql_pt = $pt_list ? "and find_in_set(b.mk_id, '{$pt_list}')" : "";
    $sql_pt_ex = $ex_pt ? "and find_in_set(b.mk_id, '{$ex_pt}')=0" : "";
    // 정렬
    switch ($sort) {
        case 'cnt':
            $orderby = 'cnt desc';
            break;
        case 'qty':
            $orderby = 'qty desc';
            break;
        default:
            $orderby = 'profit desc';
            break;
    }
    $dayterm = isset($arr['dayterm']) && $arr['dayterm'] > 0 ? $arr['dayterm'] : 0;
    $term = isset($arr['term']) && $arr['term'] ? $arr['term'] : '';
    $term = $term == 'day' && $dayterm > 0 ? $dayterm : $term;
    $sql_term = apms_sql_term($term, 'a.ct_select_time');
    // 기간(일수,today,yesterday,month,prev)
    $sql_common = "from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) \n\t\t\t\t\twhere a.mk_id <> '' and a.ct_status = '완료' and a.ct_select = '1' {$sql_type} {$sql_ca} {$sql_ca_ex} {$sql_pt} {$sql_pt_ex} {$sql_term} ";
    if ($page > 1) {
        $row = sql_fetch(" SELECT COUNT(DISTINCT `a.mk_id`) AS `cnt` {$sql_common} ");
        $total_count = $row['cnt'];
        $total_page = ceil($total_count / $rows);
        // 전체 페이지 계산
        $start_rows = ($page - 1) * $rows;
        // 시작 열을 구함
    }
    $result = sql_query(" select a.mk_id, count(*) as cnt, sum(a.mk_profit + a.mk_benefit) as profit, sum(a.ct_qty) as qty {$sql_common} group by a.mk_id order by {$orderby} limit {$start_rows}, {$rows} ", false);
    for ($i = 0; $row = sql_fetch_array($result); $i++) {
        $list[$i] = get_member($row['mk_id']);
        $list[$i]['photo'] = apms_photo_url($lsit[$i]['mb_id']);
        if (!$list[$i]['photo'] && $no_photo) {
            $list[$i]['photo'] = $no_photo;
            // no-photo
        }
        $m = 'xp_grade' . $list[$i]['mb_level'];
        $list[$i]['grade'] = $xp[$m];
        $list[$i]['name'] = $list[$i]['mb_open'] ? apms_sideview($list[$i]['mb_id'], get_text($list[$i]['mb_nick']), $list[$i]['mb_email'], $list[$i]['mb_homepage']) : apms_sideview($list[$i]['mb_id'], get_text($list[$i]['mb_nick']), '', '');
        $list[$i]['cnt'] = $row['cnt'];
        $list[$i]['profit'] = $row['profit'];
        $list[$i]['qty'] = $row['qty'];
    }
    return $list;
}
示例#4
0
    $list[$i]['cnt'] = $po['po_cnt' . $i];
    if ($total_po_cnt > 0) {
        $list[$i]['rate'] = $list[$i]['cnt'] / $total_po_cnt * 100;
    }
    $bar = (int) ($list[$i]['cnt'] / $max * 100);
    $list[$i]['bar'] = $bar;
    $list[$i]['num'] = $i;
}
$list2 = array();
// 기타의견 리스트
$sql = " select a.*, b.mb_open, b.as_level\n           from {$g5['poll_etc_table']} a\n           left join {$g5['member_table']} b on (a.mb_id = b.mb_id)\n          where po_id = '{$po_id}' order by pc_id desc ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $list2[$i]['pc_name'] = get_text($row['pc_name']);
    $list2[$i]['photo'] = apms_photo_url($row['mb_id']);
    $list2[$i]['name'] = apms_sideview($row['mb_id'], get_text(cut_str($row['pc_name'], 10)), '', '', $row['as_level']);
    $list2[$i]['idea'] = get_text(cut_str($row['pc_idea'], 255));
    $list2[$i]['datetime'] = $row['pc_datetime'];
    $list2[$i]['del'] = '';
    if ($is_admin == 'super' || $row['mb_id'] == $member['mb_id'] && $row['mb_id']) {
        $list2[$i]['del'] = '<a href="' . G5_BBS_URL . '/poll_etc_update.php?w=d&amp;pc_id=' . $row['pc_id'] . '&amp;po_id=' . $po_id . '&amp;skin_dir=' . $skin_dir . '" class="poll_delete">';
    }
}
// 기타의견 입력
$is_etc = false;
if ($po['po_etc']) {
    $is_etc = true;
    $po_etc = $po['po_etc'];
    if ($member['mb_id']) {
        $name = '<b>' . $member['mb_nick'] . '</b> <input type="hidden" name="pc_name" value="' . $member['mb_nick'] . '">';
    } else {
示例#5
0
文件: qalist.php 项目: peb317/gbamn
    $list = array();
    $num = $total_count - ($page - 1) * $page_rows;
    $subject_len = G5_IS_MOBILE ? $qaconfig['qa_mobile_subject_len'] : $qaconfig['qa_subject_len'];
    for ($i = 0; $row = sql_fetch_array($result); $i++) {
        $list[$i] = $row;
        $list[$i]['category'] = get_text($row['qa_category']);
        $list[$i]['subject'] = conv_subject($row['qa_subject'], $subject_len, '…');
        if ($stx) {
            $list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
        }
        $list[$i]['view_href'] = G5_BBS_URL . '/qaview.php?qa_id=' . $row['qa_id'] . $qstr;
        $list[$i]['icon_file'] = '';
        if (trim($row['qa_file1']) || trim($row['qa_file2'])) {
            $list[$i]['icon_file'] = '<img src="' . $qa_skin_url . '/img/icon_file.gif">';
        }
        $list[$i]['name'] = apms_sideview($row['mb_id'], get_text($row['qa_name']), $row['email'], '', 'no');
        $list[$i]['date'] = substr($row['qa_datetime'], 2, 8);
        $list[$i]['num'] = $num - $i;
    }
    $is_checkbox = false;
    $admin_href = '';
    if ($is_admin) {
        $is_checkbox = true;
        $admin_href = G5_ADMIN_URL . '/qa_config.php';
    }
    $list_href = G5_BBS_URL . '/qalist.php';
    $write_href = G5_BBS_URL . '/qawrite.php';
    $list_pages = preg_replace('/(\\.php)(&amp;|&)/i', '$1?', get_paging(G5_IS_MOBILE ? $qaconfig['qa_mobile_page_rows'] : $qaconfig['qa_page_rows'], $page, $total_page, './qalist.php' . $qstr . '&amp;page='));
    $stx = get_text(stripslashes($stx));
    include_once $skin_file;
} else {
示例#6
0
文件: memo.php 项目: peb317/gbamn
// 전체 페이지 계산
$from_record = ($page - 1) * $page_rows;
// 시작 열을 구함
$num = $total_count - ($page - 1) * $page_rows;
$list = array();
$sql = " select a.*, b.mb_id, b.mb_nick, b.mb_email, b.mb_homepage\n            from {$g5['memo_table']} a\n            left join {$g5['member_table']} b on (a.me_{$unkind}_mb_id = b.mb_id)\n            where a.me_{$kind}_mb_id = '{$member['mb_id']}'\n            order by a.me_id desc limit {$from_record}, {$page_rows}";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $list[$i] = $row;
    $mb_id = $row["me_{$unkind}_mb_id"];
    if ($row['mb_nick']) {
        $mb_nick = $row['mb_nick'];
    } else {
        $mb_nick = '정보없음';
    }
    $name = apms_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
    if (substr($row['me_read_datetime'], 0, 1) == 0) {
        $read_datetime = '아직 읽지 않음';
    } else {
        $read_datetime = substr($row['me_read_datetime'], 2, 14);
    }
    $send_datetime = substr($row['me_send_datetime'], 2, 14);
    $list[$i]['num'] = $num - $i;
    $list[$i]['name'] = $name;
    $list[$i]['send_datetime'] = $send_datetime;
    $list[$i]['read_datetime'] = $read_datetime;
    $list[$i]['view_href'] = './memo_view.php?me_id=' . $row['me_id'] . '&amp;kind=' . $kind . $qstr;
    $list[$i]['del_href'] = './memo_delete.php?me_id=' . $row['me_id'] . '&amp;kind=' . $kind . $qstr;
}
$write_page_rows = G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'];
$list_page = "./memo.php?kind=" . $kind . "&amp;page=";
示例#7
0
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $list[$i] = $row;
    $list[$i]['num'] = $total_count - ($page - 1) * $rows - $i;
    $list[$i]['href'] = G5_SHOP_URL . '/item.php?it_id=' . $row['it_id'];
    $list[$i]['sale'] = $row['ct_price'] * $row['ct_qty'];
    if ($row['ct_notax']) {
        $net = $list[$i]['sale'];
    } else {
        list($net) = apms_vat($list[$i]['sale']);
    }
    $list[$i]['net'] = $net;
    $list[$i]['qty'] = $row['ct_qty'];
    $list[$i]['profit'] = $row['mk_profit'];
    $list[$i]['benefit'] = $row['mk_benefit'];
    $list[$i]['total'] = $row['mk_profit'] + $row['mk_benefit'];
    $list[$i]['rate'] = $list[$i]['net'] > 0 ? round($list[$i]['total'] / $list[$i]['net'] * 1000) / 10 : 0;
    $list[$i]['options'] = print_item_options($row['it_id'], $row['od_id'], $row['pt_msg1'], $row['pt_msg2'], $row['pt_msg3']);
    //구매회원
    $list[$i]['buyer'] = '비회원';
    if ($row['mb_id']) {
        $mb = get_member($row['mb_id'], 'mb_nick, mb_email, mb_homepage');
        if ($mb['mb_nick']) {
            $list[$i]['buyer'] = apms_sideview($row['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['wr_homepage']);
        }
    }
}
// 페이징
$write_pages = G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'];
$list_page = './?ap=' . $ap . '&amp;fr_date=' . $fr_date . '&amp;to_date=' . $to_date . '&amp;sca=' . $sca . '&amp;save_stx=' . $stx . '&amp;stx=' . $stx . '&amp;page=';
include_once $skin_path . '/mkt.itemlist.skin.php';
示例#8
0
文件: search.php 项目: peb317/gbamn
             //$content = cut_str(get_text(strip_tags($row['wr_content'])), 300, "…");
             //$content = strip_tags($row['wr_content']);
             $content = apms_cut_text($row['wr_content'], 300);
             //$content = strip_tags($content);
             $content = str_replace('&nbsp;', '', $content);
             //$content = cut_str($content, 300, "…");
             if (strstr($sfl, 'wr_content')) {
                 $content = search_font($stx, $content);
             }
         } else {
             $content = '';
         }
         $list[$idx][$i]['bo_table'] = $search_table[$idx];
         $list[$idx][$i]['subject'] = $subject;
         $list[$idx][$i]['content'] = $content;
         $list[$idx][$i]['name'] = apms_sideview($row['mb_id'], get_text(cut_str($row['wr_name'], $config['cf_cut_name'])), $row['wr_email'], $row['wr_homepage'], $row['as_level']);
         $list[$idx][$i]['date'] = strtotime($row['wr_datetime']);
         $k++;
         if ($k >= $rows) {
             break;
         }
     }
     sql_free_result($result);
     if ($k >= $rows) {
         break;
     }
     $from_record = 0;
 }
 $write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'] . '?' . $search_query . '&amp;gr_id=' . $gr_id . '&amp;srows=' . $srows . '&amp;onetable=' . $onetable . '&amp;page=');
 $write_page_rows = G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'];
 $list_page = $_SERVER['SCRIPT_NAME'] . '?' . $search_query . '&amp;gr_id=' . $gr_id . '&amp;srows=' . $srows . '&amp;onetable=' . $onetable . '&amp;page=';
示例#9
0
文件: qaform.php 项目: peb317/gbamn
<?php

if (!defined("_GNUBOARD_")) {
    exit;
}
// 개별 페이지 접근 불가
include_once G5_EDITOR_LIB;
if ($is_auth) {
    $qa_sql = " and (a.pt_id = '' or a.pt_id = '{$mb_id}')";
} else {
    $qa_sql .= " and a.pt_id = '{$mb_id}'";
}
$sql = " select *\n           from {$g5['g5_shop_item_qa_table']} a\n           left join {$g5['member_table']} b on (a.mb_id = b.mb_id)\n          where iq_id = '{$iq_id}' {$qa_sql} ";
$iq = sql_fetch($sql);
if (!$iq['iq_id']) {
    alert('등록된 자료가 없습니다.', './?ap=qalist');
}
$iq['iq_question'] = apms_content(conv_content($iq['iq_question'], 1));
$name = apms_sideview($iq['mb_id'], get_text($iq['iq_name']), $iq['mb_email'], $iq['mb_homepage']);
$photo = apms_photo_url($iq['mb_id']);
$it = apms_it($iq['it_id']);
$list_href = './?ap=qalist&amp;sca=' . $sca . '&amp;save_opt=' . $opt . '&amp;opt=' . $opt . '&amp;page=' . $page;
include_once $skin_path . '/qaform.skin.php';
示例#10
0
    $prev_link = './memo_view.php?kind=' . $kind . '&amp;me_id=' . $prev['me_id'] . $qstr;
} else {
    //$prev_link = 'javascript:alert(\'쪽지의 처음입니다.\');';
    $prev_link = '';
}
// 다음 쪽지
$sql = " select * from {$g5[memo_table]}\n            where me_id < '{$me_id}'\n            and me_{$kind}_mb_id = '{$member[mb_id]}'\n            order by me_id desc\n            limit 1 ";
$next = sql_fetch($sql);
if ($next[me_id]) {
    $next_link = './memo_view.php?kind=' . $kind . '&amp;me_id=' . $next['me_id'] . $qstr;
} else {
    //$next_link = 'javascript:alert(\'쪽지의 마지막입니다.\');';
    $next_link = '';
}
$mb = get_member($memo['me_' . $unkind . '_mb_id']);
$nick = $mb['mb_open'] ? apms_sideview($mb['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['mb_homepage']) : apms_sideview($mb['mb_id'], $mb['mb_nick'], '', '');
$memo_content = apms_content(conv_content($memo['me_memo'], 0));
// Page ID
$pid = $pid ? $pid : '';
$at = apms_page_thema($pid);
if (!defined('THEMA_PATH')) {
    include_once G5_LIB_PATH . '/apms.thema.lib.php';
}
$g5['title'] = $member['mb_nick'] . ' 님이 ' . $t . ' 쪽지 보기';
include_once G5_PATH . '/head.sub.php';
if (!USE_G5_THEME) {
    @(include_once THEMA_PATH . '/head.sub.php');
}
$skin_path = $member_skin_path;
$skin_url = $member_skin_url;
// 스킨설정
示例#11
0
文件: qaview.php 项目: peb317/gbamn
 $sql = " select * from {$g5['qa_content_table']} where qa_id = '{$qa_id}' ";
 if (!$is_admin) {
     $sql .= " and mb_id = '{$member['mb_id']}' ";
 }
 $view = sql_fetch($sql);
 if (!$view['qa_id']) {
     alert('게시글이 존재하지 않습니다.\\n삭제되었거나 자신의 글이 아닌 경우입니다.', G5_BBS_URL . '/qalist.php');
 }
 $subject_len = G5_IS_MOBILE ? $qaconfig['qa_mobile_subject_len'] : $qaconfig['qa_subject_len'];
 $view['category'] = get_text($view['qa_category']);
 $view['subject'] = conv_subject($view['qa_subject'], $subject_len, '…');
 $view['content'] = conv_content($view['qa_content'], $view['qa_html']);
 $view['datetime'] = $view['qa_datetime'];
 $view['email'] = get_text(get_email_address($view['qa_email']));
 $view['hp'] = $view['qa_hp'];
 $view['name'] = apms_sideview($view['mb_id'], get_text($view['qa_name']), $view['email'], '', 'no');
 if (trim($stx)) {
     $view['subject'] = search_font($stx, $view['subject']);
 }
 if (trim($stx)) {
     $view['content'] = search_font($stx, $view['content']);
 }
 // 이전글, 다음글
 $sql = " select qa_id, qa_subject\n                from {$g5['qa_content_table']}\n                where qa_type = '0' ";
 if (!$is_admin) {
     $sql .= " and mb_id = '{$member['mb_id']}' ";
 }
 // 이전글
 $prev_search = " and qa_num < '{$view['qa_num']}' order by qa_num desc limit 1 ";
 $prev = sql_fetch($sql . $prev_search);
 $prev_href = '';
示例#12
0
if (!defined('THEMA_PATH')) {
    include_once G5_LIB_PATH . '/apms.thema.lib.php';
}
$g5['title'] = '현재접속자';
include_once './_head.php';
$skin_path = $connect_skin_path;
$skin_url = $connect_skin_url;
$list = array();
$sql_find = $config['as_admin'] ? "and find_in_set(a.mb_id, '{$config['as_admin']}')=0" : "";
$sql = " select a.mb_id, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, b.mb_point, b.as_level, a.lo_ip, a.lo_location, a.lo_url\n            from {$g5['login_table']} a left join {$g5['member_table']} b on (a.mb_id = b.mb_id)\n            where a.mb_id <> '{$config['cf_admin']}' {$sql_find}\n            order by a.mb_id desc, a.lo_datetime desc ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $row['lo_url'] = get_text($row['lo_url']);
    $list[$i] = $row;
    if ($row['mb_id']) {
        $list[$i]['name'] = apms_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage'], $row['as_level']);
    } else {
        if ($is_admin) {
            $list[$i]['name'] = $row['lo_ip'];
        } else {
            $list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']);
        }
    }
    $list[$i]['num'] = sprintf('%03d', $i + 1);
}
// 스킨설정
$wset = G5_IS_MOBILE ? apms_skin_set('connect_mobile') : apms_skin_set('connect');
$setup_href = '';
if (is_file($skin_path . '/setup.skin.php') && ($is_demo || $is_admin == 'super')) {
    $setup_href = './skin.setup.php?skin=connect';
}
示例#13
0
        alert("자신이 등록한 상품의 문의글에 대한 답글만 가능합니다.");
    } else {
        alert_close("자신이 등록한 상품의 문의글에 대한 답글만 가능합니다.");
    }
}
$sql = " select *\n           from {$g5['g5_shop_item_qa_table']} a\n           left join {$g5['member_table']} b on (a.mb_id = b.mb_id)\n          where iq_id = '{$iq_id}' {$qa_sql} ";
$qa = sql_fetch($sql);
if (!$qa['iq_id']) {
    if ($move) {
        alert('등록된 자료가 없습니다.');
    } else {
        alert_close('등록된 자료가 없습니다.');
    }
}
$qa['iq_question'] = apms_content(conv_content($qa['iq_question'], 1));
$qa['name'] = apms_sideview($qa['mb_id'], get_text($qa['iq_name']), $qa['mb_email'], $qa['mb_homepage']);
$qa['photo'] = apms_photo_url($qa['mb_id']);
// Page ID
$pid = $pid ? $pid : 'iqa';
$at = apms_page_thema($pid);
if (!defined('THEMA_PATH')) {
    include_once G5_LIB_PATH . '/apms.thema.lib.php';
}
$skin_row = array();
$skin_row = apms_rows('qa_' . MOBILE_ . 'rows, qa_' . MOBILE_ . 'skin, qa_' . MOBILE_ . 'set');
$skin_name = $skin_row['qa_' . MOBILE_ . 'skin'];
// 스킨설정
$wset = array();
if ($skin_row['qa_' . MOBILE_ . 'set']) {
    $wset = apms_unpack($skin_row['qa_' . MOBILE_ . 'set']);
}
示例#14
0
文件: ga_tk.php 项目: peb317/gbamn
         }
     }
 } else {
     // 코멘트
     $comment = '[코] ';
     $comment_link = '#c_' . $row['wr_id'];
     $row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
     $row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime, wr_comment_reply, wr_option, as_shingo, as_level, wr_5 from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
     $list[$i] = $row2;
     $list[$i]['wr_id'] = $row['wr_id'];
     $list[$i]['mb_id'] = $row3['mb_id'];
     $list[$i]['wr_name'] = $row3['wr_name'];
     $list[$i]['wr_email'] = $row3['wr_email'];
     $list[$i]['wr_homepage'] = $row3['wr_homepage'];
     $list[$i]['reply_name'] = $row3['wr_comment_reply'] && $row3['wr_5'] ? $row3['wr_5'] : '';
     $name = apms_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage'], $row3['as_level']);
     // 당일인 경우 시간으로 표시함
     $wr_datetime = $row3['wr_datetime'];
     $datetime = substr($row3['wr_datetime'], 0, 10);
     $datetime2 = $row3['wr_datetime'];
     if ($datetime == G5_TIME_YMD) {
         $datetime2 = substr($datetime2, 11, 5);
     } else {
         $datetime2 = substr($datetime2, 5, 5);
     }
     $is_lock = false;
     if (strstr($row2['wr_option'], 'secret')) {
         $is_lock = true;
     } else {
         if (strstr($row3['wr_option'], 'secret')) {
             $is_lock = true;
示例#15
0
文件: comment.php 项目: peb317/gbamn
$rows = $config['cf_' . MOBILE_ . 'page_rows'];
$total_page = ceil($total_count / $rows);
// 전체 페이지 계산
if ($page < 1) {
    $page = 1;
}
// 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows;
// 시작 열을 구함
$sql = " select * {$sql_common} order by a.wr_id desc limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$num = $total_count - ($page - 1) * $rows;
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $list[$i] = $row;
    $list[$i]['num'] = $num;
    $list[$i]['name'] = apms_sideview($row['mb_id'], $row['wr_name'], $row['wr_email'], $row['wr_homepage'], $row['wr_level']);
    $list[$i]['is_lock'] = $row['wr_shingo'] < 0 ? true : false;
    $list[$i]['reply_name'] = $row['wr_comment_reply'] && $row['wr_re_name'] ? $row['wr_re_name'] : '';
    $is_content = false;
    $list[$i]['content1'] = $row['wr_content'];
    $list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
    if ($is_shingo && $row['wr_shingo'] < 0) {
        if ($is_admin || $row['mb_id'] && $row['mb_id'] == $member['mb_id']) {
            $list[$i]['content'] = '<p><b>블라인더 처리된 댓글입니다.</b></p>' . $list[$i]['content'];
        } else {
            $list[$i]['content'] = '<p><b>블라인더 처리된 댓글입니다.</b></p>';
        }
    }
    $list[$i]['content'] = preg_replace("/\\[\\<a\\s*href\\=\"(http|https|ftp)\\:\\/\\/([^[:space:]]+)\\.(gif|png|jpg|jpeg|bmp)\"\\s*[^\\>]*\\>[^\\s]*\\<\\/a\\>\\]/i", "<img src='\$1://\$2.\$3' alt='' style='max-width:100%;border:0;'>", $list[$i]['content']);
    $list[$i]['content'] = apms_content($list[$i]['content']);
    //럭키포인트
示例#16
0
// 시작 열을 구함
if ($from_record < 0) {
    $from_record = 0;
}
//$sql = " select * from {$write_table} where wr_parent = '{$wr_id}' and wr_is_comment = 1 order by wr_comment desc, wr_comment_reply ";
$sql = " select * {$sql_common} order by wr_comment, wr_comment_reply limit {$from_record}, {$crows} ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $list[$i] = $row;
    //$list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['wr_name'], 20, ''), $row['wr_email'], $row['wr_homepage']);
    $tmp_name = get_text(cut_str($row['wr_name'], $config['cf_cut_name']));
    // 설정된 자리수 만큼만 이름 출력
    if ($board['bo_use_sideview']) {
        //$list[$i]['name'] = get_sideview($row['mb_id'], $tmp_name, $row['wr_email'], $row['wr_homepage']);
        $lvl = $board['as_level'] ? 'yes' : 'no';
        $list[$i]['name'] = apms_sideview($row['mb_id'], $tmp_name, $row['wr_email'], $row['wr_homepage'], $row['as_level'], $lvl);
        // APMS 용으로 교체
    } else {
        $list[$i]['name'] = '<span class="' . ($row['mb_id'] ? 'member' : 'guest') . '">' . $tmp_name . '</span>';
    }
    // 공백없이 연속 입력한 문자 자르기 (way 보드 참고. way.co.kr)
    //$list[$i]['content'] = eregi_replace("[^ \n<>]{130}", "\\0\n", $row['wr_content']);
    $list[$i]['is_lock'] = $row['as_shingo'] < 0 ? true : false;
    $list[$i]['reply_name'] = $row['wr_comment_reply'] && $row['as_re_name'] ? $row['as_re_name'] : '';
    // APMS -------->
    $shingo_txt = '';
    $is_content = $is_secret = $is_cmt_shingo = false;
    $list[$i]['content'] = $list[$i]['content1'] = '비밀댓글 입니다.';
    if ($row['as_shingo'] < 0) {
        $shingo_txt = '<p><b>블라인더 처리된 댓글입니다.</b></p>';
        if ($is_admin || $row['mb_id'] && $row['mb_id'] == $member['mb_id']) {
示例#17
0
		<th scope="col">판매금액(vat포함)</th>
		<th scope="col">판매건수</th>
		<th scope="col">기본수익(상품별 적립율)</th>
		<th scope="col">추가수익(레벨 + 인센티브)</th>
		<th scope="col">수익합계(기본수익 + 추가수익)</th>
		<th scope="col">수익율</th>
	</tr>
    </thead>
    <tbody>
    <?php 
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $mb = get_member($row['mk_id'], 'mb_nick, mb_email, mb_homepage, as_level');
    $mk = apms_partner($row['mk_id'], 'pt_type, pt_level, pt_benefit');
    $rank = $i + ($page - 1) * $rows + 1;
    $type = $mk['pt_type'] == "2" ? '개인' : '기업';
    $name = apms_sideview($row['mk_id'], get_text($mb['mb_nick']), $mb['mb_email'], $mb['mb_homepage'], $mb['as_level'], 'yes');
    $rate = $row['revenue'] > 0 ? round($row['revenue'] / $row['sale'] * 1000) / 10 : 0;
    ?>
    <tr>
        <td headers="mb_list_chk" class="td_chk">
            <input type="hidden" name="pt_id[<?php 
    echo $i;
    ?>
]" value="<?php 
    echo $row['mk_id'];
    ?>
" id="pt_id_<?php 
    echo $i;
    ?>
">
            <input type="checkbox" name="chk[]" value="<?php