영카트 CSV 다운로드후 운송장번호 입력하고 다시 업로드 정보
영카트 CSV 다운로드후 운송장번호 입력하고 다시 업로드
본문
adm/shop_admin/orderprint.php
아래소스를 </form> 밑에 추가
<form name=forderprint action="./orderprintupdate.php" method='post' enctype='multipart/form-data'>
<input type=hidden name=case value="2">
<tr><td colspan=20 height=2 bgcolor=#DDDDDD></td></tr>
<tr>
<td width="150">운송장번호 업로드</td>
<td align="right">
<table width=370 cellpadding=4>
<tr>
<td align=right>
<input type=file name=fr_od_id size=30 maxlength=10 class=ed>
<input type=submit class=btn1 value=' 확 인 '>
</td>
</tr>
</table>
</td>
</tr>
</form>
adm/shop_admin/orderprintupdate.php
파일생성하여 아래소스 입력
<?
$sub_menu = "400100";
include_once("./_common.php");
//** 파일업로드후 table update
if (move_uploaded_file($_FILES['fr_od_id']['tmp_name'], $uploadfile)) {
$row=1;
$fp = fopen($uploaddir . $uploadfileNm,"r"); //** 파일읽기.
while ($data = fgetcsv($fp,1000, ",")) //** row수만큼 루프
{
$num = count($data);
이러면 될듯합니다.
한달전쯤에 해놓은거라서 ^^; 자세히 기억이..
여기서문제는...
메일발송 및 SMS 발송이 되지 않습니다.
혹시 가능하신분 부탁드리겠습니다.
혹시나 안되시는분은.. http://ntype.kr 로 문의 주시기 바랍니다.
아래소스를 </form> 밑에 추가
<form name=forderprint action="./orderprintupdate.php" method='post' enctype='multipart/form-data'>
<input type=hidden name=case value="2">
<tr><td colspan=20 height=2 bgcolor=#DDDDDD></td></tr>
<tr>
<td width="150">운송장번호 업로드</td>
<td align="right">
<table width=370 cellpadding=4>
<tr>
<td align=right>
<input type=file name=fr_od_id size=30 maxlength=10 class=ed>
<input type=submit class=btn1 value=' 확 인 '>
</td>
</tr>
</table>
</td>
</tr>
</form>
adm/shop_admin/orderprintupdate.php
파일생성하여 아래소스 입력
<?
$sub_menu = "400100";
include_once("./_common.php");
$uploaddir = '/ibiweb/soneed/wwwhome/data/csvtrans/'; //** 업로드경로
$uploadfile = $uploaddir . $_FILES['fr_od_id']['name']; //** 업로드되는 전체경로.
$uploadfileNm = $_FILES['fr_od_id']['name']; //** 업로드되는 파일명
$uploadfile = $uploaddir . $_FILES['fr_od_id']['name']; //** 업로드되는 전체경로.
$uploadfileNm = $_FILES['fr_od_id']['name']; //** 업로드되는 파일명
//** 파일업로드후 table update
if (move_uploaded_file($_FILES['fr_od_id']['tmp_name'], $uploadfile)) {
$row=1;
$fp = fopen($uploaddir . $uploadfileNm,"r"); //** 파일읽기.
while ($data = fgetcsv($fp,1000, ",")) //** row수만큼 루프
{
$num = count($data);
$ordeNum = trim($data[0]); //** 주문번호
$tranNum = trim($data[9]); //** 운송번호
$tranNum = trim($data[9]); //** 운송번호
$Query = "
UPDATE yc4_order A, yc4_cart B SET od_invoice = '$tranNum', dl_id = '1', ct_status = '배송'
WHERE A.on_uid = B.on_uid AND od_id = '0$ordeNum'
";
sql_query($Query);
//print $Query."<br>";
UPDATE yc4_order A, yc4_cart B SET od_invoice = '$tranNum', dl_id = '1', ct_status = '배송'
WHERE A.on_uid = B.on_uid AND od_id = '0$ordeNum'
";
sql_query($Query);
//print $Query."<br>";
$row++;
}
}
fclose($fp);
goto_url("./deliverylist.php");
}
?>
}
?>
이러면 될듯합니다.
한달전쯤에 해놓은거라서 ^^; 자세히 기억이..
여기서문제는...
메일발송 및 SMS 발송이 되지 않습니다.
혹시 가능하신분 부탁드리겠습니다.
혹시나 안되시는분은.. http://ntype.kr 로 문의 주시기 바랍니다.
추천
0
0
댓글 3개

찾던 자료입니다~
감사합니다~
감사합니다~
엑셀업다운
일케 해서 CSV 다운로드후 운송장번호 입력하고 다시 업로드 했는데 오류가 떠요
Warning: move_uploaded_file(/ibiweb/soneed/wwwhome/data/csvtrans/101022.csv) [function.move-uploaded-file]: failed to open stream: No such file or directory in /www/orange-road_co_kr/adm/shop_admin/orderprintupdate.php on line 9
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpmmtpPx' to '/ibiweb/soneed/wwwhome/data/csvtrans/101022.csv' in /www/orange-road_co_kr/adm/shop_admin/orderprintupdate.php on line 9
어케 해야 할까요? ㅜ.ㅜ
Warning: move_uploaded_file(/ibiweb/soneed/wwwhome/data/csvtrans/101022.csv) [function.move-uploaded-file]: failed to open stream: No such file or directory in /www/orange-road_co_kr/adm/shop_admin/orderprintupdate.php on line 9
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpmmtpPx' to '/ibiweb/soneed/wwwhome/data/csvtrans/101022.csv' in /www/orange-road_co_kr/adm/shop_admin/orderprintupdate.php on line 9
어케 해야 할까요? ㅜ.ㅜ