-=[ Mr. Bumblebee ]=-
_Indonesia_
| Path : /var/www/html/print/ |
|
|
| Current File : //var/www/html/print/estimate-form.php |
<?
include $_SERVER['DOCUMENT_ROOT'] . '/inc/config.php' ;
$sign_image = 'https://soccernet.co.kr/product/img/soccernet_bill_sign.png' ;
function estimate_errorcheck($code) {
global $_GET ;
if ( $_GET['type'] == 'excel' ) script_bk();
else script_close();
}
function cost2kr($cost){
$num = array('', 'ÀÏ', 'ÀÌ', '»ï', '»ç', '¿À', 'À°', 'Ä¥', 'ÆÈ', '±¸');
$unit4 = array('', '¸¸', '¾ï', 'Á¶', '°æ');
$unit1 = array('', '½Ê', '¹é', 'õ');
$res = array();
$cost = str_replace(',','',$cost);
$split4 = str_split(strrev((string)$cost),4);
for($i=0;$i<count($split4);$i++){
$temp = array();
$split1 = str_split((string)$split4[$i], 1);
for($j=0;$j<count($split1);$j++){
$u = (int)$split1[$j];
if($u > 0) $temp[] = $num[$u].$unit1[$j];
}
if(count($temp) > 0) $res[] = implode('', array_reverse($temp)).$unit4[$i];
}
return implode('', array_reverse($res));
}
function estimate_detail_list( $list , $min , $skins , $einfo ) {
$result = '' ;
$i = 0 ;
$max = count( $list);
while ( true ) {
$rs = $i < $max ? $list[$i] : false ;
if ( $rs === false && $i >= $min ) break ;
$i++;
$result .= str_replace( array( '$TITLE' , '$QRY' , '$COST' , '$SUM' , '$ETC' ) , array( $rs === false ? '' : $rs['title'] , $rs === false ? '' : $rs['qry'] , $rs === false || $rs['cost'] == '' ? '' : number_format($rs['cost']) , $rs === false ? '' : number_format($rs['sum']) , $rs === false ? ' ' : 'VATÆ÷ÇÔ' ) , $skins ) ;
$sum += $rs['sum'] ;
}
$einfo['repeat-detail'] = $result ;
$einfo['sumcost_kr'] = cost2kr($sum);
$einfo['sumcost'] = number_format($sum);
return $einfo ;
}
$estimatecode = se_decode($_GET['estmcode'] , 'soccernet_estimatecode' ) ;
$estimatecode = explode( '==' , $estimatecode ) ; // {order||cart}=={md5-orderScode}=={numid}
$tm_estimatecode = se_encode( $estimatecode[0] . '==' . $estimatecode[1] . '==' . $estimatecode[2] , 'soccernet_estimatecode' ) ;
if ( $_GET['estmcode'] != $tm_estimatecode ) estimate_errorcheck('2');
if ( $estimatecode == '' ) estimate_errorcheck('1');
$numid = intval($estimatecode[2]);
if ( $estimatecode[0] == 'order' ) {
$total = array( 'table' => $config['ODR'][1] );
$gsQuery = array();
$gsQuery[] = "tb.n_state != 'ÁÖ¹®ÀÓ½Ã'" ;
$gsQuery[] = "tb.numid = {$numid}" ;
$gsexe = $exe->qry_one(" from tbl_{$total[table]}_gs as tbgs
left outer join tbl_{$total[table]} as tb on tb.orderScode = tbgs.orderScode
where " . implode( ' and ' , $gsQuery ) . " order by tbgs.seq asc " , " tbgs.* , tbgs.numid as cart_no , tb.numid as order_no , tb.oname " );
$c_no = "gs_no" ;
} else if ( $estimatecode[0] == 'cart' ) {
$total = array( 'table' => 'cart' );
$gsQuery = array();
$gsQuery[] = "ct.numid = {$numid}" ;
$gsQuery[] = "ct.Ltype = 'C'" ;
$gsQuery[] = "ct." . ( empty($info_user['loginno']) ? "cart_id = '{$cart_id}' " : "real_no = '{$info_user[loginno]}' " ) ;
$gsexe = $exe->qry_one(" from tbl_{$total[table]} as ct
left outer join tbl_shop_item as it on ct.goods_no = it.numid
where " . implode( ' and ' , $gsQuery ) . " " , " it.* , ct.numid as cart_no
, ct.totalqry , ct.top_qry , ct.bot_qry , ct.armS , ct.armL , ct.tn_use , ct.tn_text , ct.tn_arch , ct.tn_pos , ct.cr_opt
, ct.Atype_np , ct.Atype_tnm , ct.Atype_tpos , ct.Atype_memo , ct.Atype_memo , ct.Atype_nfont as Atype_nfonttype , ct.Atype_arch as Atype_archtype
, ct.Atype_orderbottype , ct.Atype_orderbotoption
, it.Atype_botaddprice as Atype_orderbotprice
, it.nfont1_c as Atype_nfont1_c , it.nfont2_c as Atype_nfont2_c , it.nfont3_c as Atype_nfont3_c , it.initial_c as Atype_initial_c , it.arch_c as Atype_arch_c
, it.nfont1_s as Atype_nfont1_s , it.nfont2_s as Atype_nfont2_s , it.nfont3_s as Atype_nfont3_s , it.initial_s as Atype_initial_s , it.arch_s as Atype_arch_s
, it.charsprintprice_c as Atype_charsprintprice_c , it.charsprintprice_s as Atype_charsprintprice_s
, if( it.Atype_charptype = 'INPUT' and it.Atype_charitype = 'INPUT' and if( ct.Atype_nfont = 'C' , if( it.charsprintptype_c = 'Y' , true , false ) , if( it.charsprintptype_s = 'Y' , true , false )) , 'A' , null ) as Atype_chartype2
, it.Atype_charptype as Atype_nochartype , it.Atype_charitype as Atype_inchartype
, '{$shop_Atype_tpos1}' as Atype_tpp1 , '{$shop_Atype_tpos2}' as Atype_tpp2 , '{$shop_Atype_tpos3}' as Atype_tpp3 , '{$shop_Atype_tpos4}' as Atype_tpp4 , '{$shop_Atype_tpos5}' as Atype_tpp5
, 'ÁÖ¹®ÀÚ' as oname " );
$c_no = "cart_no" ;
} else estimate_errorcheck('2');
//$order_no = 0 ;
while ( $gsrs = $exe->fetch($gsexe)) {
if ( $estimatecode[0] == 'order' && md5($gsrs['orderScode']) != $estimatecode[1] ) estimate_errorcheck('3');
if ( !isset($einfo)) {
$einfo = array(
'title' => $accesstype ,
'wdate' => date('Y³â m¿ù dÀÏ') ,
'name' => $gsrs['oname'] ,
'sumcost' => $gsrs['sum_price'],
'repeat-detail' => ''
);
}
//if ( $gsrs['order_no'] != $order_no ) {
// $einfo['repeat-detail'][] = array( 'title' => '<a href="/admin/index.php?code=ODR&page=1&mode=view&numid=' . $gsrs['order_no'] . '" target="_blank">' . $gsrs['order_no'] . '</a>' , 'qry' => '' , 'cost' => '' , 'sum' => 0 );
// $order_no = $gsrs['order_no'] ;
//}
$is_print = array( 'q' => '' , 'c' => '' , 's' => 0 ) ;
$useInitial = array() ;
// ºÐ·ùº°
if ( $gsrs['formtype'] == 'A' ) {
if ( $gsrs['top_qry'] > 0 || $gsrs['topprice'] > 0 ) {
if ( $gsrs['armS'] > 0 || $gsrs['armL'] > 0 ) {
if ( $gsrs['armS'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] . ' »óÀÇ/¹ÝÆÈ' , 'qry' => $gsrs['armS'] , 'cost' => $gsrs['topprice']+$gsrs['g_price']+$gsrs['arm_s_price'] , 'sum' => ($gsrs['topprice']+$gsrs['g_price']+$gsrs['arm_s_price']) * $gsrs['armS'] ) ;
if ( $gsrs['armL'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] . ' »óÀÇ/±äÆÈ' , 'qry' => $gsrs['armL'] , 'cost' => $gsrs['topprice']+$gsrs['g_price']+$gsrs['arm_l_price'] , 'sum' => ($gsrs['topprice']+$gsrs['g_price']+$gsrs['arm_l_price']) * $gsrs['armL'] ) ;
} else $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] . ' »óÀÇ' , 'qry' => $gsrs['top_qry'] , 'cost' => $gsrs['topprice']+$gsrs['g_price'] , 'sum' => ($gsrs['topprice']+$gsrs['g_price']) * $gsrs['top_qry'] ) ;
} else if ( $gsrs['totalqry'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] , 'qry' => $gsrs['totalqry'] , 'cost' => $gsrs['g_price'] , 'sum' => $gsrs['g_price'] * $gsrs['totalqry'] ) ;
// »çÀÌÁ À̴ϼÈ, ¹øÈ£ µî
$s_nf_pos1 = 0 ;
$s_nf_pos2 = 0 ;
$s_nf_pos3 = 0 ;
$s_nf_initial = 0 ;
$s_nf_arch = false ;
$botcount = 0 ;
if ( $gsrs['Atype_nfonttype'] == 'C' || $gsrs['Atype_nfonttype'] == 'S' ) {
$s_nf_pos1 = $gsrs['Atype_nfonttype'] == 'C' ?$gsrs['Atype_nfont1_c'] : $gsrs['Atype_nfont1_s'] ;
$s_nf_pos2 = $gsrs['Atype_nfonttype'] == 'C' ?$gsrs['Atype_nfont2_c'] : $gsrs['Atype_nfont2_s'] ;
$s_nf_pos3 = $gsrs['Atype_nfonttype'] == 'C' ?$gsrs['Atype_nfont3_c'] : $gsrs['Atype_nfont3_s'] ;
$s_nf_initial = $gsrs['Atype_nfonttype'] == 'C' ?$gsrs['Atype_initial_c'] : $gsrs['Atype_initial_s'] ;
$s_nf_initial = $gsrs['Atype_chartype2'] == 'A' ? $gsrs['Atype_charsprintprice_' . strtolower($gsrs['Atype_nfonttype'])] : $s_nf_initial ;
$s_nf_arch = $gsrs['Atype_nfonttype'] == 'C' ?$gsrs['Atype_arch_c'] : $gsrs['Atype_arch_s'] ;
$s_nf_arch = $gsrs['Atype_archtype'] == 'Y' ? $s_nf_arch : false ;
}
$topcount = 0 ;
$sexe = $exe->qry_one(" from tbl_{$total[table]}_size where {$c_no} = '{$gsrs[cart_no]}' and servicetype = 'N' order by armtype desc , tsize , bsize , seq asc " , " seq, tsize, bsize, armtype, initialnm, numb , npos1 , npos2 , npos3 " ) ;
while ( $srs = $exe->fetch($sexe)) {
$topcount++;
if ( $srs['bsize'] > 0 ) $botcount++ ;
$initial = str_replace( ' ' , '' , $srs['initialnm'] ) ;
if ( $initial != '') $is_print['s'] += ( $s_nf_initial * ( $gsrs['Atype_inchartype'] == 'INPUT' ? 1 : mb_strlen($initial , 'EUC-KR') ) ) + $s_nf_arch ;
$numb = str_replace( ' ' , '' , $srs['numb'] ) ;
if ( $numb != '' ) {
$nblen = mb_strlen($numb , 'EUC-KR') ;
if ( $srs['npos1'] != 'Y' && $srs['npos1'] != 'N' ) {
$srs['npos1'] = substr($gsrs['Atype_np'],0,1) == 'Y' ? 'Y' : 'N' ;
$srs['npos2'] = substr($gsrs['Atype_np'],1,1) == 'Y' ? 'Y' : 'N' ;
$srs['npos3'] = substr($gsrs['Atype_np'],2,1) == 'Y' ? 'Y' : 'N' ;
}
if ( $gsrs['Atype_chartype2'] == 'A' ) {
if ( $initial == '' ) $is_print['s'] += $s_nf_initial ;
} else {
$is_print['s'] += $srs['npos1'] == 'Y' ? $s_nf_pos1 * ( $gsrs['Atype_nochartype'] == 'INPUT' ? 1 : $nblen ) : 0 ;
$is_print['s'] += $srs['npos2'] == 'Y' ? $s_nf_pos2 * ( $gsrs['Atype_nochartype'] == 'INPUT' ? 1 : $nblen ) : 0 ;
$is_print['s'] += $srs['npos3'] == 'Y' ? $s_nf_pos3 * ( $gsrs['Atype_nochartype'] == 'INPUT' ? 1 : $nblen ) : 0 ;
}
}
}
if ( $botcount > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] . ' ÇÏÀÇ' , 'qry' => $botcount , 'cost' => $gsrs['Atype_orderbotprice'] , 'sum' => $gsrs['Atype_orderbotprice'] * $botcount ) ;
// ÆÀ¸í
$teamname = str_replace( ' ' , '' , $gsrs['Atype_tnm'] ) ;
if ( !empty($teamname)) for ( $i = 1 ; $i <= 5 ; $i++ ) if ( substr( $gsrs['Atype_tpos'] , ($i-1) , 1 ) == 'Y' ) $is_print['s'] += $gsrs['Atype_tpp' . $i]*$gsrs['totalqry'] ;
//Àμâºñ ÇÕ°è
if ( $is_print['s'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => 'Àμâºñ ÇÕ°è' , 'qry' => $is_print['q'] , 'cost' => $is_print['c'] , 'sum' => $is_print['s'] ) ;
// ½ºÅ¸Å·
$is_print = array( 'q' => '' , 'c' => $gsrs['stocking_price'] , 's' => 0 ) ;
$skrs = $exe->qry_fetch(" from tbl_{$total[table]}_stk where {$c_no} = '{$gsrs[cart_no]}' order by numid " , " * " ) ;
if ( !empty($skrs['nm'])) {
$is_print['q'] = $topcount ;
$is_print['s'] = $topcount * $gsrs['stocking_price'] ;
}
if ( $is_print['s'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => '½ºÅ¸Å·' , 'qry' => $is_print['q'] , 'cost' => $is_print['c'] , 'sum' => $is_print['s'] ) ;
// ¼ºñ½º
$servicecount = $exe->qry_fetch(" from tbl_{$total[table]}_size where {$c_no} = '{$gsrs[cart_no]}' and servicetype = 'Y' " , " count(*) as cntnum " , "cntnum");
if ( $servicecount > 0 ) $einfo['repeat-detail'][] = array( 'title' => '»çÀºÇ°' , 'qry' => $servicecount , 'cost' => 0 , 'sum' => 0 ) ;
// A ³¡
} else if ( $gsrs['formtype'] == 'M' ) {
if ( $gsrs['top_qry'] > 0 || $gsrs['topprice'] > 0 ) {
if ( $gsrs['armS'] > 0 || $gsrs['armL'] > 0 ) {
if ( $gsrs['armS'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] . ' »óÀÇ/¹ÝÆÈ' , 'qry' => $gsrs['armS'] , 'cost' => $gsrs['topprice']+$gsrs['g_price']+$gsrs['arm_s_price'] , 'sum' => ($gsrs['topprice']+$gsrs['g_price']+$gsrs['arm_s_price']) * $gsrs['armS'] ) ;
if ( $gsrs['armL'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] . ' »óÀÇ/±äÆÈ' , 'qry' => $gsrs['armL'] , 'cost' => $gsrs['topprice']+$gsrs['g_price']+$gsrs['arm_l_price'] , 'sum' => ($gsrs['topprice']+$gsrs['g_price']+$gsrs['arm_l_price']) * $gsrs['armL'] ) ;
} else $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] . ' »óÀÇ' , 'qry' => $gsrs['top_qry'] , 'cost' => $gsrs['topprice']+$gsrs['g_price'] , 'sum' => ($gsrs['topprice']+$gsrs['g_price']) * $gsrs['top_qry'] ) ;
} else if ( $gsrs['totalqry'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] , 'qry' => $gsrs['totalqry'] , 'cost' => $gsrs['g_price'] , 'sum' => $gsrs['g_price'] * $gsrs['totalqry'] ) ;
if ( $gsrs['bot_qry'] > 0 || $gsrs['botprice'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] . ' ÇÏÀÇ' , 'qry' => $gsrs['bot_qry'] , 'cost' => $gsrs['botprice'] , 'sum' => $gsrs['botprice'] * $gsrs['bot_qry'] ) ;
// ¼±Åà ¿É¼Ç
$numberFont_p1 = 0 ;
$numberFont_p2 = 0 ;
$numberFont_p3 = 0 ;
$numberFont_gubun = '' ; // A :ÀÏ¹Ý , B : Ư¼ö -- ÀÌ´Ï¼È ±Ý¾× °ü·Ã
$fixed_price = false ;
if ( $estimatecode[0] == 'order' ) {
$numberFont_p1 = $gsrs['nfont_p1'] ;
$numberFont_p2 = $gsrs['nfont_p2'] ;
$numberFont_p3 = $gsrs['nfont_p3'] ;
$numberFont_gubun = $gsrs['nfont_gubun'] ; // A :ÀÏ¹Ý , B : Ư¼ö -- ÀÌ´Ï¼È ±Ý¾× °ü·Ã
$posexe = $exe->qry_one(" from tbl_{$total[table]}_pos as opos where opos.{$c_no} = '{$gsrs[cart_no]}' order by opos.pos asc " , " opos.* " ) ;
} else {
if ( $gsrs['p04'] == 'n' || $gsrs['p10'] == 'n' || $gsrs['p13'] == 'n' ) { // ¼¼ À§Ä¡´Â µ¿ÀÏ °ªÀ» °¡Áý´Ï´Ù.
$fixed_price = true ;
$frs = $exe->qry_fetch(" from tbl_{$config[OT1][1]} where numid = '{$gsrs[p04_no]}' ", ' title , price1 , price2 , price3 , gubun , img1 ' ) ;
// * ¹øÈ£¼Ã¼ °íÁ¤½Ã ¹«·á
$numberFont_p1 = 0 ; // is_numeric($frs['price1']) ? $frs['price1'] : 0 ;
$numberFont_p2 = 0 ; // is_numeric($frs['price2']) ? $frs['price2'] : 0 ;
$numberFont_p3 = 0 ; // is_numeric($frs['price3']) ? $frs['price3'] : 0 ;
$numberFont_gubun = $frs['gubun'] ;
}
$posexe = $exe->qry_one(" from tbl_{$total[table]}_pos as opos left outer join tbl_{$config[OT1][1]} as ots on opos.p_idx = ots.numid where opos.{$c_no} = '{$gsrs[cart_no]}' order by opos.pos asc " , " opos.* , ots.numid as o_idx , ots.keycode , ots.title , ots.price1 , ots.price2 , ots.price3 , ots.gubun , ots.img1 " ) ;
}
while ( $posrs = $exe->fetch($posexe) ) {
$i = intval($posrs['pos']) ;
if ( $posrs['p_code'] == 'e' || $posrs['p_code'] == 's' || $posrs['p_code'] == 'p' ) // ½ºÆù¼, ¿¥ºí·³ , ÆÐÄ¡
$is_print['s'] += $posrs['p_price1']*( $i < 13 ? $gsrs['top_qry'] : $gsrs['bot_qry'] ) ;
else if ( $posrs['p_code'] == 'i' || $posrs['o_code'] == 'i')
$useInitial[$posrs['pos']] = array( 'Y' , $posrs['p_arch'] , $posrs['o_code'] );
else if (( $posrs['p_code'] == 't' || $posrs['o_code'] == 't') && !empty($posrs['p_tn'])) { // ÆÀ¸í
$tnlen = mb_strlen(str_replace( ' ' , '' , $posrs['p_tn'] ) , 'EUC_KR' );
if ( $posrs['o_code'] != 't' ) $is_print['s'] += ($gsrs['teamtype'] == 'O' ? $tnlen * $gsrs['team_o_price'] : $gsrs['team_f_price'])*( $i < 13 ? $gsrs['top_qry'] : $gsrs['bot_qry'] ) ;
$is_print['s'] += ( $posrs['p_arch'] == 'Y' ? $gsrs['team_arch'] : 0)*( $i < 13 ? $gsrs['top_qry'] : $gsrs['bot_qry'] ) ;
} else if ( $fixed_price === false ) {
if ( $gsrs['p' . $posrs['pos']] == 'f' && $posrs['p_code'] == 'n' ) {
$numberFont_p1 = is_numeric($posrs['price1']) ? $posrs['price1'] : 0 ;
$numberFont_p2 = is_numeric($posrs['price2']) ? $posrs['price2'] : 0 ;
$numberFont_p3 = is_numeric($posrs['price3']) ? $posrs['price3'] : 0 ;
$numberFont_gubun = $posrs['gubun'] ;
}
}
}
// »çÀÌÁ À̴ϼÈ, ¹øÈ£ µî
$szexe = $exe->qry_one(" from tbl_{$total[table]}_size where {$c_no} = '{$gsrs[cart_no]}' order by armtype desc , tsize , seq asc " , " * " ) ;
while ( $szrs = $exe->fetch($szexe)) {
if ( !empty($szrs['initialnm'])) {
$initialp = $gsrs['initial_' . ( input_initial_price(str_replace( ' ' , '' , $szrs['initialnm'] )) ? 'kr' : 'en' ) . '_' . ( $numberFont_gubun == 'B' ? 's' : 'c' )] ;
if ( $useInitial['09'][0] == 'Y' && $useInitial['09'][2] != 'i' ) $is_print['s'] += $initialp ;
if ( $useInitial['09'][0] == 'Y' && $useInitial['09'][1] == 'Y' ) $is_print['s'] += $gsrs['initial_arch'] ;
if ( $useInitial['11'][0] == 'Y' && $useInitial['11'][2] != 'i' ) $is_print['s'] += $initialp ;
if ( $useInitial['11'][0] == 'Y' && $useInitial['11'][1] == 'Y' ) $is_print['s'] += $gsrs['initial_arch'] ;
}
$numb = str_replace( ' ' , '' , $szrs['numb'] ) ;
$numblen = !empty($numb) ? strlen($numb) : 0 ;
if ( $szrs['npos1'] == 'Y' && $numblen > 0 ) $is_print['s'] += $numblen * $numberFont_p1 ;
if ( $szrs['npos2'] == 'Y' && $numblen > 0 ) $is_print['s'] += $numblen * $numberFont_p2 ;
if ( $szrs['npos3'] == 'Y' && $numblen > 0 ) $is_print['s'] += $numblen * $numberFont_p3 ;
}
// Àμâºñ ÇÕ°è
if ( $is_print['s'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => 'Àμâºñ ÇÕ°è' , 'qry' => $is_print['q'] , 'cost' => $is_print['c'] , 'sum' => $is_print['s'] ) ;
// ½ºÅ¸Å·
$is_print = array( 'q' => '' , 'c' => $gsrs['stocking_price'] , 's' => 0 ) ;
$stkexe = $exe->qry_one(" from tbl_{$total[table]}_stk where {$c_no} = '{$gsrs[cart_no]}' order by numid " , " * " ) ;
while ( $stkrs = $exe->fetch($stkexe)) {
$is_print['q'] += $stkrs['qry'] ;
$is_print['s'] += $stkrs['qry'] * $gsrs['stocking_price'] ;
}
if ( $is_print['s'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => '½ºÅ¸Å·' , 'qry' => $is_print['q'] , 'cost' => $is_print['c'] , 'sum' => $is_print['s'] ) ;
// M ³¡
} else if ( $gsrs['formtype'] == 'T' ) {
if ( $gsrs['totalqry'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] , 'qry' => $gsrs['totalqry'] , 'cost' => $gsrs['g_price'] , 'sum' => $gsrs['g_price'] * $gsrs['totalqry'] ) ;
if ( $gsrs['tn_use'] == 'Y' ) {
$is_print = array( 'q' => $gsrs['totalqry'] , 'c' => 0 , 's' => 0 ) ;
// ÆÀ¸í
$tnlen = mb_strlen(str_replace( ' ' , '' , $gsrs['tn_text'] ) , 'EUC_KR' );
$is_print['c'] = $gsrs['teamtype'] == 'O' ? $tnlen * $gsrs['team_o_price'] : $gsrs['team_f_price'] ;
$is_print['s'] = $is_print['q'] * $is_print['c'] ;
// ¾ÆÄ¡Çü
if ( $gsrs['tn_arch'] == 'Y' ) {
$is_print['c'] += $gsrs['team_arch'] ;
$is_print['s'] += $is_print['q'] * $gsrs['team_arch'] ;
}
}
// Àμâºñ ÇÕ°è
if ( $is_print['s'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => 'Àμâºñ ÇÕ°è' , 'qry' => $is_print['q'] , 'cost' => $is_print['c'] , 'sum' => $is_print['s'] ) ;
// T ³¡
} elseif ( $gsrs['formtype'] == 'S' || $gsrs['formtype'] == 'Q' ) {
if ( $gsrs['totalqry'] > 0 ) $einfo['repeat-detail'][] = array( 'title' => $gsrs['title'] , 'qry' => $gsrs['totalqry'] , 'cost' => $gsrs['g_price'] , 'sum' => $gsrs['g_price'] * $gsrs['totalqry'] ) ;
}
}
if ( !isset($einfo)) estimate_errorcheck('4') ;
if ( $_GET['type'] == 'excel' ) include_once("estimate-excel.php");
else include_once("estimate-skin.php");
?>
Copyright © 2017 || Recoded By Mr.Bumblebee