Beispiel #1
0
if ($is_guest) {
    alert('회원만 이용가능합니다.', APMS_PARTNER_URL . '/login.php');
}
$is_seller = isset($apms['apms_partner']) && $apms['apms_partner'] ? true : false;
$is_marketer = isset($apms['apms_marketer']) && $apms['apms_marketer'] ? true : false;
$is_company = isset($apms['apms_company']) && $apms['apms_company'] ? true : false;
$is_personal = isset($apms['apms_personal']) && $apms['apms_personal'] ? true : false;
if (!$is_seller && !$is_marketer) {
    alert('지금은 파트너 등록을 받지 않습니다.', G5_URL);
}
if (!$is_company && !$is_personal) {
    alert('지금은 파트너 등록을 받지 않습니다.', G5_URL);
}
$upload_max_filesize = number_format($default['pt_upload_size']) . ' 바이트';
$partner = array();
$partner = apms_partner($member['mb_id']);
if ($partner['pt_id']) {
    //파트너 정보가 있으면
    if (!$partner['pt_register']) {
        // 등록심사중이면
        alert('회원님은 현재 등록심사 중입니다.', G5_URL);
    }
    if ($partner['pt_leave']) {
        // 탈퇴한 회원이면
        alert('회원님은 파트너에서 탈퇴하셨습니다.\\n\\n재등록을 원하시면 관리자에게 문의바랍니다.', G5_URL);
    }
    if (!$partner['pt_partner'] && !$partner['pt_marketer']) {
        // 권한해제 회원이면
        alert('회원님은 파트너 권한이 해제된 상태입니다.\\n\\n권한 재등록을 원하시면 관리자에게 문의바랍니다.', G5_URL);
    }
    alert('회원님은 파트너로 등록되신 분입니다.\\n\\n파트너 페이지로 이동합니다.', APMS_PARTNER_URL);
Beispiel #2
0
    alert('로그인해 주세요.', APMS_PARTNER_URL . '/login.php');
}
// 회원정보가공
thema_member();
$is_partner = IS_PARTNER ? true : false;
if ($is_partner) {
    // 통과
} else {
    alert('등록된 파트너만 이용할 수 있습니다.', APMS_PARTNER_URL . '/register.php');
}
$is_auth = $is_admin == 'super' ? true : false;
define('G5_IS_ADMIN', true);
$mb_id = $member['mb_id'];
//파트너 정보
$partner = array();
$partner = apms_partner($mb_id);
$partner['pt_level'] = isset($partner['pt_level']) && $partner['pt_level'] > 0 ? $partner['pt_level'] : 1;
$plvl = $partner['pt_level'];
$partner['pt_level_benefit'] = isset($apms['apms_benefit' . $plvl]) && $apms['apms_benefit' . $plvl] > 0 ? $apms['apms_benefit' . $plvl] : 0;
// 파일체크
switch ($ap) {
    case 'salelist':
        $skin_file = 'salelist.php';
        $chk_access = 1;
        break;
    case 'saleitem':
        $skin_file = 'saleitem.php';
        $chk_access = 1;
        break;
    case 'cancelitem':
        $skin_file = 'cancelitem.php';
Beispiel #3
0
function apms_pt_rate($apms, $pt_it, $pt_id, $pt_commission, $pt_incentive)
{
    global $g5;
    $commission = 0;
    $incentive = 0;
    // It
    $type = array("1", "2");
    if (!in_array($pt_it, $type)) {
        $bill = array($commission, $incentive);
        return $bill;
    }
    // Partner
    $pt = apms_partner($pt_id);
    if (!$pt['pt_id']) {
        $bill = array($commission, $incentive);
        return $bill;
    }
    // Fields
    $cc = 'apms_commission_' . $pt_it;
    $pc = 'pt_commission_' . $pt_it;
    $pi = 'pt_incentive_' . $pt_it;
    // Commission
    if ($pt_commission) {
        $commission = $pt_commission;
    } else {
        $commission = $pt[$pc] ? $pt[$pc] : $apms[$cc];
    }
    // Incentive
    $incentive = $pt_incentive ? $pt_incentive : $pt[$pi];
    $bill = array($commission, $incentive);
    return $bill;
}
Beispiel #4
0
//방법
$pp_flag = apms_pay_flag($row['pp_flag']);
$pp_name = '탈퇴(' . $row['mb_id'] . ')';
$pinfo = get_member($row['mb_id'], 'mb_nick, mb_email, mb_homepage');
if ($pinfo['mb_nick']) {
    $pp_name = get_sideview($row['mb_id'], $pinfo['mb_nick'], $pinfo['mb_email'], $pinfo['wr_homepage']);
}
$pp_staff = '';
if ($row['pp_staff']) {
    $sinfo = get_member($row['pp_staff'], 'mb_nick, mb_email, mb_homepage');
    if ($sinfo['mb_nick']) {
        $pp_staff = get_sideview($row['pp_staff'], $sinfo['mb_nick'], $sinfo['mb_email'], $sinfo['wr_homepage']);
    }
}
$pinfo = array();
$pinfo = apms_partner($row['mb_id']);
//예상금액
$pp = array();
$pp = apms_pay_amount($row);
$g5['title'] = '출금신청서';
include_once G5_PATH . '/head.sub.php';
?>

<div id="sch_target_frm" class="new_win scp_new_win">
    <h1>출금신청서 : <?php 
echo $pp_date;
?>
</h1>

    <form name="ftarget" method="post">
    <input type="hidden" name="mode" value="save">
Beispiel #5
0
        <th scope="col">인센티브</th>
		<th scope="col">추천인(마케터)</th>
        <th scope="col">파트너유형</th>
		<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;
Beispiel #6
0
<?php

if (!defined('_GNUBOARD_')) {
    exit;
}
$mb = apms_partner($pt_id);
if (!$mb['pt_id']) {
    alert('존재하지 않는 파트너입니다.');
}
if ($mode == "pform") {
    check_token();
    //삭제시
    if (isset($_POST['pt_del']) && $_POST['pt_del']) {
        //파일 삭제
        apms_delete_file("partner", $pt_id);
        //파트너 삭제
        sql_query(" delete from {$g5['apms_partner']} where pt_id = '{$pt_id}' ");
        //회원정보에서 정보변경
        sql_query(" update {$g5['member_table']} set as_partner = '0', as_marketer = '0' where mb_id = '{$pt_id}' ", false);
        //이동하기
        goto_url('./apms.admin.php?ap=plist&amp;' . $qstr);
    }
    //업데이트
    $sql = " update {$g5['apms_partner']}\n                set pt_type\t\t\t\t\t= '{$_POST['pt_type']}'\n\t\t\t\t\t, pt_register\t\t\t= '{$_POST['pt_register']}'\n\t\t\t\t\t, pt_leave\t\t\t\t= '{$_POST['pt_leave']}'\n\t\t\t\t\t, pt_name\t\t\t\t= '{$_POST['pt_name']}'\n\t\t\t\t\t, pt_hp\t\t\t\t\t= '{$_POST['pt_hp']}'\n\t\t\t\t\t, pt_email\t\t\t\t= '{$_POST['pt_email']}'\n\t\t\t\t\t, pt_partner\t\t\t= '{$_POST['pt_partner']}'\n\t\t\t\t\t, pt_marketer\t\t\t= '{$_POST['pt_marketer']}'\n\t\t\t\t\t, pt_company\t\t\t= '{$_POST['pt_company']}'\n\t\t\t\t\t, pt_company_name\t\t= '{$_POST['pt_company_name']}'\n\t\t\t\t\t, pt_company_president\t= '{$_POST['pt_company_president']}'\n\t\t\t\t\t, pt_company_saupja\t\t= '{$_POST['pt_company_saupja']}'\n\t\t\t\t\t, pt_company_addr\t\t= '{$_POST['pt_company_addr']}'\n\t\t\t\t\t, pt_company_type\t\t= '{$_POST['pt_company_type']}'\n\t\t\t\t\t, pt_company_item\t\t= '{$_POST['pt_company_item']}'\n\t\t\t\t\t, pt_bank_name\t\t\t= '{$_POST['pt_bank_name']}'\n\t\t\t\t\t, pt_bank_account\t\t= '{$_POST['pt_bank_account']}'\n\t\t\t\t\t, pt_bank_holder\t\t= '{$_POST['pt_bank_holder']}'\n\t\t\t\t\t, pt_bank_limit\t\t\t= '{$_POST['pt_bank_limit']}'\n\t\t\t\t\t, pt_flag\t\t\t\t= '{$_POST['pt_flag']}'\n\t\t\t\t\t, pt_point\t\t\t\t= '{$_POST['pt_point']}'\n\t\t\t\t\t, pt_benefit\t\t\t= '{$_POST['pt_benefit']}'\n\t\t\t\t\t, pt_level\t\t\t\t= '{$_POST['pt_level']}'\n\t\t\t\t\t, pt_limit\t\t\t\t= '{$_POST['pt_limit']}'\n\t\t\t\t\t, pt_commission_1\t\t= '{$_POST['pt_commission_1']}'\n\t\t\t\t\t, pt_commission_2\t\t= '{$_POST['pt_commission_2']}'\n\t\t\t\t\t, pt_commission_3\t\t= '{$_POST['pt_commission_3']}'\n\t\t\t\t\t, pt_commission_4\t\t= '{$_POST['pt_commission_4']}'\n\t\t\t\t\t, pt_commission_5\t\t= '{$_POST['pt_commission_5']}'\n\t\t\t\t\t, pt_incentive_1\t\t= '{$_POST['pt_incentive_1']}'\n\t\t\t\t\t, pt_incentive_2\t\t= '{$_POST['pt_incentive_2']}'\n\t\t\t\t\t, pt_incentive_3\t\t= '{$_POST['pt_incentive_3']}'\n\t\t\t\t\t, pt_incentive_4\t\t= '{$_POST['pt_incentive_4']}'\n\t\t\t\t\t, pt_incentive_5\t\t= '{$_POST['pt_incentive_5']}'\n\t\t\t\t\t, pt_memo\t\t\t\t= '{$_POST['pt_memo']}'\n\t\t\t\t\t, pt_1\t\t\t\t\t= '{$_POST['pt_1']}'\n\t\t\t\t\t, pt_2\t\t\t\t\t= '{$_POST['pt_2']}'\n\t\t\t\t\t, pt_3\t\t\t\t\t= '{$_POST['pt_3']}'\n\t\t\t\t\t, pt_4\t\t\t\t\t= '{$_POST['pt_4']}'\n\t\t\t\t\t, pt_5\t\t\t\t\t= '{$_POST['pt_5']}'\n\t\t\t\t\t, pt_6\t\t\t\t\t= '{$_POST['pt_6']}'\n\t\t\t\t\t, pt_7\t\t\t\t\t= '{$_POST['pt_7']}'\n\t\t\t\t\t, pt_8\t\t\t\t\t= '{$_POST['pt_8']}'\n\t\t\t\t\t, pt_9\t\t\t\t\t= '{$_POST['pt_9']}'\n\t\t\t\t\t, pt_10\t\t\t\t\t= '{$_POST['pt_10']}'\n\t\t\t\twhere pt_id\t\t\t\t\t= '{$pt_id}' ";
    sql_query($sql);
    if ($_POST['pt_register']) {
        // 승인정보가 있을 경우
        sql_query(" update {$g5['member_table']} set as_partner = '{$_POST['pt_partner']}', as_marketer = '{$_POST['pt_marketer']}' where mb_id = '{$pt_id}' ", false);
    } else {
        // 없다면
        sql_query(" update {$g5['member_table']} set as_partner = '0', as_marketer = '0' where mb_id = '{$pt_id}' ", false);